Use a new debug channel 'devmgr' instead of DPRINTFs.
svn path=/trunk/; revision=64541
#include <winver.h>
-#define NDEBUG
-#include <debug.h>
static UINT WINAPI
EnumDeviceDriverFilesCallback(IN PVOID Context,
if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &hToken))
{
- DPRINT("OpenProcessToken failed\n");
+ ERR("OpenProcessToken failed\n");
return;
}
/* Get the LUID for the Shutdown privilege */
if (!LookupPrivilegeValueW(NULL, SE_SHUTDOWN_NAME, &Privileges.Privileges[0].Luid))
{
- DPRINT("LookupPrivilegeValue failed\n");
+ ERR("LookupPrivilegeValue failed\n");
CloseHandle(hToken);
return;
}
if (!AdjustTokenPrivileges(hToken, FALSE, &Privileges, 0, NULL, NULL))
{
- DPRINT("AdjustTokenPrivileges failed\n");
+ ERR("AdjustTokenPrivileges failed\n");
CloseHandle(hToken);
return;
}
/* Finally shut down the system */
if (!ExitWindowsEx(EWX_REBOOT, SHTDN_REASON_MAJOR_OTHER | SHTDN_REASON_MINOR_OTHER | SHTDN_REASON_FLAG_PLANNED))
{
- DPRINT("ExitWindowsEx failed\n");
+ ERR("ExitWindowsEx failed\n");
CloseHandle(hToken);
}
}
else
{
/* FIXME - display an error message */
- DPRINT1("Failed to enable/disable device! LastError: %d\n",
- GetLastError());
+ FIXME("Failed to enable/disable device! LastError: %d\n",
+ GetLastError());
}
}
else
0,
&DevIdSize))
{
- DPRINT1("SetupDiGetDeviceInstanceId unexpectedly returned TRUE!\n");
+ ERR("SetupDiGetDeviceInstanceId unexpectedly returned TRUE!\n");
return -1;
}
if (dwFlags & ~(DPF_EXTENDED | DPF_DEVICE_STATUS_ACTION))
{
- DPRINT1("DevPropertiesExW: Invalid flags: 0x%x\n",
+ FIXME("DevPropertiesExW: Invalid flags: 0x%x\n",
dwFlags & ~(DPF_EXTENDED | DPF_DEVICE_STATUS_ACTION));
SetLastError(ERROR_INVALID_FLAGS);
return -1;
if (bShowDevMgr)
{
- DPRINT("DevPropertiesExW doesn't support bShowDevMgr!\n");
+ FIXME("DevPropertiesExW doesn't support bShowDevMgr!\n");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
}
else
szDeviceID,
szMachineName))
{
- DPRINT1("DeviceProperties_RunDLLW DeviceID: %S, MachineName: %S\n", szDeviceID, szMachineName);
+ ERR("DeviceProperties_RunDLLW DeviceID: %S, MachineName: %S\n", szDeviceID, szMachineName);
return;
}
#include "precomp.h"
-#define NDEBUG
-#include <debug.h>
BOOL
ShowDeviceProblemWizard(IN HWND hWndParent OPTIONAL,
#include "precomp.h"
-#define NDEBUG
-#include <debug.h>
typedef struct _HWDEVINFO
{
}
else
{
- DPRINT1("Unable to allocate memory for %d SP_DEVINFO_DATA structures!\n",
- ClassDevInfo->ItemCount + 1);
+ ERR("Unable to allocate memory for %d SP_DEVINFO_DATA structures!\n",
+ ClassDevInfo->ItemCount + 1);
break;
}
}
sizeof(HWDEVINFO));
if (ClassDevInfo->HwDevInfo == NULL)
{
- DPRINT1("Unable to allocate memory for a SP_DEVINFO_DATA structures!\n");
+ ERR("Unable to allocate memory for a SP_DEVINFO_DATA structures!\n");
break;
}
}
#include "precomp.h"
-#define NDEBUG
-#include <debug.h>
typedef struct
{
#include "precomp.h"
-#define NDEBUG
-#include <debug.h>
HINSTANCE hDllInstance = NULL;
DeviceInfoData,
&InstallParams))
{
- DPRINT1("SetupDiSetDeviceInstallParams() failed with error 0x%lx\n", GetLastError());
+ ERR("SetupDiSetDeviceInstallParams() failed with error 0x%lx\n", GetLastError());
goto Cleanup;
}
KEY_QUERY_VALUE);
if (hKey == INVALID_HANDLE_VALUE)
{
- DPRINT1("SetupDiOpenDevRegKey() failed with error 0x%lx\n", GetLastError());
+ ERR("SetupDiOpenDevRegKey() failed with error 0x%lx\n", GetLastError());
goto Cleanup;
}
&dwLength);
if (rc != ERROR_SUCCESS)
{
+ ERR("RegQueryValueEx() failed with error 0x%lx\n", GetLastError());
SetLastError(rc);
- DPRINT1("RegQueryValueEx() failed with error 0x%lx\n", GetLastError());
goto Cleanup;
}
else if (dwType != REG_SZ)
{
+ ERR("Expected registry type REG_SZ (%lu), got %lu\n", REG_SZ, dwType);
SetLastError(ERROR_GEN_FAILURE);
- DPRINT1("Expected registry type REG_SZ (%lu), got %lu\n", REG_SZ, dwType);
goto Cleanup;
}
InfPath[(dwLength / sizeof(WCHAR)) - 1] = L'\0';
DeviceInfoData,
&InstallParams))
{
- DPRINT1("SetupDiSetDeviceInstallParams() failed with error 0x%lx\n", GetLastError());
+ ERR("SetupDiSetDeviceInstallParams() failed with error 0x%lx\n", GetLastError());
goto Cleanup;
}
DeviceInfoData,
SPDIT_CLASSDRIVER))
{
- DPRINT1("SetupDiBuildDriverInfoList() failed with error 0x%lx\n", GetLastError());
+ ERR("SetupDiBuildDriverInfoList() failed with error 0x%lx\n", GetLastError());
goto Cleanup;
}
&dwLength);
if (rc != ERROR_SUCCESS)
{
+ ERR("RegQueryValueEx() failed with error 0x%lx\n", GetLastError());
SetLastError(rc);
- DPRINT1("RegQueryValueEx() failed with error 0x%lx\n", GetLastError());
goto Cleanup;
}
else if (dwType != REG_SZ)
{
+ ERR("Expected registry type REG_SZ (%lu), got %lu\n", REG_SZ, dwType);
SetLastError(ERROR_GEN_FAILURE);
- DPRINT1("Expected registry type REG_SZ (%lu), got %lu\n", REG_SZ, dwType);
goto Cleanup;
}
InfPath[(dwLength / sizeof(WCHAR)) - 1] = L'\0';
NULL) &&
GetLastError() != ERROR_INSUFFICIENT_BUFFER)
{
- DPRINT1("SetupDiGetDriverInfoDetail() failed with error 0x%lx\n", GetLastError());
+ ERR("SetupDiGetDriverInfoDetail() failed with error 0x%lx\n", GetLastError());
goto Cleanup;
}
if (!wcsicmp(DriverInfoDetailData.SectionName,
}
if (GetLastError() != ERROR_NO_MORE_ITEMS)
{
- DPRINT1("SetupDiEnumDriverInfo() failed with error 0x%lx\n", GetLastError());
+ ERR("SetupDiEnumDriverInfo() failed with error 0x%lx\n", GetLastError());
goto Cleanup;
}
#include <setupapi.h>
#include <cfgmgr32.h>
#include <dll/devmgr/devmgr.h>
+#include <wine/debug.h>
#include "resource.h"
-extern HINSTANCE hDllInstance;
+WINE_DEFAULT_DEBUG_CHANNEL(devmgr);
-ULONG DbgPrint(PCCH Format,...);
+extern HINSTANCE hDllInstance;
typedef INT_PTR (WINAPI *PPROPERTYSHEETW)(LPCPROPSHEETHEADERW);
typedef HPROPSHEETPAGE (WINAPI *PCREATEPROPERTYSHEETPAGEW)(LPCPROPSHEETPAGEW);
#include <windef.h>
-#define NDEBUG
-#include <debug.h>
/***************************************************************************
* NAME EXPORTED