Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
ab81dc12
Commit
ab81dc12
authored
Oct 31, 2008
by
Juan Lang
Committed by
Alexandre Julliard
Nov 07, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Make a global copy of crypt32's HINSTANCE.
parent
ba7705ea
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
11 deletions
+16
-11
crypt32_private.h
dlls/crypt32/crypt32_private.h
+3
-1
main.c
dlls/crypt32/main.c
+5
-3
oid.c
dlls/crypt32/oid.c
+8
-7
No files found.
dlls/crypt32/crypt32_private.h
View file @
ab81dc12
...
@@ -123,7 +123,9 @@ BOOL CRYPT_AsnDecodePKCSDigestedData(const BYTE *pbEncoded, DWORD cbEncoded,
...
@@ -123,7 +123,9 @@ BOOL CRYPT_AsnDecodePKCSDigestedData(const BYTE *pbEncoded, DWORD cbEncoded,
*/
*/
HCRYPTPROV
CRYPT_GetDefaultProvider
(
void
);
HCRYPTPROV
CRYPT_GetDefaultProvider
(
void
);
void
crypt_oid_init
(
HINSTANCE
hinst
);
HINSTANCE
hInstance
;
void
crypt_oid_init
(
void
);
void
crypt_oid_free
(
void
);
void
crypt_oid_free
(
void
);
void
crypt_sip_free
(
void
);
void
crypt_sip_free
(
void
);
void
root_store_free
(
void
);
void
root_store_free
(
void
);
...
...
dlls/crypt32/main.c
View file @
ab81dc12
...
@@ -33,14 +33,16 @@
...
@@ -33,14 +33,16 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
crypt
);
WINE_DEFAULT_DEBUG_CHANNEL
(
crypt
);
static
HCRYPTPROV
hDefProv
;
static
HCRYPTPROV
hDefProv
;
HINSTANCE
hInstance
;
BOOL
WINAPI
DllMain
(
HINSTANCE
hInst
ance
,
DWORD
fdwReason
,
PVOID
pvReserved
)
BOOL
WINAPI
DllMain
(
HINSTANCE
hInst
,
DWORD
fdwReason
,
PVOID
pvReserved
)
{
{
switch
(
fdwReason
)
switch
(
fdwReason
)
{
{
case
DLL_PROCESS_ATTACH
:
case
DLL_PROCESS_ATTACH
:
DisableThreadLibraryCalls
(
hInstance
);
hInstance
=
hInst
;
crypt_oid_init
(
hInstance
);
DisableThreadLibraryCalls
(
hInst
);
crypt_oid_init
();
break
;
break
;
case
DLL_PROCESS_DETACH
:
case
DLL_PROCESS_DETACH
:
crypt_oid_free
();
crypt_oid_free
();
...
...
dlls/crypt32/oid.c
View file @
ab81dc12
...
@@ -37,13 +37,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(crypt);
...
@@ -37,13 +37,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(crypt);
static
const
WCHAR
DllW
[]
=
{
'D'
,
'l'
,
'l'
,
0
};
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_function_sets
(
void
);
static
void
free_oid_info
(
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
)
void
crypt_oid_free
(
void
)
...
@@ -993,7 +993,7 @@ BOOL WINAPI CryptUnregisterDefaultOIDFunction(DWORD dwEncodingType,
...
@@ -993,7 +993,7 @@ BOOL WINAPI CryptUnregisterDefaultOIDFunction(DWORD dwEncodingType,
return
ret
;
return
ret
;
}
}
static
void
oid_init_localizednames
(
HINSTANCE
hInstance
)
static
void
oid_init_localizednames
(
void
)
{
{
unsigned
int
i
;
unsigned
int
i
;
...
@@ -1367,11 +1367,11 @@ struct OIDInfo {
...
@@ -1367,11 +1367,11 @@ struct OIDInfo {
struct
list
entry
;
struct
list
entry
;
};
};
static
void
init_oid_info
(
HINSTANCE
hinst
)
static
void
init_oid_info
(
void
)
{
{
DWORD
i
;
DWORD
i
;
oid_init_localizednames
(
hinst
);
oid_init_localizednames
();
for
(
i
=
0
;
i
<
sizeof
(
oidInfoConstructors
)
/
for
(
i
=
0
;
i
<
sizeof
(
oidInfoConstructors
)
/
sizeof
(
oidInfoConstructors
[
0
]);
i
++
)
sizeof
(
oidInfoConstructors
[
0
]);
i
++
)
{
{
...
@@ -1402,7 +1402,8 @@ static void init_oid_info(HINSTANCE hinst)
...
@@ -1402,7 +1402,8 @@ static void init_oid_info(HINSTANCE hinst)
else
else
{
{
LPCWSTR
stringresource
;
LPCWSTR
stringresource
;
int
len
=
LoadStringW
(
hinst
,
(
UINT_PTR
)
oidInfoConstructors
[
i
].
pwszName
,
int
len
=
LoadStringW
(
hInstance
,
(
UINT_PTR
)
oidInfoConstructors
[
i
].
pwszName
,
(
LPWSTR
)
&
stringresource
,
0
);
(
LPWSTR
)
&
stringresource
,
0
);
if
(
len
)
if
(
len
)
...
...
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