10#define WIN32_NO_STATUS
20 "Signature=\"$Windows NT$\"\n"
22 "ClassGuid={12345678-1234-1234-1234-123456789ABC}\n"
25 "%TestMfg%=TestModels,NTx86,NTamd64,NT\n"
27 "[TestModels.NTx86]\n"
28 "%DeviceDesc%=InstallSection,TEST\\VID_1234&PID_5678\n"
30 "[TestModels.NTamd64]\n"
31 "%DeviceDesc%=InstallSection,TEST\\VID_1234&PID_5678\n"
34 "%DeviceDesc%=InstallSection,TEST\\VID_1234&PID_5678\n"
37 "%DeviceDesc%=InstallSection,TEST\\VID_1234&PID_5678\n"
42 "TestMfg=\"Test Manufacturer\"\n"
43 "DeviceDesc=\"Test Device\"\n";
88 ok(!
ret,
"Expected failure with NULL Context\n");
90 "Expected ERROR_INVALID_PARAMETER, got %lu\n",
GetLastError());
95 ok(
ret,
"SetupDiGetActualModelsSectionW (size query) failed: %lu\n",
GetLastError());
103 ok(
Buffer[0] != 0,
"Expected non-empty section name\n");
112 ok(!
ret,
"Expected failure with tiny buffer\n");
114 "Expected ERROR_INSUFFICIENT_BUFFER, got %lu\n",
GetLastError());
142 ok(
ret,
"SetupFindFirstLineA failed\n");
147 ok(
ret,
"SetupDiGetActualModelsSectionA (size query) failed: %lu\n",
GetLastError());
154 ok(
Buffer[0] != 0,
"Expected non-empty section name\n");
static void test_SetupDiGetActualModelsSectionA(void)
static void test_SetupDiGetActualModelsSectionW(void)
static const char TestInfData[]
static void create_test_inf(LPCSTR filename)
#define ERROR_INSUFFICIENT_BUFFER
#define ERROR_INVALID_PARAMETER
#define INVALID_HANDLE_VALUE
#define CreateFileA(a, b, c, d, e, f, g)
#define FILE_ATTRIBUTE_NORMAL
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
BOOL WINAPI WriteFile(_In_ HANDLE hFile, _In_reads_bytes_opt_(nNumberOfBytesToWrite) LPCVOID lpBuffer, _In_ DWORD nNumberOfBytesToWrite, _Out_opt_ LPDWORD lpNumberOfBytesWritten, _Inout_opt_ LPOVERLAPPED lpOverlapped)
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
BOOL WINAPI SetupDiGetActualModelsSectionA(_In_ PINFCONTEXT Context, _In_opt_ PSP_ALTPLATFORM_INFO AlternatePlatformInfo, _Out_writes_opt_(InfSectionWithExtSize) PSTR InfSectionWithExt, _In_ DWORD InfSectionWithExtSize, _Out_opt_ PDWORD RequiredSize, _Reserved_ PVOID Reserved)
ANSI version of SetupDiGetActualModelsSectionW.
BOOL WINAPI SetupDiGetActualModelsSectionW(_In_ PINFCONTEXT Context, _In_opt_ PSP_ALTPLATFORM_INFO AlternatePlatformInfo, _Out_writes_opt_(InfSectionWithExtSize) PWSTR InfSectionWithExt, _In_ DWORD InfSectionWithExtSize, _Out_opt_ PDWORD RequiredSize, _Reserved_ PVOID Reserved)
Returns the appropriate decorated INF Models section for a device.
BOOL WINAPI SetupFindFirstLineA(HINF hinf, PCSTR section, PCSTR key, INFCONTEXT *context)
HINF WINAPI SetupOpenInfFileA(PCSTR name, PCSTR class, DWORD style, UINT *error)
LPSTR WINAPI lstrcatA(LPSTR lpString1, LPCSTR lpString2)
_In_ PMEMORY_AREA _In_ PVOID _In_ BOOLEAN _Inout_ PMM_REQUIRED_RESOURCES Required
#define SetupDiGetActualModelsSection
BOOL WINAPI SetupFindFirstLineW(IN HINF InfHandle, IN PCWSTR Section, IN PCWSTR Key, IN OUT PINFCONTEXT Context)
VOID WINAPI SetupCloseInfFile(IN HINF InfHandle)
DWORD WINAPI GetLastError(void)