implemented ansi stubs: SetupGetInfFileListA and SetupDiGetINFClassA

svn path=/trunk/; revision=18651
This commit is contained in:
Thomas Bluemel 2005-10-21 12:31:19 +00:00
parent 46559fcbf2
commit 661cb55a8a
2 changed files with 93 additions and 2 deletions

View file

@ -2074,6 +2074,52 @@ SetupGetInfFileListW(
return ret; return ret;
} }
/***********************************************************************
* SetupGetInfFileListA (SETUPAPI.@)
*/
BOOL WINAPI
SetupGetInfFileListA(
IN PCSTR DirectoryPath OPTIONAL,
IN DWORD InfStyle,
IN OUT PSTR ReturnBuffer OPTIONAL,
IN DWORD ReturnBufferSize OPTIONAL,
OUT PDWORD RequiredSize OPTIONAL)
{
PWSTR DirectoryPathW = NULL;
PWSTR ReturnBufferW = NULL;
BOOL ret = FALSE;
TRACE("%s %lx %p %ld %p\n", debugstr_a(DirectoryPath), InfStyle,
ReturnBuffer, ReturnBufferSize, RequiredSize);
if (DirectoryPath != NULL)
{
DirectoryPathW = MultiByteToUnicode(DirectoryPath, CP_ACP);
if (DirectoryPathW == NULL) goto Cleanup;
}
if (ReturnBuffer != NULL && ReturnBufferSize != 0)
{
ReturnBufferW = MyMalloc(ReturnBufferSize * sizeof(WCHAR));
if (ReturnBufferW == NULL) goto Cleanup;
}
ret = SetupGetInfFileListW(DirectoryPathW, InfStyle, ReturnBufferW, ReturnBufferSize, RequiredSize);
if (ret && ReturnBufferW != NULL)
{
ret = WideCharToMultiByte(CP_ACP, 0, ReturnBufferW, -1, ReturnBuffer, ReturnBufferSize, NULL, NULL) != 0;
}
Cleanup:
if (DirectoryPathW != NULL)
MyFree(DirectoryPathW);
if (ReturnBufferW != NULL)
MyFree(ReturnBufferW);
return ret;
}
/*********************************************************************** /***********************************************************************
* SetupDiGetINFClassW (SETUPAPI.@) * SetupDiGetINFClassW (SETUPAPI.@)
*/ */
@ -2153,3 +2199,48 @@ cleanup:
TRACE("Returning %d\n", ret); TRACE("Returning %d\n", ret);
return ret; return ret;
} }
/***********************************************************************
* SetupDiGetINFClassA (SETUPAPI.@)
*/
BOOL WINAPI SetupDiGetINFClassA(
IN PCSTR InfName,
OUT LPGUID ClassGuid,
OUT PSTR ClassName,
IN DWORD ClassNameSize,
OUT PDWORD RequiredSize OPTIONAL)
{
PWSTR InfNameW = NULL;
PWSTR ClassNameW = NULL;
BOOL ret = FALSE;
TRACE("%s %p %p %ld %p\n", debugstr_a(InfName), ClassGuid,
ClassName, ClassNameSize, RequiredSize);
if (InfName != NULL)
{
InfNameW = MultiByteToUnicode(InfName, CP_ACP);
if (InfNameW == NULL) goto Cleanup;
}
if (ClassName != NULL && ClassNameSize != 0)
{
ClassNameW = MyMalloc(ClassNameSize * sizeof(WCHAR));
if (ClassNameW == NULL) goto Cleanup;
}
ret = SetupDiGetINFClassW(InfNameW, ClassGuid, ClassNameW, ClassNameSize, RequiredSize);
if (ret && ClassNameW != NULL)
{
ret = WideCharToMultiByte(CP_ACP, 0, ClassNameW, -1, ClassName, ClassNameSize, NULL, NULL) != 0;
}
Cleanup:
if (InfNameW != NULL)
MyFree(InfNameW);
if (ClassNameW != NULL)
MyFree(ClassNameW);
return ret;
}

View file

@ -341,7 +341,7 @@
@ stub SetupDiGetHwProfileList @ stub SetupDiGetHwProfileList
@ stub SetupDiGetHwProfileListExA @ stub SetupDiGetHwProfileListExA
@ stub SetupDiGetHwProfileListExW @ stub SetupDiGetHwProfileListExW
@ stub SetupDiGetINFClassA @ stdcall SetupDiGetINFClassA(str ptr ptr long ptr)
@ stdcall SetupDiGetINFClassW(wstr ptr ptr long ptr) @ stdcall SetupDiGetINFClassW(wstr ptr ptr long ptr)
@ stub SetupDiGetSelectedDevice @ stub SetupDiGetSelectedDevice
@ stub SetupDiGetSelectedDriverA @ stub SetupDiGetSelectedDriverA
@ -401,7 +401,7 @@
@ stub SetupGetFileCompressionInfoW @ stub SetupGetFileCompressionInfoW
@ stdcall SetupGetFileQueueCount(long long ptr) @ stdcall SetupGetFileQueueCount(long long ptr)
@ stdcall SetupGetFileQueueFlags(long ptr) @ stdcall SetupGetFileQueueFlags(long ptr)
@ stub SetupGetInfFileListA @ stdcall SetupGetInfFileListA(str long str long ptr)
@ stdcall SetupGetInfFileListW(wstr long wstr long ptr) @ stdcall SetupGetInfFileListW(wstr long wstr long ptr)
@ stdcall SetupGetInfInformationA(ptr long ptr long ptr) @ stdcall SetupGetInfInformationA(ptr long ptr long ptr)
@ stdcall SetupGetInfInformationW(ptr long ptr long ptr) @ stdcall SetupGetInfInformationW(ptr long ptr long ptr)