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
d22003e3
Commit
d22003e3
authored
Aug 31, 2006
by
Paul Vriens
Committed by
Alexandre Julliard
Sep 07, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wintrust: Moved the generation of the guidstring to a separate function.
parent
3747f223
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
14 deletions
+20
-14
register.c
dlls/wintrust/register.c
+20
-14
No files found.
dlls/wintrust/register.c
View file @
d22003e3
...
...
@@ -50,6 +50,23 @@ static const WCHAR DiagnosticPolicy[] = {'D','i','a','g','n','o','s','t','i','c'
static
const
WCHAR
Cleanup
[]
=
{
'C'
,
'l'
,
'e'
,
'a'
,
'n'
,
'u'
,
'p'
,
'\\'
,
0
};
/***********************************************************************
* WINTRUST_guid2wstr
*
* Create a wide-string from a GUID
*
*/
static
void
WINTRUST_Guid2Wstr
(
GUID
*
pgActionID
,
WCHAR
*
GuidString
)
{
static
const
WCHAR
wszFormat
[]
=
{
'{'
,
'%'
,
'0'
,
'8'
,
'l'
,
'X'
,
'-'
,
'%'
,
'0'
,
'4'
,
'X'
,
'-'
,
'%'
,
'0'
,
'4'
,
'X'
,
'-'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'-'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'}'
,
0
};
wsprintfW
(
GuidString
,
wszFormat
,
pgActionID
->
Data1
,
pgActionID
->
Data2
,
pgActionID
->
Data3
,
pgActionID
->
Data4
[
0
],
pgActionID
->
Data4
[
1
],
pgActionID
->
Data4
[
2
],
pgActionID
->
Data4
[
3
],
pgActionID
->
Data4
[
4
],
pgActionID
->
Data4
[
5
],
pgActionID
->
Data4
[
6
],
pgActionID
->
Data4
[
7
]);
}
/***********************************************************************
* WINTRUST_WriteProviderToReg
*
* Helper function for WintrustAddActionID
...
...
@@ -118,10 +135,6 @@ error_close_key:
BOOL
WINAPI
WintrustAddActionID
(
GUID
*
pgActionID
,
DWORD
fdwFlags
,
CRYPT_REGISTER_ACTIONID
*
psProvInfo
)
{
static
const
WCHAR
wszFormat
[]
=
{
'{'
,
'%'
,
'0'
,
'8'
,
'l'
,
'X'
,
'-'
,
'%'
,
'0'
,
'4'
,
'X'
,
'-'
,
'%'
,
'0'
,
'4'
,
'X'
,
'-'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'-'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'}'
,
0
};
WCHAR
GuidString
[
39
];
LONG
Res
;
LONG
WriteActionError
=
ERROR_SUCCESS
;
...
...
@@ -141,9 +154,8 @@ BOOL WINAPI WintrustAddActionID( GUID* pgActionID, DWORD fdwFlags,
}
/* Create this string only once, instead of in the helper function */
wsprintfW
(
GuidString
,
wszFormat
,
pgActionID
->
Data1
,
pgActionID
->
Data2
,
pgActionID
->
Data3
,
pgActionID
->
Data4
[
0
],
pgActionID
->
Data4
[
1
],
pgActionID
->
Data4
[
2
],
pgActionID
->
Data4
[
3
],
pgActionID
->
Data4
[
4
],
pgActionID
->
Data4
[
5
],
pgActionID
->
Data4
[
6
],
pgActionID
->
Data4
[
7
]);
WINTRUST_Guid2Wstr
(
pgActionID
,
GuidString
);
/* Write the information to the registry */
Res
=
WINTRUST_WriteProviderToReg
(
GuidString
,
Initialization
,
psProvInfo
->
sInitProvider
);
...
...
@@ -223,10 +235,6 @@ static void WINTRUST_RemoveProviderFromReg(WCHAR* GuidString,
*/
BOOL
WINAPI
WintrustRemoveActionID
(
GUID
*
pgActionID
)
{
static
const
WCHAR
wszFormat
[]
=
{
'{'
,
'%'
,
'0'
,
'8'
,
'l'
,
'X'
,
'-'
,
'%'
,
'0'
,
'4'
,
'X'
,
'-'
,
'%'
,
'0'
,
'4'
,
'X'
,
'-'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'-'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'%'
,
'0'
,
'2'
,
'X'
,
'}'
,
0
};
WCHAR
GuidString
[
39
];
TRACE
(
"(%s)
\n
"
,
debugstr_guid
(
pgActionID
));
...
...
@@ -238,9 +246,7 @@ BOOL WINAPI WintrustRemoveActionID( GUID* pgActionID )
}
/* Create this string only once, instead of in the helper function */
wsprintfW
(
GuidString
,
wszFormat
,
pgActionID
->
Data1
,
pgActionID
->
Data2
,
pgActionID
->
Data3
,
pgActionID
->
Data4
[
0
],
pgActionID
->
Data4
[
1
],
pgActionID
->
Data4
[
2
],
pgActionID
->
Data4
[
3
],
pgActionID
->
Data4
[
4
],
pgActionID
->
Data4
[
5
],
pgActionID
->
Data4
[
6
],
pgActionID
->
Data4
[
7
]);
WINTRUST_Guid2Wstr
(
pgActionID
,
GuidString
);
/* We don't care about success or failure */
WINTRUST_RemoveProviderFromReg
(
GuidString
,
Initialization
);
...
...
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