Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
d9e8a0f6
Commit
d9e8a0f6
authored
Mar 28, 2007
by
Francois Gouget
Committed by
Alexandre Julliard
Mar 28, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unneeded checks on the GetModuleHandle() return value for cases where we…
Remove unneeded checks on the GetModuleHandle() return value for cases where we are linked with the dll.
parent
ebfeb41e
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
123 additions
and
160 deletions
+123
-160
crypt.c
dlls/advapi32/tests/crypt.c
+30
-33
crypt_md5.c
dlls/advapi32/tests/crypt_md5.c
+1
-1
lsa.c
dlls/advapi32/tests/lsa.c
+8
-10
security.c
dlls/advapi32/tests/security.c
+6
-3
dpa.c
dlls/comctl32/tests/dpa.c
+0
-6
mru.c
dlls/comctl32/tests/mru.c
+0
-2
crl.c
dlls/crypt32/tests/crl.c
+1
-5
d3d.c
dlls/ddraw/tests/d3d.c
+1
-5
refcount.c
dlls/ddraw/tests/refcount.c
+1
-5
locale.c
dlls/kernel32/tests/locale.c
+6
-10
localmon.c
dlls/localspl/tests/localmon.c
+1
-1
db.c
dlls/msi/tests/db.c
+0
-2
change.c
dlls/ntdll/tests/change.c
+9
-3
file.c
dlls/ntdll/tests/file.c
+10
-8
om.c
dlls/ntdll/tests/om.c
+26
-23
stg_prop.c
dlls/ole32/tests/stg_prop.c
+3
-7
shlfileop.c
dlls/shell32/tests/shlfileop.c
+1
-3
shlfolder.c
dlls/shell32/tests/shlfolder.c
+6
-12
shreg.c
dlls/shlwapi/tests/shreg.c
+2
-5
string.c
dlls/shlwapi/tests/string.c
+0
-2
input.c
dlls/user32/tests/input.c
+5
-2
monitor.c
dlls/user32/tests/monitor.c
+5
-9
resource.c
dlls/user32/tests/resource.c
+1
-3
No files found.
dlls/advapi32/tests/crypt.c
View file @
d9e8a0f6
...
...
@@ -70,39 +70,36 @@ static void init_function_pointers(void)
{
hadvapi32
=
GetModuleHandleA
(
"advapi32.dll"
);
if
(
hadvapi32
)
{
pCryptAcquireContextA
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptAcquireContextA"
);
pCryptEnumProviderTypesA
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptEnumProviderTypesA"
);
pCryptEnumProvidersA
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptEnumProvidersA"
);
pCryptGetDefaultProviderA
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptGetDefaultProviderA"
);
pCryptReleaseContext
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptReleaseContext"
);
pCryptSetProviderExA
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptSetProviderExA"
);
pCryptCreateHash
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptCreateHash"
);
pCryptDestroyHash
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptDestroyHash"
);
pCryptGenRandom
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptGenRandom"
);
pCryptContextAddRef
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptContextAddRef"
);
pCryptGenKey
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptGenKey"
);
pCryptDestroyKey
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptDestroyKey"
);
pCryptDecrypt
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptDecrypt"
);
pCryptDeriveKey
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptDeriveKey"
);
pCryptDuplicateHash
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptDuplicateHash"
);
pCryptDuplicateKey
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptDuplicateKey"
);
pCryptEncrypt
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptEncrypt"
);
pCryptExportKey
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptExportKey"
);
pCryptGetHashParam
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptGetHashParam"
);
pCryptGetKeyParam
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptGetKeyParam"
);
pCryptGetProvParam
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptGetProvParam"
);
pCryptGetUserKey
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptGetUserKey"
);
pCryptHashData
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptHashData"
);
pCryptHashSessionKey
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptHashSessionKey"
);
pCryptImportKey
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptImportKey"
);
pCryptSignHashW
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptSignHashW"
);
pCryptSetHashParam
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptSetHashParam"
);
pCryptSetKeyParam
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptSetKeyParam"
);
pCryptSetProvParam
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptSetProvParam"
);
pCryptVerifySignatureW
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptVerifySignatureW"
);
}
pCryptAcquireContextA
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptAcquireContextA"
);
pCryptEnumProviderTypesA
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptEnumProviderTypesA"
);
pCryptEnumProvidersA
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptEnumProvidersA"
);
pCryptGetDefaultProviderA
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptGetDefaultProviderA"
);
pCryptReleaseContext
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptReleaseContext"
);
pCryptSetProviderExA
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptSetProviderExA"
);
pCryptCreateHash
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptCreateHash"
);
pCryptDestroyHash
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptDestroyHash"
);
pCryptGenRandom
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptGenRandom"
);
pCryptContextAddRef
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptContextAddRef"
);
pCryptGenKey
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptGenKey"
);
pCryptDestroyKey
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptDestroyKey"
);
pCryptDecrypt
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptDecrypt"
);
pCryptDeriveKey
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptDeriveKey"
);
pCryptDuplicateHash
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptDuplicateHash"
);
pCryptDuplicateKey
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptDuplicateKey"
);
pCryptEncrypt
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptEncrypt"
);
pCryptExportKey
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptExportKey"
);
pCryptGetHashParam
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptGetHashParam"
);
pCryptGetKeyParam
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptGetKeyParam"
);
pCryptGetProvParam
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptGetProvParam"
);
pCryptGetUserKey
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptGetUserKey"
);
pCryptHashData
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptHashData"
);
pCryptHashSessionKey
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptHashSessionKey"
);
pCryptImportKey
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptImportKey"
);
pCryptSignHashW
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptSignHashW"
);
pCryptSetHashParam
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptSetHashParam"
);
pCryptSetKeyParam
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptSetKeyParam"
);
pCryptSetProvParam
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptSetProvParam"
);
pCryptVerifySignatureW
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptVerifySignatureW"
);
}
static
void
init_environment
(
void
)
...
...
dlls/advapi32/tests/crypt_md5.c
View file @
d9e8a0f6
...
...
@@ -77,7 +77,7 @@ static void test_md5_ctx(void)
{
0x43
,
0x03
,
0xdd
,
0x8c
,
0x60
,
0xd9
,
0x3a
,
0x22
,
0x0b
,
0x28
,
0xd0
,
0xb2
,
0x65
,
0x93
,
0xd0
,
0x36
};
if
(
!
(
module
=
GetModuleHandleA
(
"advapi32.dll"
)))
return
;
module
=
GetModuleHandleA
(
"advapi32.dll"
)
;
pMD5Init
=
(
fnMD5Init
)
GetProcAddress
(
module
,
"MD5Init"
);
pMD5Update
=
(
fnMD5Update
)
GetProcAddress
(
module
,
"MD5Update"
);
...
...
dlls/advapi32/tests/lsa.c
View file @
d9e8a0f6
...
...
@@ -45,16 +45,14 @@ static BOOL init(void)
{
hadvapi32
=
GetModuleHandle
(
"advapi32.dll"
);
if
(
hadvapi32
)
{
pLsaClose
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"LsaClose"
);
pLsaFreeMemory
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"LsaFreeMemory"
);
pLsaOpenPolicy
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"LsaOpenPolicy"
);
pLsaQueryInformationPolicy
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"LsaQueryInformationPolicy"
);
pConvertSidToStringSidA
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"ConvertSidToStringSidA"
);
if
(
pLsaClose
&&
pLsaFreeMemory
&&
pLsaOpenPolicy
&&
pLsaQueryInformationPolicy
&&
pConvertSidToStringSidA
)
return
TRUE
;
}
pLsaClose
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"LsaClose"
);
pLsaFreeMemory
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"LsaFreeMemory"
);
pLsaOpenPolicy
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"LsaOpenPolicy"
);
pLsaQueryInformationPolicy
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"LsaQueryInformationPolicy"
);
pConvertSidToStringSidA
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"ConvertSidToStringSidA"
);
if
(
pLsaClose
&&
pLsaFreeMemory
&&
pLsaOpenPolicy
&&
pLsaQueryInformationPolicy
&&
pConvertSidToStringSidA
)
return
TRUE
;
return
FALSE
;
}
...
...
dlls/advapi32/tests/security.c
View file @
d9e8a0f6
...
...
@@ -672,15 +672,18 @@ static void test_AccessCheck(void)
DWORD
err
;
NtDllModule
=
GetModuleHandle
(
"ntdll.dll"
);
if
(
!
NtDllModule
)
{
trace
(
"not running on NT, skipping test
\n
"
);
skip
(
"not running on NT, skipping test
\n
"
);
return
;
}
pRtlAdjustPrivilege
=
(
fnRtlAdjustPrivilege
)
GetProcAddress
(
NtDllModule
,
"RtlAdjustPrivilege"
);
if
(
!
pRtlAdjustPrivilege
)
return
;
if
(
!
pRtlAdjustPrivilege
)
{
skip
(
"missing RtlAdjustPrivilege, skipping test
\n
"
);
return
;
}
Acl
=
HeapAlloc
(
GetProcessHeap
(),
0
,
256
);
res
=
InitializeAcl
(
Acl
,
256
,
ACL_REVISION
);
...
...
dlls/comctl32/tests/dpa.c
View file @
d9e8a0f6
...
...
@@ -450,12 +450,6 @@ START_TEST(dpa)
hcomctl32
=
GetModuleHandleA
(
"comctl32.dll"
);
if
(
!
hcomctl32
)
{
ok
(
0
,
"error=%d
\n
"
,
GetLastError
());
return
;
}
if
(
InitFunctionPtrs
(
hcomctl32
))
test_dpa
();
else
...
...
dlls/comctl32/tests/mru.c
View file @
d9e8a0f6
...
...
@@ -288,8 +288,6 @@ static void test_MRUListA(void)
START_TEST
(
mru
)
{
hComctl32
=
GetModuleHandleA
(
"comctl32.dll"
);
if
(
!
hComctl32
)
return
;
delete_reg_entries
();
if
(
!
create_reg_entries
())
...
...
dlls/crypt32/tests/crl.c
View file @
d9e8a0f6
...
...
@@ -81,11 +81,7 @@ static BOOL (WINAPI *pCertIsValidCRLForCertificate)(PCCERT_CONTEXT, PCCRL_CONTEX
static
void
init_function_pointers
(
void
)
{
HMODULE
hdll
=
GetModuleHandleA
(
"crypt32.dll"
);
if
(
hdll
)
{
pCertIsValidCRLForCertificate
=
(
void
*
)
GetProcAddress
(
hdll
,
"CertIsValidCRLForCertificate"
);
}
pCertIsValidCRLForCertificate
=
(
void
*
)
GetProcAddress
(
hdll
,
"CertIsValidCRLForCertificate"
);
}
static
void
testCreateCRL
(
void
)
...
...
dlls/ddraw/tests/d3d.c
View file @
d9e8a0f6
...
...
@@ -53,11 +53,7 @@ typedef struct _TVERTEX
static
void
init_function_pointers
(
void
)
{
HMODULE
hmod
=
GetModuleHandleA
(
"ddraw.dll"
);
if
(
hmod
)
{
pDirectDrawCreateEx
=
(
void
*
)
GetProcAddress
(
hmod
,
"DirectDrawCreateEx"
);
}
pDirectDrawCreateEx
=
(
void
*
)
GetProcAddress
(
hmod
,
"DirectDrawCreateEx"
);
}
...
...
dlls/ddraw/tests/refcount.c
View file @
d9e8a0f6
...
...
@@ -30,11 +30,7 @@ static HRESULT (WINAPI *pDirectDrawCreateEx)(LPGUID,LPVOID*,REFIID,LPUNKNOWN);
static
void
init_function_pointers
(
void
)
{
HMODULE
hmod
=
GetModuleHandleA
(
"ddraw.dll"
);
if
(
hmod
)
{
pDirectDrawCreateEx
=
(
void
*
)
GetProcAddress
(
hmod
,
"DirectDrawCreateEx"
);
}
pDirectDrawCreateEx
=
(
void
*
)
GetProcAddress
(
hmod
,
"DirectDrawCreateEx"
);
}
static
unsigned
long
getRefcount
(
IUnknown
*
iface
)
...
...
dlls/kernel32/tests/locale.c
View file @
d9e8a0f6
...
...
@@ -87,16 +87,12 @@ static IsValidLanguageGroupFn pIsValidLanguageGroup;
static
void
InitFunctionPointers
(
void
)
{
hKernel32
=
GetModuleHandleA
(
"kernel32"
);
if
(
hKernel32
)
{
pEnumSystemLanguageGroupsA
=
(
void
*
)
GetProcAddress
(
hKernel32
,
"EnumSystemLanguageGroupsA"
);
pEnumLanguageGroupLocalesA
=
(
void
*
)
GetProcAddress
(
hKernel32
,
"EnumLanguageGroupLocalesA"
);
pFoldStringA
=
(
void
*
)
GetProcAddress
(
hKernel32
,
"FoldStringA"
);
pFoldStringW
=
(
void
*
)
GetProcAddress
(
hKernel32
,
"FoldStringW"
);
pIsValidLanguageGroup
=
(
void
*
)
GetProcAddress
(
hKernel32
,
"IsValidLanguageGroup"
);
pEnumUILanguagesA
=
(
void
*
)
GetProcAddress
(
hKernel32
,
"EnumUILanguagesA"
);
}
pEnumSystemLanguageGroupsA
=
(
void
*
)
GetProcAddress
(
hKernel32
,
"EnumSystemLanguageGroupsA"
);
pEnumLanguageGroupLocalesA
=
(
void
*
)
GetProcAddress
(
hKernel32
,
"EnumLanguageGroupLocalesA"
);
pFoldStringA
=
(
void
*
)
GetProcAddress
(
hKernel32
,
"FoldStringA"
);
pFoldStringW
=
(
void
*
)
GetProcAddress
(
hKernel32
,
"FoldStringW"
);
pIsValidLanguageGroup
=
(
void
*
)
GetProcAddress
(
hKernel32
,
"IsValidLanguageGroup"
);
pEnumUILanguagesA
=
(
void
*
)
GetProcAddress
(
hKernel32
,
"EnumUILanguagesA"
);
}
#define eq(received, expected, label, type) \
...
...
dlls/localspl/tests/localmon.c
View file @
d9e8a0f6
...
...
@@ -395,7 +395,7 @@ static void test_XcvDataPort_AddPort(void)
*/
if
(
0
)
{
/* create a Port for a normal, writ
e
able file */
/* create a Port for a normal, writable file */
SetLastError
(
0xdeadbeef
);
res
=
pXcvDataPort
(
hXcv
,
cmd_AddPortW
,
(
PBYTE
)
tempfileW
,
(
lstrlenW
(
tempfileW
)
+
1
)
*
sizeof
(
WCHAR
),
NULL
,
0
,
NULL
);
...
...
dlls/msi/tests/db.c
View file @
d9e8a0f6
...
...
@@ -431,8 +431,6 @@ static void test_msidecomposedesc(void)
HMODULE
hmod
;
hmod
=
GetModuleHandle
(
"msi.dll"
);
if
(
!
hmod
)
return
;
pMsiDecomposeDescriptorA
=
(
fnMsiDecomposeDescriptorA
)
GetProcAddress
(
hmod
,
"MsiDecomposeDescriptorA"
);
if
(
!
pMsiDecomposeDescriptorA
)
...
...
dlls/ntdll/tests/change.c
View file @
d9e8a0f6
...
...
@@ -316,16 +316,22 @@ static void test_ntncdf_async(void)
START_TEST
(
change
)
{
HMODULE
hntdll
=
GetModuleHandle
(
"ntdll"
);
if
(
!
hntdll
)
{
skip
(
"not running on NT, skipping test
\n
"
);
return
;
}
pNtNotifyChangeDirectoryFile
=
(
fnNtNotifyChangeDirectoryFile
)
GetProcAddress
(
hntdll
,
"NtNotifyChangeDirectoryFile"
);
pNtCancelIoFile
=
(
fnNtCancelIoFile
)
GetProcAddress
(
hntdll
,
"NtCancelIoFile"
);
if
(
!
pNtNotifyChangeDirectoryFile
)
return
;
if
(
!
pNtCancelIoFile
)
if
(
!
pNtNotifyChangeDirectoryFile
||
!
pNtCancelIoFile
)
{
skip
(
"missing functions, skipping test
\n
"
);
return
;
}
test_ntncdf
();
test_ntncdf_async
();
...
...
dlls/ntdll/tests/file.c
View file @
d9e8a0f6
...
...
@@ -130,14 +130,16 @@ static void nt_mailslot_test(void)
START_TEST
(
file
)
{
HMODULE
hntdll
=
GetModuleHandleA
(
"ntdll.dll"
);
if
(
hntdll
)
if
(
!
hntdll
)
{
pRtlFreeUnicodeString
=
(
void
*
)
GetProcAddress
(
hntdll
,
"RtlFreeUnicodeString"
);
pRtlInitUnicodeString
=
(
void
*
)
GetProcAddress
(
hntdll
,
"RtlInitUnicodeString"
);
pNtCreateMailslotFile
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtCreateMailslotFile"
);
pNtClose
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtClose"
);
nt_mailslot_test
();
skip
(
"not running on NT, skipping test
\n
"
);
return
;
}
pRtlFreeUnicodeString
=
(
void
*
)
GetProcAddress
(
hntdll
,
"RtlFreeUnicodeString"
);
pRtlInitUnicodeString
=
(
void
*
)
GetProcAddress
(
hntdll
,
"RtlInitUnicodeString"
);
pNtCreateMailslotFile
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtCreateMailslotFile"
);
pNtClose
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtClose"
);
nt_mailslot_test
();
}
dlls/ntdll/tests/om.c
View file @
d9e8a0f6
...
...
@@ -541,29 +541,32 @@ static void test_symboliclink(void)
START_TEST
(
om
)
{
HMODULE
hntdll
=
GetModuleHandleA
(
"ntdll.dll"
);
if
(
hntdll
)
if
(
!
hntdll
)
{
pRtlCreateUnicodeStringFromAsciiz
=
(
void
*
)
GetProcAddress
(
hntdll
,
"RtlCreateUnicodeStringFromAsciiz"
);
pRtlFreeUnicodeString
=
(
void
*
)
GetProcAddress
(
hntdll
,
"RtlFreeUnicodeString"
);
pNtCreateEvent
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtCreateEvent"
);
pNtCreateMutant
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtCreateMutant"
);
pNtOpenMutant
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtOpenMutant"
);
pNtOpenFile
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtOpenFile"
);
pNtClose
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtClose"
);
pRtlInitUnicodeString
=
(
void
*
)
GetProcAddress
(
hntdll
,
"RtlInitUnicodeString"
);
pNtCreateNamedPipeFile
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtCreateNamedPipeFile"
);
pNtOpenDirectoryObject
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtOpenDirectoryObject"
);
pNtCreateDirectoryObject
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtCreateDirectoryObject"
);
pNtOpenSymbolicLinkObject
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtOpenSymbolicLinkObject"
);
pNtCreateSymbolicLinkObject
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtCreateSymbolicLinkObject"
);
pNtCreateSemaphore
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtCreateSemaphore"
);
pNtCreateTimer
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtCreateTimer"
);
pNtCreateSection
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtCreateSection"
);
test_case_sensitive
();
test_namespace_pipe
();
test_name_collisions
();
test_directory
();
test_symboliclink
();
skip
(
"not running on NT, skipping test
\n
"
);
return
;
}
pRtlCreateUnicodeStringFromAsciiz
=
(
void
*
)
GetProcAddress
(
hntdll
,
"RtlCreateUnicodeStringFromAsciiz"
);
pRtlFreeUnicodeString
=
(
void
*
)
GetProcAddress
(
hntdll
,
"RtlFreeUnicodeString"
);
pNtCreateEvent
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtCreateEvent"
);
pNtCreateMutant
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtCreateMutant"
);
pNtOpenMutant
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtOpenMutant"
);
pNtOpenFile
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtOpenFile"
);
pNtClose
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtClose"
);
pRtlInitUnicodeString
=
(
void
*
)
GetProcAddress
(
hntdll
,
"RtlInitUnicodeString"
);
pNtCreateNamedPipeFile
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtCreateNamedPipeFile"
);
pNtOpenDirectoryObject
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtOpenDirectoryObject"
);
pNtCreateDirectoryObject
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtCreateDirectoryObject"
);
pNtOpenSymbolicLinkObject
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtOpenSymbolicLinkObject"
);
pNtCreateSymbolicLinkObject
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtCreateSymbolicLinkObject"
);
pNtCreateSemaphore
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtCreateSemaphore"
);
pNtCreateTimer
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtCreateTimer"
);
pNtCreateSection
=
(
void
*
)
GetProcAddress
(
hntdll
,
"NtCreateSection"
);
test_case_sensitive
();
test_namespace_pipe
();
test_name_collisions
();
test_directory
();
test_symboliclink
();
}
dlls/ole32/tests/stg_prop.c
View file @
d9e8a0f6
...
...
@@ -31,13 +31,9 @@ static HRESULT (WINAPI *pStgCreatePropSetStg)(IStorage *, DWORD, IPropertySetSto
static
void
init_function_pointers
(
void
)
{
HMODULE
hmod
=
GetModuleHandleA
(
"ole32.dll"
);
if
(
hmod
)
{
pFmtIdToPropStgName
=
(
void
*
)
GetProcAddress
(
hmod
,
"FmtIdToPropStgName"
);
pPropStgNameToFmtId
=
(
void
*
)
GetProcAddress
(
hmod
,
"PropStgNameToFmtId"
);
pStgCreatePropSetStg
=
(
void
*
)
GetProcAddress
(
hmod
,
"StgCreatePropSetStg"
);
}
pFmtIdToPropStgName
=
(
void
*
)
GetProcAddress
(
hmod
,
"FmtIdToPropStgName"
);
pPropStgNameToFmtId
=
(
void
*
)
GetProcAddress
(
hmod
,
"PropStgNameToFmtId"
);
pStgCreatePropSetStg
=
(
void
*
)
GetProcAddress
(
hmod
,
"StgCreatePropSetStg"
);
}
/* FIXME: this creates an ANSI storage, try to find conditions under which
* Unicode translation fails
...
...
dlls/shell32/tests/shlfileop.c
View file @
d9e8a0f6
...
...
@@ -40,9 +40,7 @@ static int (WINAPI *pSHCreateDirectoryExA)(HWND, LPCSTR, LPSECURITY_ATTRIBUTES);
static
void
InitFunctionPointers
(
void
)
{
hshell32
=
GetModuleHandleA
(
"shell32.dll"
);
if
(
hshell32
)
pSHCreateDirectoryExA
=
(
void
*
)
GetProcAddress
(
hshell32
,
"SHCreateDirectoryExA"
);
pSHCreateDirectoryExA
=
(
void
*
)
GetProcAddress
(
hshell32
,
"SHCreateDirectoryExA"
);
}
/* creates a file with the specified name for tests */
...
...
dlls/shell32/tests/shlfolder.c
View file @
d9e8a0f6
...
...
@@ -55,20 +55,14 @@ static void init_function_pointers(void)
HRESULT
hr
;
hmod
=
GetModuleHandleA
(
"shell32.dll"
);
if
(
hmod
)
{
pSHBindToParent
=
(
void
*
)
GetProcAddress
(
hmod
,
"SHBindToParent"
);
pSHGetSpecialFolderPathW
=
(
void
*
)
GetProcAddress
(
hmod
,
"SHGetSpecialFolderPathW"
);
pILFindLastID
=
(
void
*
)
GetProcAddress
(
hmod
,
(
LPCSTR
)
16
);
pILFree
=
(
void
*
)
GetProcAddress
(
hmod
,
(
LPSTR
)
155
);
pILIsEqual
=
(
void
*
)
GetProcAddress
(
hmod
,
(
LPSTR
)
21
);
}
pSHBindToParent
=
(
void
*
)
GetProcAddress
(
hmod
,
"SHBindToParent"
);
pSHGetSpecialFolderPathW
=
(
void
*
)
GetProcAddress
(
hmod
,
"SHGetSpecialFolderPathW"
);
pILFindLastID
=
(
void
*
)
GetProcAddress
(
hmod
,
(
LPCSTR
)
16
);
pILFree
=
(
void
*
)
GetProcAddress
(
hmod
,
(
LPSTR
)
155
);
pILIsEqual
=
(
void
*
)
GetProcAddress
(
hmod
,
(
LPSTR
)
21
);
hmod
=
GetModuleHandleA
(
"shlwapi.dll"
);
if
(
hmod
)
{
pStrRetToBufW
=
(
void
*
)
GetProcAddress
(
hmod
,
"StrRetToBufW"
);
}
pStrRetToBufW
=
(
void
*
)
GetProcAddress
(
hmod
,
"StrRetToBufW"
);
hr
=
SHGetMalloc
(
&
ppM
);
ok
(
hr
==
S_OK
,
"SHGetMalloc failed %08x
\n
"
,
hr
);
...
...
dlls/shlwapi/tests/shreg.c
View file @
d9e8a0f6
...
...
@@ -381,11 +381,8 @@ START_TEST(shreg)
if
(
!
hkey
)
return
;
hshlwapi
=
GetModuleHandleA
(
"shlwapi.dll"
);
if
(
hshlwapi
)
{
pSHCopyKeyA
=
(
SHCopyKeyA_func
)
GetProcAddress
(
hshlwapi
,
"SHCopyKeyA"
);
pSHRegGetPathA
=
(
SHRegGetPathA_func
)
GetProcAddress
(
hshlwapi
,
"SHRegGetPathA"
);
}
pSHCopyKeyA
=
(
SHCopyKeyA_func
)
GetProcAddress
(
hshlwapi
,
"SHCopyKeyA"
);
pSHRegGetPathA
=
(
SHRegGetPathA_func
)
GetProcAddress
(
hshlwapi
,
"SHRegGetPathA"
);
test_SHGetValue
();
test_SHQUeryValueEx
();
test_SHGetRegPath
();
...
...
dlls/shlwapi/tests/string.c
View file @
d9e8a0f6
...
...
@@ -829,8 +829,6 @@ START_TEST(string)
GetLocaleInfo
(
LOCALE_USER_DEFAULT
,
LOCALE_SDECIMAL
,
decimalDelim
,
8
);
hShlwapi
=
GetModuleHandleA
(
"shlwapi"
);
if
(
!
hShlwapi
)
return
;
test_StrChrA
();
test_StrChrW
();
...
...
dlls/user32/tests/input.c
View file @
d9e8a0f6
...
...
@@ -218,9 +218,12 @@ static void do_test( HWND hwnd, int seqnr, const KEV td[] )
int
kmctr
,
i
;
module
=
GetModuleHandleA
(
"user32"
);
if
(
!
module
)
return
;
ptr_SendInput
=
(
void
*
)
GetProcAddress
(
module
,
"SendInput"
);
if
(
!
ptr_SendInput
)
return
;
if
(
!
ptr_SendInput
)
{
skip
(
"skipping SendInput tests
\n
"
);
return
;
}
buf
[
0
]
=
'\0'
;
TrackSysKey
=
0
;
/* see input.c */
...
...
dlls/user32/tests/monitor.c
View file @
d9e8a0f6
...
...
@@ -33,15 +33,11 @@ static HMONITOR (WINAPI *pMonitorFromWindow)(HWND,DWORD);
static
void
init_function_pointers
(
void
)
{
hdll
=
GetModuleHandleA
(
"user32.dll"
);
if
(
hdll
)
{
pEnumDisplayDevicesA
=
(
void
*
)
GetProcAddress
(
hdll
,
"EnumDisplayDevicesA"
);
pEnumDisplayMonitors
=
(
void
*
)
GetProcAddress
(
hdll
,
"EnumDisplayMonitors"
);
pGetMonitorInfoA
=
(
void
*
)
GetProcAddress
(
hdll
,
"GetMonitorInfoA"
);
pMonitorFromPoint
=
(
void
*
)
GetProcAddress
(
hdll
,
"MonitorFromPoint"
);
pMonitorFromWindow
=
(
void
*
)
GetProcAddress
(
hdll
,
"MonitorFromWindow"
);
}
pEnumDisplayDevicesA
=
(
void
*
)
GetProcAddress
(
hdll
,
"EnumDisplayDevicesA"
);
pEnumDisplayMonitors
=
(
void
*
)
GetProcAddress
(
hdll
,
"EnumDisplayMonitors"
);
pGetMonitorInfoA
=
(
void
*
)
GetProcAddress
(
hdll
,
"GetMonitorInfoA"
);
pMonitorFromPoint
=
(
void
*
)
GetProcAddress
(
hdll
,
"MonitorFromPoint"
);
pMonitorFromWindow
=
(
void
*
)
GetProcAddress
(
hdll
,
"MonitorFromWindow"
);
}
static
BOOL
CALLBACK
monitor_enum_proc
(
HMONITOR
hmon
,
HDC
hdc
,
LPRECT
lprc
,
...
...
dlls/user32/tests/resource.c
View file @
d9e8a0f6
...
...
@@ -28,9 +28,7 @@ static UINT (WINAPI *pPrivateExtractIconsA)(LPCTSTR, int, int, int, HICON *, UIN
static
void
init_function_pointers
(
void
)
{
HMODULE
hmod
=
GetModuleHandleA
(
"user32.dll"
);
if
(
hmod
)
{
pPrivateExtractIconsA
=
(
void
*
)
GetProcAddress
(
hmod
,
"PrivateExtractIconsA"
);
}
pPrivateExtractIconsA
=
(
void
*
)
GetProcAddress
(
hmod
,
"PrivateExtractIconsA"
);
}
static
void
test_LoadStringA
(
void
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment