Remove unneeded checks on the GetModuleHandle() return value for cases where we are linked with the dll.
This commit is contained in:
parent
ebfeb41e99
commit
d9e8a0f63e
@ -70,8 +70,6 @@ static void init_function_pointers(void)
|
|||||||
{
|
{
|
||||||
hadvapi32 = GetModuleHandleA("advapi32.dll");
|
hadvapi32 = GetModuleHandleA("advapi32.dll");
|
||||||
|
|
||||||
if(hadvapi32)
|
|
||||||
{
|
|
||||||
pCryptAcquireContextA = (void*)GetProcAddress(hadvapi32, "CryptAcquireContextA");
|
pCryptAcquireContextA = (void*)GetProcAddress(hadvapi32, "CryptAcquireContextA");
|
||||||
pCryptEnumProviderTypesA = (void*)GetProcAddress(hadvapi32, "CryptEnumProviderTypesA");
|
pCryptEnumProviderTypesA = (void*)GetProcAddress(hadvapi32, "CryptEnumProviderTypesA");
|
||||||
pCryptEnumProvidersA = (void*)GetProcAddress(hadvapi32, "CryptEnumProvidersA");
|
pCryptEnumProvidersA = (void*)GetProcAddress(hadvapi32, "CryptEnumProvidersA");
|
||||||
@ -102,7 +100,6 @@ static void init_function_pointers(void)
|
|||||||
pCryptSetKeyParam = (void*)GetProcAddress(hadvapi32, "CryptSetKeyParam");
|
pCryptSetKeyParam = (void*)GetProcAddress(hadvapi32, "CryptSetKeyParam");
|
||||||
pCryptSetProvParam = (void*)GetProcAddress(hadvapi32, "CryptSetProvParam");
|
pCryptSetProvParam = (void*)GetProcAddress(hadvapi32, "CryptSetProvParam");
|
||||||
pCryptVerifySignatureW = (void*)GetProcAddress(hadvapi32, "CryptVerifySignatureW");
|
pCryptVerifySignatureW = (void*)GetProcAddress(hadvapi32, "CryptVerifySignatureW");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void init_environment(void)
|
static void init_environment(void)
|
||||||
|
@ -77,7 +77,7 @@ static void test_md5_ctx(void)
|
|||||||
{ 0x43, 0x03, 0xdd, 0x8c, 0x60, 0xd9, 0x3a, 0x22,
|
{ 0x43, 0x03, 0xdd, 0x8c, 0x60, 0xd9, 0x3a, 0x22,
|
||||||
0x0b, 0x28, 0xd0, 0xb2, 0x65, 0x93, 0xd0, 0x36 };
|
0x0b, 0x28, 0xd0, 0xb2, 0x65, 0x93, 0xd0, 0x36 };
|
||||||
|
|
||||||
if (!(module = GetModuleHandleA( "advapi32.dll" ))) return;
|
module = GetModuleHandleA("advapi32.dll");
|
||||||
|
|
||||||
pMD5Init = (fnMD5Init)GetProcAddress( module, "MD5Init" );
|
pMD5Init = (fnMD5Init)GetProcAddress( module, "MD5Init" );
|
||||||
pMD5Update = (fnMD5Update)GetProcAddress( module, "MD5Update" );
|
pMD5Update = (fnMD5Update)GetProcAddress( module, "MD5Update" );
|
||||||
|
@ -45,7 +45,6 @@ static BOOL init(void)
|
|||||||
{
|
{
|
||||||
hadvapi32 = GetModuleHandle("advapi32.dll");
|
hadvapi32 = GetModuleHandle("advapi32.dll");
|
||||||
|
|
||||||
if (hadvapi32) {
|
|
||||||
pLsaClose = (void*)GetProcAddress(hadvapi32, "LsaClose");
|
pLsaClose = (void*)GetProcAddress(hadvapi32, "LsaClose");
|
||||||
pLsaFreeMemory = (void*)GetProcAddress(hadvapi32, "LsaFreeMemory");
|
pLsaFreeMemory = (void*)GetProcAddress(hadvapi32, "LsaFreeMemory");
|
||||||
pLsaOpenPolicy = (void*)GetProcAddress(hadvapi32, "LsaOpenPolicy");
|
pLsaOpenPolicy = (void*)GetProcAddress(hadvapi32, "LsaOpenPolicy");
|
||||||
@ -54,7 +53,6 @@ static BOOL init(void)
|
|||||||
|
|
||||||
if (pLsaClose && pLsaFreeMemory && pLsaOpenPolicy && pLsaQueryInformationPolicy && pConvertSidToStringSidA)
|
if (pLsaClose && pLsaFreeMemory && pLsaOpenPolicy && pLsaQueryInformationPolicy && pConvertSidToStringSidA)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -672,15 +672,18 @@ static void test_AccessCheck(void)
|
|||||||
DWORD err;
|
DWORD err;
|
||||||
|
|
||||||
NtDllModule = GetModuleHandle("ntdll.dll");
|
NtDllModule = GetModuleHandle("ntdll.dll");
|
||||||
|
|
||||||
if (!NtDllModule)
|
if (!NtDllModule)
|
||||||
{
|
{
|
||||||
trace("not running on NT, skipping test\n");
|
skip("not running on NT, skipping test\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
pRtlAdjustPrivilege = (fnRtlAdjustPrivilege)
|
pRtlAdjustPrivilege = (fnRtlAdjustPrivilege)
|
||||||
GetProcAddress(NtDllModule, "RtlAdjustPrivilege");
|
GetProcAddress(NtDllModule, "RtlAdjustPrivilege");
|
||||||
if (!pRtlAdjustPrivilege) return;
|
if (!pRtlAdjustPrivilege)
|
||||||
|
{
|
||||||
|
skip("missing RtlAdjustPrivilege, skipping test\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Acl = HeapAlloc(GetProcessHeap(), 0, 256);
|
Acl = HeapAlloc(GetProcessHeap(), 0, 256);
|
||||||
res = InitializeAcl(Acl, 256, ACL_REVISION);
|
res = InitializeAcl(Acl, 256, ACL_REVISION);
|
||||||
|
@ -450,12 +450,6 @@ START_TEST(dpa)
|
|||||||
|
|
||||||
hcomctl32 = GetModuleHandleA("comctl32.dll");
|
hcomctl32 = GetModuleHandleA("comctl32.dll");
|
||||||
|
|
||||||
if(!hcomctl32)
|
|
||||||
{
|
|
||||||
ok(0, "error=%d\n", GetLastError());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(InitFunctionPtrs(hcomctl32))
|
if(InitFunctionPtrs(hcomctl32))
|
||||||
test_dpa();
|
test_dpa();
|
||||||
else
|
else
|
||||||
|
@ -288,8 +288,6 @@ static void test_MRUListA(void)
|
|||||||
START_TEST(mru)
|
START_TEST(mru)
|
||||||
{
|
{
|
||||||
hComctl32 = GetModuleHandleA("comctl32.dll");
|
hComctl32 = GetModuleHandleA("comctl32.dll");
|
||||||
if (!hComctl32)
|
|
||||||
return;
|
|
||||||
|
|
||||||
delete_reg_entries();
|
delete_reg_entries();
|
||||||
if (!create_reg_entries())
|
if (!create_reg_entries())
|
||||||
|
@ -81,11 +81,7 @@ static BOOL (WINAPI *pCertIsValidCRLForCertificate)(PCCERT_CONTEXT, PCCRL_CONTEX
|
|||||||
static void init_function_pointers(void)
|
static void init_function_pointers(void)
|
||||||
{
|
{
|
||||||
HMODULE hdll = GetModuleHandleA("crypt32.dll");
|
HMODULE hdll = GetModuleHandleA("crypt32.dll");
|
||||||
|
|
||||||
if(hdll)
|
|
||||||
{
|
|
||||||
pCertIsValidCRLForCertificate = (void*)GetProcAddress(hdll, "CertIsValidCRLForCertificate");
|
pCertIsValidCRLForCertificate = (void*)GetProcAddress(hdll, "CertIsValidCRLForCertificate");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void testCreateCRL(void)
|
static void testCreateCRL(void)
|
||||||
|
@ -53,11 +53,7 @@ typedef struct _TVERTEX
|
|||||||
static void init_function_pointers(void)
|
static void init_function_pointers(void)
|
||||||
{
|
{
|
||||||
HMODULE hmod = GetModuleHandleA("ddraw.dll");
|
HMODULE hmod = GetModuleHandleA("ddraw.dll");
|
||||||
|
|
||||||
if(hmod)
|
|
||||||
{
|
|
||||||
pDirectDrawCreateEx = (void*)GetProcAddress(hmod, "DirectDrawCreateEx");
|
pDirectDrawCreateEx = (void*)GetProcAddress(hmod, "DirectDrawCreateEx");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -30,11 +30,7 @@ static HRESULT (WINAPI *pDirectDrawCreateEx)(LPGUID,LPVOID*,REFIID,LPUNKNOWN);
|
|||||||
static void init_function_pointers(void)
|
static void init_function_pointers(void)
|
||||||
{
|
{
|
||||||
HMODULE hmod = GetModuleHandleA("ddraw.dll");
|
HMODULE hmod = GetModuleHandleA("ddraw.dll");
|
||||||
|
|
||||||
if(hmod)
|
|
||||||
{
|
|
||||||
pDirectDrawCreateEx = (void*)GetProcAddress(hmod, "DirectDrawCreateEx");
|
pDirectDrawCreateEx = (void*)GetProcAddress(hmod, "DirectDrawCreateEx");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned long getRefcount(IUnknown *iface)
|
static unsigned long getRefcount(IUnknown *iface)
|
||||||
|
@ -87,16 +87,12 @@ static IsValidLanguageGroupFn pIsValidLanguageGroup;
|
|||||||
static void InitFunctionPointers(void)
|
static void InitFunctionPointers(void)
|
||||||
{
|
{
|
||||||
hKernel32 = GetModuleHandleA("kernel32");
|
hKernel32 = GetModuleHandleA("kernel32");
|
||||||
|
|
||||||
if (hKernel32)
|
|
||||||
{
|
|
||||||
pEnumSystemLanguageGroupsA = (void*)GetProcAddress(hKernel32, "EnumSystemLanguageGroupsA");
|
pEnumSystemLanguageGroupsA = (void*)GetProcAddress(hKernel32, "EnumSystemLanguageGroupsA");
|
||||||
pEnumLanguageGroupLocalesA = (void*)GetProcAddress(hKernel32, "EnumLanguageGroupLocalesA");
|
pEnumLanguageGroupLocalesA = (void*)GetProcAddress(hKernel32, "EnumLanguageGroupLocalesA");
|
||||||
pFoldStringA = (void*)GetProcAddress(hKernel32, "FoldStringA");
|
pFoldStringA = (void*)GetProcAddress(hKernel32, "FoldStringA");
|
||||||
pFoldStringW = (void*)GetProcAddress(hKernel32, "FoldStringW");
|
pFoldStringW = (void*)GetProcAddress(hKernel32, "FoldStringW");
|
||||||
pIsValidLanguageGroup = (void*)GetProcAddress(hKernel32, "IsValidLanguageGroup");
|
pIsValidLanguageGroup = (void*)GetProcAddress(hKernel32, "IsValidLanguageGroup");
|
||||||
pEnumUILanguagesA = (void*)GetProcAddress(hKernel32, "EnumUILanguagesA");
|
pEnumUILanguagesA = (void*)GetProcAddress(hKernel32, "EnumUILanguagesA");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define eq(received, expected, label, type) \
|
#define eq(received, expected, label, type) \
|
||||||
|
@ -395,7 +395,7 @@ static void test_XcvDataPort_AddPort(void)
|
|||||||
*/
|
*/
|
||||||
if (0)
|
if (0)
|
||||||
{
|
{
|
||||||
/* create a Port for a normal, writeable file */
|
/* create a Port for a normal, writable file */
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
res = pXcvDataPort(hXcv, cmd_AddPortW, (PBYTE) tempfileW, (lstrlenW(tempfileW) + 1) * sizeof(WCHAR), NULL, 0, NULL);
|
res = pXcvDataPort(hXcv, cmd_AddPortW, (PBYTE) tempfileW, (lstrlenW(tempfileW) + 1) * sizeof(WCHAR), NULL, 0, NULL);
|
||||||
|
|
||||||
|
@ -431,8 +431,6 @@ static void test_msidecomposedesc(void)
|
|||||||
HMODULE hmod;
|
HMODULE hmod;
|
||||||
|
|
||||||
hmod = GetModuleHandle("msi.dll");
|
hmod = GetModuleHandle("msi.dll");
|
||||||
if (!hmod)
|
|
||||||
return;
|
|
||||||
pMsiDecomposeDescriptorA = (fnMsiDecomposeDescriptorA)
|
pMsiDecomposeDescriptorA = (fnMsiDecomposeDescriptorA)
|
||||||
GetProcAddress(hmod, "MsiDecomposeDescriptorA");
|
GetProcAddress(hmod, "MsiDecomposeDescriptorA");
|
||||||
if (!pMsiDecomposeDescriptorA)
|
if (!pMsiDecomposeDescriptorA)
|
||||||
|
@ -316,16 +316,22 @@ static void test_ntncdf_async(void)
|
|||||||
START_TEST(change)
|
START_TEST(change)
|
||||||
{
|
{
|
||||||
HMODULE hntdll = GetModuleHandle("ntdll");
|
HMODULE hntdll = GetModuleHandle("ntdll");
|
||||||
|
if (!hntdll)
|
||||||
|
{
|
||||||
|
skip("not running on NT, skipping test\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
pNtNotifyChangeDirectoryFile = (fnNtNotifyChangeDirectoryFile)
|
pNtNotifyChangeDirectoryFile = (fnNtNotifyChangeDirectoryFile)
|
||||||
GetProcAddress(hntdll, "NtNotifyChangeDirectoryFile");
|
GetProcAddress(hntdll, "NtNotifyChangeDirectoryFile");
|
||||||
pNtCancelIoFile = (fnNtCancelIoFile)
|
pNtCancelIoFile = (fnNtCancelIoFile)
|
||||||
GetProcAddress(hntdll, "NtCancelIoFile");
|
GetProcAddress(hntdll, "NtCancelIoFile");
|
||||||
|
|
||||||
if (!pNtNotifyChangeDirectoryFile)
|
if (!pNtNotifyChangeDirectoryFile || !pNtCancelIoFile)
|
||||||
return;
|
{
|
||||||
if (!pNtCancelIoFile)
|
skip("missing functions, skipping test\n");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
test_ntncdf();
|
test_ntncdf();
|
||||||
test_ntncdf_async();
|
test_ntncdf_async();
|
||||||
|
@ -130,14 +130,16 @@ static void nt_mailslot_test(void)
|
|||||||
START_TEST(file)
|
START_TEST(file)
|
||||||
{
|
{
|
||||||
HMODULE hntdll = GetModuleHandleA("ntdll.dll");
|
HMODULE hntdll = GetModuleHandleA("ntdll.dll");
|
||||||
|
if (!hntdll)
|
||||||
if (hntdll)
|
|
||||||
{
|
{
|
||||||
|
skip("not running on NT, skipping test\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
pRtlFreeUnicodeString = (void *)GetProcAddress(hntdll, "RtlFreeUnicodeString");
|
pRtlFreeUnicodeString = (void *)GetProcAddress(hntdll, "RtlFreeUnicodeString");
|
||||||
pRtlInitUnicodeString = (void *)GetProcAddress(hntdll, "RtlInitUnicodeString");
|
pRtlInitUnicodeString = (void *)GetProcAddress(hntdll, "RtlInitUnicodeString");
|
||||||
pNtCreateMailslotFile = (void *)GetProcAddress(hntdll, "NtCreateMailslotFile");
|
pNtCreateMailslotFile = (void *)GetProcAddress(hntdll, "NtCreateMailslotFile");
|
||||||
pNtClose = (void *)GetProcAddress(hntdll, "NtClose");
|
pNtClose = (void *)GetProcAddress(hntdll, "NtClose");
|
||||||
|
|
||||||
nt_mailslot_test();
|
nt_mailslot_test();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -541,8 +541,12 @@ static void test_symboliclink(void)
|
|||||||
START_TEST(om)
|
START_TEST(om)
|
||||||
{
|
{
|
||||||
HMODULE hntdll = GetModuleHandleA("ntdll.dll");
|
HMODULE hntdll = GetModuleHandleA("ntdll.dll");
|
||||||
if (hntdll)
|
if (!hntdll)
|
||||||
{
|
{
|
||||||
|
skip("not running on NT, skipping test\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
pRtlCreateUnicodeStringFromAsciiz = (void *)GetProcAddress(hntdll, "RtlCreateUnicodeStringFromAsciiz");
|
pRtlCreateUnicodeStringFromAsciiz = (void *)GetProcAddress(hntdll, "RtlCreateUnicodeStringFromAsciiz");
|
||||||
pRtlFreeUnicodeString = (void *)GetProcAddress(hntdll, "RtlFreeUnicodeString");
|
pRtlFreeUnicodeString = (void *)GetProcAddress(hntdll, "RtlFreeUnicodeString");
|
||||||
pNtCreateEvent = (void *)GetProcAddress(hntdll, "NtCreateEvent");
|
pNtCreateEvent = (void *)GetProcAddress(hntdll, "NtCreateEvent");
|
||||||
@ -565,5 +569,4 @@ START_TEST(om)
|
|||||||
test_name_collisions();
|
test_name_collisions();
|
||||||
test_directory();
|
test_directory();
|
||||||
test_symboliclink();
|
test_symboliclink();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -31,13 +31,9 @@ static HRESULT (WINAPI *pStgCreatePropSetStg)(IStorage *, DWORD, IPropertySetSto
|
|||||||
static void init_function_pointers(void)
|
static void init_function_pointers(void)
|
||||||
{
|
{
|
||||||
HMODULE hmod = GetModuleHandleA("ole32.dll");
|
HMODULE hmod = GetModuleHandleA("ole32.dll");
|
||||||
|
|
||||||
if(hmod)
|
|
||||||
{
|
|
||||||
pFmtIdToPropStgName = (void*)GetProcAddress(hmod, "FmtIdToPropStgName");
|
pFmtIdToPropStgName = (void*)GetProcAddress(hmod, "FmtIdToPropStgName");
|
||||||
pPropStgNameToFmtId = (void*)GetProcAddress(hmod, "PropStgNameToFmtId");
|
pPropStgNameToFmtId = (void*)GetProcAddress(hmod, "PropStgNameToFmtId");
|
||||||
pStgCreatePropSetStg = (void*)GetProcAddress(hmod, "StgCreatePropSetStg");
|
pStgCreatePropSetStg = (void*)GetProcAddress(hmod, "StgCreatePropSetStg");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/* FIXME: this creates an ANSI storage, try to find conditions under which
|
/* FIXME: this creates an ANSI storage, try to find conditions under which
|
||||||
* Unicode translation fails
|
* Unicode translation fails
|
||||||
|
@ -40,8 +40,6 @@ static int (WINAPI *pSHCreateDirectoryExA)(HWND, LPCSTR, LPSECURITY_ATTRIBUTES);
|
|||||||
static void InitFunctionPointers(void)
|
static void InitFunctionPointers(void)
|
||||||
{
|
{
|
||||||
hshell32 = GetModuleHandleA("shell32.dll");
|
hshell32 = GetModuleHandleA("shell32.dll");
|
||||||
|
|
||||||
if(hshell32)
|
|
||||||
pSHCreateDirectoryExA = (void*)GetProcAddress(hshell32, "SHCreateDirectoryExA");
|
pSHCreateDirectoryExA = (void*)GetProcAddress(hshell32, "SHCreateDirectoryExA");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,20 +55,14 @@ static void init_function_pointers(void)
|
|||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
hmod = GetModuleHandleA("shell32.dll");
|
hmod = GetModuleHandleA("shell32.dll");
|
||||||
if(hmod)
|
|
||||||
{
|
|
||||||
pSHBindToParent = (void*)GetProcAddress(hmod, "SHBindToParent");
|
pSHBindToParent = (void*)GetProcAddress(hmod, "SHBindToParent");
|
||||||
pSHGetSpecialFolderPathW = (void*)GetProcAddress(hmod, "SHGetSpecialFolderPathW");
|
pSHGetSpecialFolderPathW = (void*)GetProcAddress(hmod, "SHGetSpecialFolderPathW");
|
||||||
pILFindLastID = (void *)GetProcAddress(hmod, (LPCSTR)16);
|
pILFindLastID = (void *)GetProcAddress(hmod, (LPCSTR)16);
|
||||||
pILFree = (void*)GetProcAddress(hmod, (LPSTR)155);
|
pILFree = (void*)GetProcAddress(hmod, (LPSTR)155);
|
||||||
pILIsEqual = (void*)GetProcAddress(hmod, (LPSTR)21);
|
pILIsEqual = (void*)GetProcAddress(hmod, (LPSTR)21);
|
||||||
}
|
|
||||||
|
|
||||||
hmod = GetModuleHandleA("shlwapi.dll");
|
hmod = GetModuleHandleA("shlwapi.dll");
|
||||||
if(hmod)
|
|
||||||
{
|
|
||||||
pStrRetToBufW = (void*)GetProcAddress(hmod, "StrRetToBufW");
|
pStrRetToBufW = (void*)GetProcAddress(hmod, "StrRetToBufW");
|
||||||
}
|
|
||||||
|
|
||||||
hr = SHGetMalloc(&ppM);
|
hr = SHGetMalloc(&ppM);
|
||||||
ok(hr == S_OK, "SHGetMalloc failed %08x\n", hr);
|
ok(hr == S_OK, "SHGetMalloc failed %08x\n", hr);
|
||||||
|
@ -381,11 +381,8 @@ START_TEST(shreg)
|
|||||||
if (!hkey) return;
|
if (!hkey) return;
|
||||||
|
|
||||||
hshlwapi = GetModuleHandleA("shlwapi.dll");
|
hshlwapi = GetModuleHandleA("shlwapi.dll");
|
||||||
if (hshlwapi)
|
|
||||||
{
|
|
||||||
pSHCopyKeyA=(SHCopyKeyA_func)GetProcAddress(hshlwapi,"SHCopyKeyA");
|
pSHCopyKeyA=(SHCopyKeyA_func)GetProcAddress(hshlwapi,"SHCopyKeyA");
|
||||||
pSHRegGetPathA=(SHRegGetPathA_func)GetProcAddress(hshlwapi,"SHRegGetPathA");
|
pSHRegGetPathA=(SHRegGetPathA_func)GetProcAddress(hshlwapi,"SHRegGetPathA");
|
||||||
}
|
|
||||||
test_SHGetValue();
|
test_SHGetValue();
|
||||||
test_SHQUeryValueEx();
|
test_SHQUeryValueEx();
|
||||||
test_SHGetRegPath();
|
test_SHGetRegPath();
|
||||||
|
@ -829,8 +829,6 @@ START_TEST(string)
|
|||||||
GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, decimalDelim, 8);
|
GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, decimalDelim, 8);
|
||||||
|
|
||||||
hShlwapi = GetModuleHandleA("shlwapi");
|
hShlwapi = GetModuleHandleA("shlwapi");
|
||||||
if (!hShlwapi)
|
|
||||||
return;
|
|
||||||
|
|
||||||
test_StrChrA();
|
test_StrChrA();
|
||||||
test_StrChrW();
|
test_StrChrW();
|
||||||
|
@ -218,9 +218,12 @@ static void do_test( HWND hwnd, int seqnr, const KEV td[] )
|
|||||||
int kmctr, i;
|
int kmctr, i;
|
||||||
|
|
||||||
module = GetModuleHandleA("user32");
|
module = GetModuleHandleA("user32");
|
||||||
if (!module) return;
|
|
||||||
ptr_SendInput = (void *)GetProcAddress(module, "SendInput");
|
ptr_SendInput = (void *)GetProcAddress(module, "SendInput");
|
||||||
if (!ptr_SendInput) return;
|
if (!ptr_SendInput)
|
||||||
|
{
|
||||||
|
skip("skipping SendInput tests\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
buf[0]='\0';
|
buf[0]='\0';
|
||||||
TrackSysKey=0; /* see input.c */
|
TrackSysKey=0; /* see input.c */
|
||||||
|
@ -33,15 +33,11 @@ static HMONITOR (WINAPI *pMonitorFromWindow)(HWND,DWORD);
|
|||||||
static void init_function_pointers(void)
|
static void init_function_pointers(void)
|
||||||
{
|
{
|
||||||
hdll = GetModuleHandleA("user32.dll");
|
hdll = GetModuleHandleA("user32.dll");
|
||||||
|
|
||||||
if(hdll)
|
|
||||||
{
|
|
||||||
pEnumDisplayDevicesA = (void*)GetProcAddress(hdll, "EnumDisplayDevicesA");
|
pEnumDisplayDevicesA = (void*)GetProcAddress(hdll, "EnumDisplayDevicesA");
|
||||||
pEnumDisplayMonitors = (void*)GetProcAddress(hdll, "EnumDisplayMonitors");
|
pEnumDisplayMonitors = (void*)GetProcAddress(hdll, "EnumDisplayMonitors");
|
||||||
pGetMonitorInfoA = (void*)GetProcAddress(hdll, "GetMonitorInfoA");
|
pGetMonitorInfoA = (void*)GetProcAddress(hdll, "GetMonitorInfoA");
|
||||||
pMonitorFromPoint = (void*)GetProcAddress(hdll, "MonitorFromPoint");
|
pMonitorFromPoint = (void*)GetProcAddress(hdll, "MonitorFromPoint");
|
||||||
pMonitorFromWindow = (void*)GetProcAddress(hdll, "MonitorFromWindow");
|
pMonitorFromWindow = (void*)GetProcAddress(hdll, "MonitorFromWindow");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL CALLBACK monitor_enum_proc(HMONITOR hmon, HDC hdc, LPRECT lprc,
|
static BOOL CALLBACK monitor_enum_proc(HMONITOR hmon, HDC hdc, LPRECT lprc,
|
||||||
|
@ -28,9 +28,7 @@ static UINT (WINAPI *pPrivateExtractIconsA)(LPCTSTR, int, int, int, HICON *, UIN
|
|||||||
static void init_function_pointers(void)
|
static void init_function_pointers(void)
|
||||||
{
|
{
|
||||||
HMODULE hmod = GetModuleHandleA("user32.dll");
|
HMODULE hmod = GetModuleHandleA("user32.dll");
|
||||||
if (hmod) {
|
|
||||||
pPrivateExtractIconsA = (void*)GetProcAddress(hmod, "PrivateExtractIconsA");
|
pPrivateExtractIconsA = (void*)GetProcAddress(hmod, "PrivateExtractIconsA");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_LoadStringA (void)
|
static void test_LoadStringA (void)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user