implemented ansi stubs: SetupGetInfFileListA and SetupDiGetINFClassA
Modified: trunk/reactos/lib/setupapi/parser.c
Modified: trunk/reactos/lib/setupapi/setupapi.spec
_____
Modified: trunk/reactos/lib/setupapi/parser.c
--- trunk/reactos/lib/setupapi/parser.c 2005-10-21 10:13:26 UTC (rev
18650)
+++ trunk/reactos/lib/setupapi/parser.c 2005-10-21 12:31:19 UTC (rev
18651)
@@ -2075,6 +2075,52 @@
}
/***********************************************************************
+ * 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.@)
*/
BOOL WINAPI
@@ -2153,3 +2199,48 @@
TRACE("Returning %d\n", 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;
+}
_____
Modified: trunk/reactos/lib/setupapi/setupapi.spec
--- trunk/reactos/lib/setupapi/setupapi.spec 2005-10-21 10:13:26 UTC
(rev 18650)
+++ trunk/reactos/lib/setupapi/setupapi.spec 2005-10-21 12:31:19 UTC
(rev 18651)
@@ -341,7 +341,7 @@
@ stub SetupDiGetHwProfileList
@ stub SetupDiGetHwProfileListExA
@ stub SetupDiGetHwProfileListExW
-@ stub SetupDiGetINFClassA
+@ stdcall SetupDiGetINFClassA(str ptr ptr long ptr)
@ stdcall SetupDiGetINFClassW(wstr ptr ptr long ptr)
@ stub SetupDiGetSelectedDevice
@ stub SetupDiGetSelectedDriverA
@@ -401,7 +401,7 @@
@ stub SetupGetFileCompressionInfoW
@ stdcall SetupGetFileQueueCount(long long ptr)
@ stdcall SetupGetFileQueueFlags(long ptr)
-@ stub SetupGetInfFileListA
+@ stdcall SetupGetInfFileListA(str long str long ptr)
@ stdcall SetupGetInfFileListW(wstr long wstr long ptr)
@ stdcall SetupGetInfInformationA(ptr long ptr long ptr)
@ stdcall SetupGetInfInformationW(ptr long ptr long ptr)