#include "setupapi_private.h"
-WINE_DEFAULT_DEBUG_CHANNEL(setupapi);
+#include <winsvc.h>
+#include <ndk/cmfuncs.h>
/* Unicode constants */
static const WCHAR BackSlash[] = {'\\',0};
if (SUCCEEDED(hr))
{
/* Fill link properties */
- if (SUCCEEDED(hr))
- hr = IShellLinkW_SetPath(psl, FullFileName);
+ hr = IShellLinkW_SetPath(psl, FullFileName);
if (SUCCEEDED(hr))
hr = IShellLinkW_SetArguments(psl, L"");
if (SUCCEEDED(hr))
GetLineText(hInf, ServiceSection, DescriptionKey, &Description);
GetLineText(hInf, ServiceSection, DependenciesKey, &Dependencies);
+ /* If there is no group, we must not request a tag */
+ if (!LoadOrderGroup || !*LoadOrderGroup)
+ useTag = FALSE;
+
hService = OpenServiceW(
hSCManager,
ServiceName,
PWSTR DestinationInfFileNameW = NULL;
PWSTR DestinationInfFileNameComponentW = NULL;
BOOL ret = FALSE;
+ DWORD size;
TRACE("%s %s 0x%lx 0x%lx %p 0%lu %p %p\n",
SourceInfFileName, OEMSourceMediaLocation, OEMSourceMediaType,
CopyStyle,
DestinationInfFileNameW,
DestinationInfFileNameSize,
- RequiredSize,
+ &size,
DestinationInfFileNameComponent ? &DestinationInfFileNameComponentW : NULL);
if (!ret)
+ {
+ if (RequiredSize) *RequiredSize = size;
goto cleanup;
-
+ }
+
if (DestinationInfFileNameSize != 0)
{
if (WideCharToMultiByte(CP_ACP, 0, DestinationInfFileNameW, -1,
SetLastError(ERROR_INVALID_PARAMETER);
else if (OEMSourceMediaType != SPOST_NONE && OEMSourceMediaType != SPOST_PATH && OEMSourceMediaType != SPOST_URL)
SetLastError(ERROR_INVALID_PARAMETER);
- else if (OEMSourceMediaType != SPOST_NONE && !OEMSourceMediaLocation)
- SetLastError(ERROR_INVALID_PARAMETER);
else if (CopyStyle & ~(SP_COPY_DELETESOURCE | SP_COPY_REPLACEONLY | SP_COPY_NOOVERWRITE | SP_COPY_OEMINF_CATALOG_ONLY))
{
TRACE("Unknown flags: 0x%08lx\n", CopyStyle & ~(SP_COPY_DELETESOURCE | SP_COPY_REPLACEONLY | SP_COPY_NOOVERWRITE | SP_COPY_OEMINF_CATALOG_ONLY));
{
if (GetFileSizeEx(hDestFile, &DestFileSize)
&& DestFileSize.QuadPart == SourceFileSize.QuadPart
- && compare_files(hSourceFile, hDestFile))
+ && !compare_files(hSourceFile, hDestFile))
{
TRACE("%s already exists as %s\n",
debugstr_w(SourceInfFileName), debugstr_w(pFileName));