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
b790a09e
Commit
b790a09e
authored
Jun 28, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Jun 29, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Add base message type and use it to implement CryptMsgDuplicate and CryptMsgClose.
parent
1c837f16
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
2 deletions
+40
-2
msg.c
dlls/crypt32/msg.c
+40
-2
No files found.
dlls/crypt32/msg.c
View file @
b790a09e
...
@@ -24,6 +24,24 @@
...
@@ -24,6 +24,24 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
crypt
);
WINE_DEFAULT_DEBUG_CHANNEL
(
crypt
);
/* Called when a message's ref count reaches zero. Free any message-specific
* data here.
*/
typedef
void
(
*
CryptMsgCloseFunc
)(
HCRYPTMSG
msg
);
typedef
struct
_CryptMsgBase
{
LONG
ref
;
DWORD
open_flags
;
CryptMsgCloseFunc
close
;
}
CryptMsgBase
;
static
inline
void
CryptMsgBase_Init
(
CryptMsgBase
*
msg
,
DWORD
dwFlags
)
{
msg
->
ref
=
1
;
msg
->
open_flags
=
dwFlags
;
}
static
inline
const
char
*
MSG_TYPE_STR
(
DWORD
type
)
static
inline
const
char
*
MSG_TYPE_STR
(
DWORD
type
)
{
{
switch
(
type
)
switch
(
type
)
...
@@ -89,13 +107,33 @@ HCRYPTMSG WINAPI CryptMsgOpenToDecode(DWORD dwMsgEncodingType, DWORD dwFlags,
...
@@ -89,13 +107,33 @@ HCRYPTMSG WINAPI CryptMsgOpenToDecode(DWORD dwMsgEncodingType, DWORD dwFlags,
HCRYPTMSG
WINAPI
CryptMsgDuplicate
(
HCRYPTMSG
hCryptMsg
)
HCRYPTMSG
WINAPI
CryptMsgDuplicate
(
HCRYPTMSG
hCryptMsg
)
{
{
FIXME
(
"(%p): stub
\n
"
,
hCryptMsg
);
TRACE
(
"(%p)
\n
"
,
hCryptMsg
);
if
(
hCryptMsg
)
{
CryptMsgBase
*
msg
=
(
CryptMsgBase
*
)
hCryptMsg
;
InterlockedIncrement
(
&
msg
->
ref
);
}
return
hCryptMsg
;
return
hCryptMsg
;
}
}
BOOL
WINAPI
CryptMsgClose
(
HCRYPTMSG
hCryptMsg
)
BOOL
WINAPI
CryptMsgClose
(
HCRYPTMSG
hCryptMsg
)
{
{
FIXME
(
"(%p): stub
\n
"
,
hCryptMsg
);
TRACE
(
"(%p)
\n
"
,
hCryptMsg
);
if
(
hCryptMsg
)
{
CryptMsgBase
*
msg
=
(
CryptMsgBase
*
)
hCryptMsg
;
if
(
InterlockedDecrement
(
&
msg
->
ref
)
==
0
)
{
TRACE
(
"freeing %p
\n
"
,
msg
);
if
(
msg
->
close
)
msg
->
close
(
msg
);
CryptMemFree
(
msg
);
}
}
return
TRUE
;
return
TRUE
;
}
}
...
...
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