******** Partially revert commit 66feb11cfe

[SETUPAPI]
Rename functions according to the new naming scheme:
  CaptureAndConvertAnsiArg --> pSetupCaptureAndConvertAnsiArg
  CenterWindowRelativeToParent --> pSetupCenterWindowRelativeToParent
  ConcatenatePaths --> pSetupConcatenatePaths
  DuplicateString --> pSetupDuplicateString
  EnablePrivilege --> pSetupEnablePrivilege
  GetVersionInfoFromImage --> pSetupGetVersionInfoFromImage
  IsUserAdmin --> pSetupIsUserAdmin
  MultiByteToUnicode --> pSetupMultiByteToUnicode
  MyGetFileTitle --> pSetupGetFileTitle
  OpenAndMapForRead --> pSetupOpenAndMapForRead
  RegistryDelnode --> pSetupRegistryDelnode
  UnicodeToMultiByte --> pSetupUnicodeToMultiByte
  UnmapAndCloseFile --> pSetupUnmapAndCloseFile

svn path=/trunk/; revision=50915
This commit is contained in:
Hermès Bélusca-Maïto 2023-12-29 16:11:23 +01:00
parent 83c9e83b1b
commit 8422291724
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
3 changed files with 80 additions and 58 deletions

View file

@ -688,7 +688,7 @@ BOOL WINAPI SetupDiBuildClassInfoListExA(
if (MachineName) if (MachineName)
{ {
MachineNameW = pSetupMultiByteToUnicode(MachineName, CP_ACP); MachineNameW = MultiByteToUnicode(MachineName, CP_ACP);
if (MachineNameW == NULL) return FALSE; if (MachineNameW == NULL) return FALSE;
} }
@ -900,13 +900,13 @@ BOOL WINAPI SetupDiClassGuidsFromNameExA(
return FALSE; return FALSE;
} }
ClassNameW = pSetupMultiByteToUnicode(ClassName, CP_ACP); ClassNameW = MultiByteToUnicode(ClassName, CP_ACP);
if (ClassNameW == NULL) if (ClassNameW == NULL)
return FALSE; return FALSE;
if (MachineName) if (MachineName)
{ {
MachineNameW = pSetupMultiByteToUnicode(MachineName, CP_ACP); MachineNameW = MultiByteToUnicode(MachineName, CP_ACP);
if (MachineNameW == NULL) if (MachineNameW == NULL)
{ {
MyFree(ClassNameW); MyFree(ClassNameW);
@ -1091,7 +1091,7 @@ BOOL WINAPI SetupDiClassNameFromGuidExA(
BOOL ret; BOOL ret;
if (MachineName) if (MachineName)
MachineNameW = pSetupMultiByteToUnicode(MachineName, CP_ACP); MachineNameW = MultiByteToUnicode(MachineName, CP_ACP);
ret = SetupDiClassNameFromGuidExW(ClassGuid, ClassNameW, MAX_CLASS_NAME_LEN, ret = SetupDiClassNameFromGuidExW(ClassGuid, ClassNameW, MAX_CLASS_NAME_LEN,
RequiredSize, MachineNameW, Reserved); RequiredSize, MachineNameW, Reserved);
if (ret) if (ret)
@ -1225,7 +1225,7 @@ SetupDiCreateDeviceInfoListExA(const GUID *ClassGuid,
if (MachineName) if (MachineName)
{ {
MachineNameW = pSetupMultiByteToUnicode(MachineName, CP_ACP); MachineNameW = MultiByteToUnicode(MachineName, CP_ACP);
if (MachineNameW == NULL) if (MachineNameW == NULL)
return INVALID_HANDLE_VALUE; return INVALID_HANDLE_VALUE;
} }
@ -1374,7 +1374,7 @@ HKEY WINAPI SetupDiCreateDevRegKeyA(
} }
else else
{ {
InfSectionNameW = pSetupMultiByteToUnicode(InfSectionName, CP_ACP); InfSectionNameW = MultiByteToUnicode(InfSectionName, CP_ACP);
if (InfSectionNameW == NULL) return INVALID_HANDLE_VALUE; if (InfSectionNameW == NULL) return INVALID_HANDLE_VALUE;
} }
} }
@ -1542,12 +1542,12 @@ BOOL WINAPI SetupDiCreateDeviceInfoA(
if (DeviceName) if (DeviceName)
{ {
DeviceNameW = pSetupMultiByteToUnicode(DeviceName, CP_ACP); DeviceNameW = MultiByteToUnicode(DeviceName, CP_ACP);
if (DeviceNameW == NULL) return FALSE; if (DeviceNameW == NULL) return FALSE;
} }
if (DeviceDescription) if (DeviceDescription)
{ {
DeviceDescriptionW = pSetupMultiByteToUnicode(DeviceDescription, CP_ACP); DeviceDescriptionW = MultiByteToUnicode(DeviceDescription, CP_ACP);
if (DeviceDescriptionW == NULL) if (DeviceDescriptionW == NULL)
{ {
MyFree(DeviceNameW); MyFree(DeviceNameW);
@ -2013,7 +2013,7 @@ SetupDiGetActualSectionToInstallExA(
if (InfSectionName) if (InfSectionName)
{ {
InfSectionNameW = pSetupMultiByteToUnicode(InfSectionName, CP_ACP); InfSectionNameW = MultiByteToUnicode(InfSectionName, CP_ACP);
if (InfSectionNameW == NULL) if (InfSectionNameW == NULL)
goto cleanup; goto cleanup;
} }
@ -2110,7 +2110,7 @@ BOOL WINAPI SetupDiGetClassDescriptionExA(
if (MachineName) if (MachineName)
{ {
MachineNameW = pSetupMultiByteToUnicode(MachineName, CP_ACP); MachineNameW = MultiByteToUnicode(MachineName, CP_ACP);
if (!MachineNameW) if (!MachineNameW)
{ {
SetLastError(ERROR_NOT_ENOUGH_MEMORY); SetLastError(ERROR_NOT_ENOUGH_MEMORY);
@ -2260,7 +2260,7 @@ HDEVINFO WINAPI SetupDiGetClassDevsExA(
if (enumstr) if (enumstr)
{ {
enumstrW = pSetupMultiByteToUnicode(enumstr, CP_ACP); enumstrW = MultiByteToUnicode(enumstr, CP_ACP);
if (!enumstrW) if (!enumstrW)
{ {
ret = INVALID_HANDLE_VALUE; ret = INVALID_HANDLE_VALUE;
@ -2269,7 +2269,7 @@ HDEVINFO WINAPI SetupDiGetClassDevsExA(
} }
if (machine) if (machine)
{ {
machineW = pSetupMultiByteToUnicode(machine, CP_ACP); machineW = MultiByteToUnicode(machine, CP_ACP);
if (!machineW) if (!machineW)
{ {
MyFree(enumstrW); MyFree(enumstrW);
@ -2515,7 +2515,7 @@ BOOL WINAPI SetupDiCreateDeviceInterfaceA(
if (ReferenceString) if (ReferenceString)
{ {
ReferenceStringW = pSetupMultiByteToUnicode(ReferenceString, CP_ACP); ReferenceStringW = MultiByteToUnicode(ReferenceString, CP_ACP);
if (ReferenceStringW == NULL) return FALSE; if (ReferenceStringW == NULL) return FALSE;
} }
@ -2596,7 +2596,7 @@ HKEY WINAPI SetupDiCreateDeviceInterfaceRegKeyA(
SetLastError(ERROR_INVALID_PARAMETER); SetLastError(ERROR_INVALID_PARAMETER);
return INVALID_HANDLE_VALUE; return INVALID_HANDLE_VALUE;
} }
InfSectionNameW = pSetupMultiByteToUnicode(InfSectionName, CP_ACP); InfSectionNameW = MultiByteToUnicode(InfSectionName, CP_ACP);
if (!InfSectionNameW) if (!InfSectionNameW)
return INVALID_HANDLE_VALUE; return INVALID_HANDLE_VALUE;
} }
@ -3499,7 +3499,7 @@ SetupDiInstallClassExA(
} }
else else
{ {
InfFileNameW = pSetupMultiByteToUnicode(InfFileName, CP_ACP); InfFileNameW = MultiByteToUnicode(InfFileName, CP_ACP);
if (InfFileNameW == NULL) if (InfFileNameW == NULL)
{ {
SetLastError(ERROR_NOT_ENOUGH_MEMORY); SetLastError(ERROR_NOT_ENOUGH_MEMORY);
@ -3642,7 +3642,7 @@ HKEY WINAPI SetupDiOpenClassRegKeyExA(
if (MachineName) if (MachineName)
{ {
MachineNameW = pSetupMultiByteToUnicode(MachineName, CP_ACP); MachineNameW = MultiByteToUnicode(MachineName, CP_ACP);
if (MachineNameW == NULL) if (MachineNameW == NULL)
return INVALID_HANDLE_VALUE; return INVALID_HANDLE_VALUE;
} }
@ -3984,7 +3984,7 @@ BOOL WINAPI SetupDiOpenDeviceInterfaceA(
TRACE("%s(%p %s %08lx %p)\n", __FUNCTION__, DeviceInfoSet, debugstr_a(DevicePath), OpenFlags, DeviceInterfaceData); TRACE("%s(%p %s %08lx %p)\n", __FUNCTION__, DeviceInfoSet, debugstr_a(DevicePath), OpenFlags, DeviceInterfaceData);
DevicePathW = pSetupMultiByteToUnicode(DevicePath, CP_ACP); DevicePathW = MultiByteToUnicode(DevicePath, CP_ACP);
if (DevicePathW == NULL) if (DevicePathW == NULL)
return FALSE; return FALSE;
@ -4754,7 +4754,7 @@ SetupDiOpenDeviceInfoA(
TRACE("%s(%p %s %p %lx %p)\n", __FUNCTION__, DeviceInfoSet, DeviceInstanceId, hwndParent, OpenFlags, DeviceInfoData); TRACE("%s(%p %s %p %lx %p)\n", __FUNCTION__, DeviceInfoSet, DeviceInstanceId, hwndParent, OpenFlags, DeviceInfoData);
DeviceInstanceIdW = pSetupMultiByteToUnicode(DeviceInstanceId, CP_ACP); DeviceInstanceIdW = MultiByteToUnicode(DeviceInstanceId, CP_ACP);
if (DeviceInstanceIdW == NULL) if (DeviceInstanceIdW == NULL)
return FALSE; return FALSE;

View file

@ -24,6 +24,22 @@
#include <winver.h> #include <winver.h>
#include <lzexpand.h> #include <lzexpand.h>
#define _PSETUP(func) pSetup ## func
#define CaptureAndConvertAnsiArg _PSETUP(CaptureAndConvertAnsiArg)
#define CenterWindowRelativeToParent _PSETUP(CenterWindowRelativeToParent)
#define ConcatenatePaths _PSETUP(ConcatenatePaths)
#define DuplicateString _PSETUP(DuplicateString)
#define EnablePrivilege _PSETUP(EnablePrivilege)
#define GetVersionInfoFromImage _PSETUP(GetVersionInfoFromImage)
#define IsUserAdmin _PSETUP(IsUserAdmin)
#define MultiByteToUnicode _PSETUP(MultiByteToUnicode)
#define OpenAndMapFileForRead _PSETUP(OpenAndMapFileForRead)
#define UnicodeToMultiByte _PSETUP(UnicodeToMultiByte)
#define UnmapAndCloseFile _PSETUP(UnmapAndCloseFile)
/* Unicode constants */ /* Unicode constants */
static const WCHAR BackSlash[] = {'\\',0}; static const WCHAR BackSlash[] = {'\\',0};
static const WCHAR TranslationRegKey[] = {'\\','V','e','r','F','i','l','e','I','n','f','o','\\','T','r','a','n','s','l','a','t','i','o','n',0}; static const WCHAR TranslationRegKey[] = {'\\','V','e','r','F','i','l','e','I','n','f','o','\\','T','r','a','n','s','l','a','t','i','o','n',0};
@ -76,7 +92,7 @@ GetFunctionPointer(
Comma++; Comma++;
/* W->A conversion for function name */ /* W->A conversion for function name */
FunctionNameA = pSetupUnicodeToMultiByte(Comma, CP_ACP); FunctionNameA = UnicodeToMultiByte(Comma, CP_ACP);
if (!FunctionNameA) if (!FunctionNameA)
{ {
rc = GetLastError(); rc = GetLastError();
@ -181,7 +197,7 @@ LPVOID WINAPI MyRealloc(LPVOID lpSrc, DWORD dwSize)
/************************************************************************** /**************************************************************************
* pSetupDuplicateString [SETUPAPI.@] * DuplicateString [SETUPAPI.@]
* *
* Duplicates a unicode string. * Duplicates a unicode string.
* *
@ -195,7 +211,7 @@ LPVOID WINAPI MyRealloc(LPVOID lpSrc, DWORD dwSize)
* NOTES * NOTES
* Call MyFree() to release the duplicated string. * Call MyFree() to release the duplicated string.
*/ */
LPWSTR WINAPI pSetupDuplicateString(LPCWSTR lpSrc) LPWSTR WINAPI DuplicateString(LPCWSTR lpSrc)
{ {
LPWSTR lpDst; LPWSTR lpDst;
@ -263,7 +279,7 @@ LONG WINAPI QueryRegistryValue(HKEY hKey,
/************************************************************************** /**************************************************************************
* pSetupMultiByteToUnicode [SETUPAPI.@] * MultiByteToUnicode [SETUPAPI.@]
* *
* Converts a multi-byte string to a Unicode string. * Converts a multi-byte string to a Unicode string.
* *
@ -278,7 +294,7 @@ LONG WINAPI QueryRegistryValue(HKEY hKey,
* NOTE * NOTE
* Use MyFree to release the returned Unicode string. * Use MyFree to release the returned Unicode string.
*/ */
LPWSTR WINAPI pSetupMultiByteToUnicode(LPCSTR lpMultiByteStr, UINT uCodePage) LPWSTR WINAPI MultiByteToUnicode(LPCSTR lpMultiByteStr, UINT uCodePage)
{ {
LPWSTR lpUnicodeStr; LPWSTR lpUnicodeStr;
int nLength; int nLength;
@ -309,7 +325,7 @@ LPWSTR WINAPI pSetupMultiByteToUnicode(LPCSTR lpMultiByteStr, UINT uCodePage)
/************************************************************************** /**************************************************************************
* pSetupUnicodeToMultiByte [SETUPAPI.@] * UnicodeToMultiByte [SETUPAPI.@]
* *
* Converts a Unicode string to a multi-byte string. * Converts a Unicode string to a multi-byte string.
* *
@ -324,7 +340,7 @@ LPWSTR WINAPI pSetupMultiByteToUnicode(LPCSTR lpMultiByteStr, UINT uCodePage)
* NOTE * NOTE
* Use MyFree to release the returned multi-byte string. * Use MyFree to release the returned multi-byte string.
*/ */
LPSTR WINAPI pSetupUnicodeToMultiByte(LPCWSTR lpUnicodeStr, UINT uCodePage) LPSTR WINAPI UnicodeToMultiByte(LPCWSTR lpUnicodeStr, UINT uCodePage)
{ {
LPSTR lpMultiByteStr; LPSTR lpMultiByteStr;
int nLength; int nLength;
@ -424,7 +440,7 @@ BOOL WINAPI DoesUserHavePrivilege(LPCWSTR lpPrivilegeName)
/************************************************************************** /**************************************************************************
* pSetupEnablePrivilege [SETUPAPI.@] * EnablePrivilege [SETUPAPI.@]
* *
* Enables or disables one of the current users privileges. * Enables or disables one of the current users privileges.
* *
@ -437,7 +453,7 @@ BOOL WINAPI DoesUserHavePrivilege(LPCWSTR lpPrivilegeName)
* Success: TRUE * Success: TRUE
* Failure: FALSE * Failure: FALSE
*/ */
BOOL WINAPI pSetupEnablePrivilege(LPCWSTR lpPrivilegeName, BOOL bEnable) BOOL WINAPI EnablePrivilege(LPCWSTR lpPrivilegeName, BOOL bEnable)
{ {
TOKEN_PRIVILEGES Privileges; TOKEN_PRIVILEGES Privileges;
HANDLE hToken; HANDLE hToken;
@ -549,14 +565,14 @@ DWORD WINAPI CaptureStringArg(LPCWSTR pSrc, LPWSTR *pDst)
if (pDst == NULL) if (pDst == NULL)
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
*pDst = pSetupDuplicateString(pSrc); *pDst = DuplicateString(pSrc);
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
/************************************************************************** /**************************************************************************
* pSetupCaptureAndConvertAnsiArg [SETUPAPI.@] * CaptureAndConvertAnsiArg [SETUPAPI.@]
* *
* Captures an ANSI string and converts it to a UNICODE string. * Captures an ANSI string and converts it to a UNICODE string.
* *
@ -571,19 +587,19 @@ DWORD WINAPI CaptureStringArg(LPCWSTR pSrc, LPWSTR *pDst)
* NOTE * NOTE
* Call MyFree to release the captured UNICODE string. * Call MyFree to release the captured UNICODE string.
*/ */
DWORD WINAPI pSetupCaptureAndConvertAnsiArg(LPCSTR pSrc, LPWSTR *pDst) DWORD WINAPI CaptureAndConvertAnsiArg(LPCSTR pSrc, LPWSTR *pDst)
{ {
if (pDst == NULL) if (pDst == NULL)
return ERROR_INVALID_PARAMETER; return ERROR_INVALID_PARAMETER;
*pDst = pSetupMultiByteToUnicode(pSrc, CP_ACP); *pDst = MultiByteToUnicode(pSrc, CP_ACP);
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
/************************************************************************** /**************************************************************************
* pSetupOpenAndMapFileForRead [SETUPAPI.@] * OpenAndMapFileForRead [SETUPAPI.@]
* *
* Open and map a file to a buffer. * Open and map a file to a buffer.
* *
@ -601,11 +617,11 @@ DWORD WINAPI pSetupCaptureAndConvertAnsiArg(LPCSTR pSrc, LPWSTR *pDst)
* NOTE * NOTE
* Call UnmapAndCloseFile to release the file. * Call UnmapAndCloseFile to release the file.
*/ */
DWORD WINAPI pSetupOpenAndMapFileForRead(LPCWSTR lpFileName, DWORD WINAPI OpenAndMapFileForRead(LPCWSTR lpFileName,
LPDWORD lpSize, LPDWORD lpSize,
LPHANDLE lpFile, LPHANDLE lpFile,
LPHANDLE lpMapping, LPHANDLE lpMapping,
LPVOID *lpBuffer) LPVOID *lpBuffer)
{ {
DWORD dwError; DWORD dwError;
@ -648,7 +664,7 @@ DWORD WINAPI pSetupOpenAndMapFileForRead(LPCWSTR lpFileName,
/************************************************************************** /**************************************************************************
* pSetupUnmapAndCloseFile [SETUPAPI.@] * UnmapAndCloseFile [SETUPAPI.@]
* *
* Unmap and close a mapped file. * Unmap and close a mapped file.
* *
@ -661,7 +677,7 @@ DWORD WINAPI pSetupOpenAndMapFileForRead(LPCWSTR lpFileName,
* Success: TRUE * Success: TRUE
* Failure: FALSE * Failure: FALSE
*/ */
BOOL WINAPI pSetupUnmapAndCloseFile(HANDLE hFile, HANDLE hMapping, LPVOID lpBuffer) BOOL WINAPI UnmapAndCloseFile(HANDLE hFile, HANDLE hMapping, LPVOID lpBuffer)
{ {
TRACE("%p %p %p\n", TRACE("%p %p %p\n",
hFile, hMapping, lpBuffer); hFile, hMapping, lpBuffer);
@ -1022,7 +1038,7 @@ pSetupGetFileTitle(LPCWSTR lpFileName)
/************************************************************************** /**************************************************************************
* pSetupConcatenatePaths [SETUPAPI.@] * ConcatenatePaths [SETUPAPI.@]
* *
* Concatenates two paths. * Concatenates two paths.
* *
@ -1037,10 +1053,10 @@ pSetupGetFileTitle(LPCWSTR lpFileName)
* Failure: FALSE * Failure: FALSE
*/ */
BOOL WINAPI BOOL WINAPI
pSetupConcatenatePaths(LPWSTR lpPath, ConcatenatePaths(LPWSTR lpPath,
LPCWSTR lpAppend, LPCWSTR lpAppend,
DWORD dwBufferSize, DWORD dwBufferSize,
LPDWORD lpRequiredSize) LPDWORD lpRequiredSize)
{ {
DWORD dwPathSize; DWORD dwPathSize;
DWORD dwAppendSize; DWORD dwAppendSize;
@ -1094,7 +1110,7 @@ pSetupConcatenatePaths(LPWSTR lpPath,
/************************************************************************** /**************************************************************************
* pSetupCenterWindowRelativeToParent [SETUPAPI.@] * CenterWindowRelativeToParent [SETUPAPI.@]
* *
* Centers a window relative to its parent. * Centers a window relative to its parent.
* *
@ -1105,7 +1121,7 @@ pSetupConcatenatePaths(LPWSTR lpPath,
* None * None
*/ */
VOID WINAPI VOID WINAPI
pSetupCenterWindowRelativeToParent(HWND hwnd) CenterWindowRelativeToParent(HWND hwnd)
{ {
HWND hwndOwner; HWND hwndOwner;
POINT ptOrigin; POINT ptOrigin;
@ -1140,7 +1156,7 @@ pSetupCenterWindowRelativeToParent(HWND hwnd)
/************************************************************************** /**************************************************************************
* pSetupGetVersionInfoFromImage [SETUPAPI.@] * GetVersionInfoFromImage [SETUPAPI.@]
* *
* Retrieves version information for a given file. * Retrieves version information for a given file.
* *
@ -1155,9 +1171,9 @@ pSetupCenterWindowRelativeToParent(HWND hwnd)
* Failure: FALSE * Failure: FALSE
*/ */
BOOL WINAPI BOOL WINAPI
pSetupGetVersionInfoFromImage(LPWSTR lpFileName, GetVersionInfoFromImage(LPWSTR lpFileName,
PULARGE_INTEGER lpFileVersion, PULARGE_INTEGER lpFileVersion,
LPWORD lpVersionVarSize) LPWORD lpVersionVarSize)
{ {
DWORD dwHandle; DWORD dwHandle;
DWORD dwSize; DWORD dwSize;
@ -1419,7 +1435,7 @@ BOOL WINAPI SetupGetFileCompressionInfoExA( PCSTR source, PSTR name, DWORD len,
TRACE("%s, %p, %d, %p, %p, %p, %p\n", debugstr_a(source), name, len, required, TRACE("%s, %p, %d, %p, %p, %p, %p\n", debugstr_a(source), name, len, required,
source_size, target_size, type); source_size, target_size, type);
if (!source || !(sourceW = pSetupMultiByteToUnicode( source, CP_ACP ))) return FALSE; if (!source || !(sourceW = MultiByteToUnicode( source, CP_ACP ))) return FALSE;
if (name) if (name)
{ {
@ -1433,7 +1449,7 @@ BOOL WINAPI SetupGetFileCompressionInfoExA( PCSTR source, PSTR name, DWORD len,
ret = SetupGetFileCompressionInfoExW( sourceW, nameW, nb_chars, &nb_chars, source_size, target_size, type ); ret = SetupGetFileCompressionInfoExW( sourceW, nameW, nb_chars, &nb_chars, source_size, target_size, type );
if (ret) if (ret)
{ {
if ((nameA = pSetupUnicodeToMultiByte( nameW, CP_ACP ))) if ((nameA = UnicodeToMultiByte( nameW, CP_ACP )))
{ {
if (name && len >= nb_chars) lstrcpyA( name, nameA ); if (name && len >= nb_chars) lstrcpyA( name, nameA );
else else
@ -1658,8 +1674,8 @@ DWORD WINAPI SetupDecompressOrCopyFileA( PCSTR source, PCSTR target, PUINT type
DWORD ret = 0; DWORD ret = 0;
WCHAR *sourceW = NULL, *targetW = NULL; WCHAR *sourceW = NULL, *targetW = NULL;
if (source && !(sourceW = pSetupMultiByteToUnicode( source, CP_ACP ))) return FALSE; if (source && !(sourceW = MultiByteToUnicode( source, CP_ACP ))) return FALSE;
if (target && !(targetW = pSetupMultiByteToUnicode( target, CP_ACP ))) if (target && !(targetW = MultiByteToUnicode( target, CP_ACP )))
{ {
MyFree( sourceW ); MyFree( sourceW );
return ERROR_NOT_ENOUGH_MEMORY; return ERROR_NOT_ENOUGH_MEMORY;
@ -1814,7 +1830,7 @@ pSetupIsGuidNull(LPGUID lpGUID)
*/ */
BOOL BOOL
WINAPI WINAPI
pSetupIsUserAdmin(VOID) IsUserAdmin(VOID)
{ {
SID_IDENTIFIER_AUTHORITY Authority = {SECURITY_NT_AUTHORITY}; SID_IDENTIFIER_AUTHORITY Authority = {SECURITY_NT_AUTHORITY};
BOOL bResult = FALSE; BOOL bResult = FALSE;
@ -1851,7 +1867,7 @@ HSPFILELOG WINAPI SetupInitializeFileLogW(LPCWSTR LogFileName, DWORD Flags)
if (Flags & SPFILELOG_SYSTEMLOG) if (Flags & SPFILELOG_SYSTEMLOG)
{ {
if (!pSetupIsUserAdmin() && !(Flags & SPFILELOG_QUERYONLY)) if (!IsUserAdmin() && !(Flags & SPFILELOG_QUERYONLY))
{ {
/* insufficient privileges */ /* insufficient privileges */
SetLastError(ERROR_ACCESS_DENIED); SetLastError(ERROR_ACCESS_DENIED);

View file

@ -20,10 +20,16 @@
#include "setupapi_private.h" #include "setupapi_private.h"
#define _PSETUP(func) pSetup ## func
#define RegistryDelnode _PSETUP(RegistryDelnode)
/*********************************************************************** /***********************************************************************
* pSetupRegistryDelnode(SETUPAPI.@) * RegistryDelnode(SETUPAPI.@)
*/ */
BOOL WINAPI pSetupRegistryDelnode(DWORD x, DWORD y) BOOL WINAPI RegistryDelnode(DWORD x, DWORD y)
{ {
FIXME("%08x %08x: stub\n", x, y); FIXME("%08x %08x: stub\n", x, y);
return FALSE; return FALSE;