Use a new debug channel 'devmgr' instead of DPRINTFs.

svn path=/trunk/; revision=64541
This commit is contained in:
Eric Kohl 2014-10-05 12:25:05 +00:00
parent e65c9bdb9b
commit a335f42589
7 changed files with 26 additions and 37 deletions

View file

@ -31,8 +31,6 @@
#include <winver.h>
#define NDEBUG
#include <debug.h>
static UINT WINAPI
EnumDeviceDriverFilesCallback(IN PVOID Context,
@ -440,14 +438,14 @@ UpdateDriver(
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;
}
@ -458,7 +456,7 @@ UpdateDriver(
if (!AdjustTokenPrivileges(hToken, FALSE, &Privileges, 0, NULL, NULL))
{
DPRINT("AdjustTokenPrivileges failed\n");
ERR("AdjustTokenPrivileges failed\n");
CloseHandle(hToken);
return;
}
@ -466,7 +464,7 @@ UpdateDriver(
/* 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);
}
}
@ -1587,8 +1585,8 @@ ApplyGeneralSettings(IN HWND hwndDlg,
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
@ -2411,7 +2409,7 @@ DisplayDeviceAdvancedProperties(IN HWND hWndParent,
0,
&DevIdSize))
{
DPRINT1("SetupDiGetDeviceInstanceId unexpectedly returned TRUE!\n");
ERR("SetupDiGetDeviceInstanceId unexpectedly returned TRUE!\n");
return -1;
}
@ -2903,7 +2901,7 @@ DevicePropertiesExW(IN HWND hWndParent OPTIONAL,
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;
@ -2911,7 +2909,7 @@ DevicePropertiesExW(IN HWND hWndParent OPTIONAL,
if (bShowDevMgr)
{
DPRINT("DevPropertiesExW doesn't support bShowDevMgr!\n");
FIXME("DevPropertiesExW doesn't support bShowDevMgr!\n");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
}
else
@ -3132,7 +3130,7 @@ DeviceProperties_RunDLLW(HWND hWndParent,
szDeviceID,
szMachineName))
{
DPRINT1("DeviceProperties_RunDLLW DeviceID: %S, MachineName: %S\n", szDeviceID, szMachineName);
ERR("DeviceProperties_RunDLLW DeviceID: %S, MachineName: %S\n", szDeviceID, szMachineName);
return;
}

View file

@ -27,8 +27,6 @@
#include "precomp.h"
#define NDEBUG
#include <debug.h>
BOOL
ShowDeviceProblemWizard(IN HWND hWndParent OPTIONAL,

View file

@ -27,8 +27,6 @@
#include "precomp.h"
#define NDEBUG
#include <debug.h>
typedef struct _HWDEVINFO
{
@ -314,8 +312,8 @@ BuildDevicesList(IN PHARDWARE_PAGE_DATA hpd)
}
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;
}
}
@ -326,7 +324,7 @@ BuildDevicesList(IN PHARDWARE_PAGE_DATA hpd)
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;
}
}

View file

@ -9,8 +9,6 @@
#include "precomp.h"
#define NDEBUG
#include <debug.h>
typedef struct
{

View file

@ -27,8 +27,6 @@
#include "precomp.h"
#define NDEBUG
#include <debug.h>
HINSTANCE hDllInstance = NULL;
@ -954,7 +952,7 @@ FindCurrentDriver(IN HDEVINFO DeviceInfoSet,
DeviceInfoData,
&InstallParams))
{
DPRINT1("SetupDiSetDeviceInstallParams() failed with error 0x%lx\n", GetLastError());
ERR("SetupDiSetDeviceInstallParams() failed with error 0x%lx\n", GetLastError());
goto Cleanup;
}
@ -990,7 +988,7 @@ FindCurrentDriver(IN HDEVINFO DeviceInfoSet,
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;
}
@ -1004,14 +1002,14 @@ FindCurrentDriver(IN HDEVINFO DeviceInfoSet,
&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';
@ -1024,7 +1022,7 @@ FindCurrentDriver(IN HDEVINFO DeviceInfoSet,
DeviceInfoData,
&InstallParams))
{
DPRINT1("SetupDiSetDeviceInstallParams() failed with error 0x%lx\n", GetLastError());
ERR("SetupDiSetDeviceInstallParams() failed with error 0x%lx\n", GetLastError());
goto Cleanup;
}
@ -1033,7 +1031,7 @@ FindCurrentDriver(IN HDEVINFO DeviceInfoSet,
DeviceInfoData,
SPDIT_CLASSDRIVER))
{
DPRINT1("SetupDiBuildDriverInfoList() failed with error 0x%lx\n", GetLastError());
ERR("SetupDiBuildDriverInfoList() failed with error 0x%lx\n", GetLastError());
goto Cleanup;
}
@ -1047,14 +1045,14 @@ FindCurrentDriver(IN HDEVINFO DeviceInfoSet,
&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';
@ -1077,7 +1075,7 @@ FindCurrentDriver(IN HDEVINFO DeviceInfoSet,
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,
@ -1092,7 +1090,7 @@ FindCurrentDriver(IN HDEVINFO DeviceInfoSet,
}
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;
}

View file

@ -14,12 +14,13 @@
#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);

View file

@ -18,8 +18,6 @@
#include <windef.h>
#define NDEBUG
#include <debug.h>
/***************************************************************************
* NAME EXPORTED