#include <apitest.h>
#include <shlwapi.h>
#include "resource.h"
#include <pseh/pseh2.h>
Go to the source code of this file.
◆ execute_test()
Definition at line 14 of file SHLoadIndirectString.c.
15{
22
24
25
28
29
32 {
34 skip(
"%S loaded, cannot continue\n", DllFile);
35 return;
36 }
37
39
40
44 {
45
48
50
51
54
55
57 ok(
mod !=
NULL,
"Failed to load %S\n", DllFile);
58
60 {
64 }
65 }
67}
std::map< E_MODULE, HMODULE > mod
#define ok_hex(expression, result)
#define ok_ptr(expression, result)
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
HRESULT WINAPI SHLoadIndirectString(LPCWSTR src, LPWSTR dst, UINT dst_len, void **reserved)
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventA(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCSTR lpName OPTIONAL)
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
◆ extract_resource()
Definition at line 70 of file SHLoadIndirectString.c.
71{
79 if (!hRsrc)
81
85
89
91
93 {
96 }
99 ok(dwWritten ==
Size,
"WriteFile wrote %lu bytes instead of %lu\n", dwWritten,
Size);
102
105}
#define INVALID_HANDLE_VALUE
#define FILE_ATTRIBUTE_NORMAL
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
HRSRC WINAPI FindResourceW(HINSTANCE hModule, LPCWSTR name, LPCWSTR type)
DWORD WINAPI SizeofResource(HINSTANCE hModule, HRSRC hRsrc)
LPVOID WINAPI LockResource(HGLOBAL handle)
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
IN PVCB IN PBCB OUT PDIRENT IN USHORT IN POEM_STRING Filename
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
DWORD WINAPI GetLastError(void)
#define UnlockResource(handle)
Referenced by START_TEST().
◆ START_TEST()
Definition at line 107 of file SHLoadIndirectString.c.
108{
112
115
118
120 {
122 {
124 }
126 {
127 ok(0,
"Ldr didnt handle exception\n");
128 }
130 }
131 else
132 {
133 ok(0,
"Failed to extract resource\n");
134 }
135
137}
BOOL extract_resource(const WCHAR *Filename, LPCWSTR ResourceName)
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
DWORD WINAPI GetTempPathW(IN DWORD count, OUT LPWSTR path)
UINT WINAPI GetTempFileNameW(IN LPCWSTR lpPathName, IN LPCWSTR lpPrefixString, IN UINT uUnique, OUT LPWSTR lpTempFileName)
#define EXCEPTION_EXECUTE_HANDLER
static void execute_test(void)
static char workdir[MAX_PATH]
_In_ ULONG _In_ ULONG _In_ ULONG Length
#define _SEH2_EXCEPT(...)