crypt32: Make a global copy of crypt32's HINSTANCE.
This commit is contained in:
parent
ba7705ea95
commit
ab81dc123e
|
@ -123,7 +123,9 @@ BOOL CRYPT_AsnDecodePKCSDigestedData(const BYTE *pbEncoded, DWORD cbEncoded,
|
|||
*/
|
||||
HCRYPTPROV CRYPT_GetDefaultProvider(void);
|
||||
|
||||
void crypt_oid_init(HINSTANCE hinst);
|
||||
HINSTANCE hInstance;
|
||||
|
||||
void crypt_oid_init(void);
|
||||
void crypt_oid_free(void);
|
||||
void crypt_sip_free(void);
|
||||
void root_store_free(void);
|
||||
|
|
|
@ -33,14 +33,16 @@
|
|||
WINE_DEFAULT_DEBUG_CHANNEL(crypt);
|
||||
|
||||
static HCRYPTPROV hDefProv;
|
||||
HINSTANCE hInstance;
|
||||
|
||||
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD fdwReason, PVOID pvReserved)
|
||||
BOOL WINAPI DllMain(HINSTANCE hInst, DWORD fdwReason, PVOID pvReserved)
|
||||
{
|
||||
switch (fdwReason)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
DisableThreadLibraryCalls(hInstance);
|
||||
crypt_oid_init(hInstance);
|
||||
hInstance = hInst;
|
||||
DisableThreadLibraryCalls(hInst);
|
||||
crypt_oid_init();
|
||||
break;
|
||||
case DLL_PROCESS_DETACH:
|
||||
crypt_oid_free();
|
||||
|
|
|
@ -37,13 +37,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(crypt);
|
|||
|
||||
static const WCHAR DllW[] = { 'D','l','l',0 };
|
||||
|
||||
static void init_oid_info(HINSTANCE hinst);
|
||||
static void init_oid_info(void);
|
||||
static void free_function_sets(void);
|
||||
static void free_oid_info(void);
|
||||
|
||||
void crypt_oid_init(HINSTANCE hinst)
|
||||
void crypt_oid_init(void)
|
||||
{
|
||||
init_oid_info(hinst);
|
||||
init_oid_info();
|
||||
}
|
||||
|
||||
void crypt_oid_free(void)
|
||||
|
@ -993,7 +993,7 @@ BOOL WINAPI CryptUnregisterDefaultOIDFunction(DWORD dwEncodingType,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void oid_init_localizednames(HINSTANCE hInstance)
|
||||
static void oid_init_localizednames(void)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
|
@ -1367,11 +1367,11 @@ struct OIDInfo {
|
|||
struct list entry;
|
||||
};
|
||||
|
||||
static void init_oid_info(HINSTANCE hinst)
|
||||
static void init_oid_info(void)
|
||||
{
|
||||
DWORD i;
|
||||
|
||||
oid_init_localizednames(hinst);
|
||||
oid_init_localizednames();
|
||||
for (i = 0; i < sizeof(oidInfoConstructors) /
|
||||
sizeof(oidInfoConstructors[0]); i++)
|
||||
{
|
||||
|
@ -1402,7 +1402,8 @@ static void init_oid_info(HINSTANCE hinst)
|
|||
else
|
||||
{
|
||||
LPCWSTR stringresource;
|
||||
int len = LoadStringW(hinst, (UINT_PTR)oidInfoConstructors[i].pwszName,
|
||||
int len = LoadStringW(hInstance,
|
||||
(UINT_PTR)oidInfoConstructors[i].pwszName,
|
||||
(LPWSTR)&stringresource, 0);
|
||||
|
||||
if (len)
|
||||
|
|
Loading…
Reference in New Issue