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
7682bc6f
Commit
7682bc6f
authored
Feb 09, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rsaenh: Rename the HANDLETABLE structure to avoid conflicts with wingdi.h.
parent
8bb21b71
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
25 deletions
+25
-25
handle.c
dlls/rsaenh/handle.c
+12
-12
handle.h
dlls/rsaenh/handle.h
+12
-12
rsaenh.c
dlls/rsaenh/rsaenh.c
+1
-1
No files found.
dlls/rsaenh/handle.c
View file @
7682bc6f
...
...
@@ -47,7 +47,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(handle);
* You have to call destroy_handle_table when you don't need the table
* any more.
*/
void
init_handle_table
(
HANDLETABLE
*
lpTable
)
void
init_handle_table
(
struct
handle_table
*
lpTable
)
{
TRACE
(
"(lpTable=%p)
\n
"
,
lpTable
);
...
...
@@ -66,7 +66,7 @@ void init_handle_table(HANDLETABLE *lpTable)
* PARAMS
* lpTable [I] Pointer to the handle table, which is to be destroyed.
*/
void
destroy_handle_table
(
HANDLETABLE
*
lpTable
)
void
destroy_handle_table
(
struct
handle_table
*
lpTable
)
{
TRACE
(
"(lpTable=%p)
\n
"
,
lpTable
);
...
...
@@ -90,7 +90,7 @@ void destroy_handle_table(HANDLETABLE *lpTable)
* non zero, if handle is valid.
* zero, if handle is not valid.
*/
int
is_valid_handle
(
HANDLETABLE
*
lpTable
,
HCRYPTKEY
handle
,
DWORD
dwType
)
int
is_valid_handle
(
struct
handle_table
*
lpTable
,
HCRYPTKEY
handle
,
DWORD
dwType
)
{
unsigned
int
index
=
HANDLE2INDEX
(
handle
);
int
ret
=
0
;
...
...
@@ -132,20 +132,20 @@ exit:
* NOTES
* This is a support function for alloc_handle. Do not call!
*/
static
int
grow_handle_table
(
HANDLETABLE
*
lpTable
)
static
int
grow_handle_table
(
struct
handle_table
*
lpTable
)
{
HANDLETABLEENTRY
*
newEntries
;
struct
handle_table_entry
*
newEntries
;
unsigned
int
i
,
newIEntries
;
newIEntries
=
lpTable
->
iEntries
+
TABLE_SIZE_INCREMENT
;
newEntries
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
HANDLETABLEENTRY
)
*
newIEntries
);
newEntries
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
struct
handle_table_entry
)
*
newIEntries
);
if
(
!
newEntries
)
return
0
;
if
(
lpTable
->
paEntries
)
{
memcpy
(
newEntries
,
lpTable
->
paEntries
,
sizeof
(
HANDLETABLEENTRY
)
*
lpTable
->
iEntries
);
memcpy
(
newEntries
,
lpTable
->
paEntries
,
sizeof
(
struct
handle_table_entry
)
*
lpTable
->
iEntries
);
HeapFree
(
GetProcessHeap
(),
0
,
lpTable
->
paEntries
);
}
...
...
@@ -177,7 +177,7 @@ static int grow_handle_table(HANDLETABLE *lpTable)
* non zero, if successful
* zero, if not successful (no free handle)
*/
static
int
alloc_handle
(
HANDLETABLE
*
lpTable
,
OBJECTHDR
*
lpObject
,
HCRYPTKEY
*
lpHandle
)
static
int
alloc_handle
(
struct
handle_table
*
lpTable
,
OBJECTHDR
*
lpObject
,
HCRYPTKEY
*
lpHandle
)
{
int
ret
=
0
;
...
...
@@ -224,7 +224,7 @@ exit:
* non zero, if successful
* zero, if not successful (invalid handle)
*/
int
release_handle
(
HANDLETABLE
*
lpTable
,
HCRYPTKEY
handle
,
DWORD
dwType
)
int
release_handle
(
struct
handle_table
*
lpTable
,
HCRYPTKEY
handle
,
DWORD
dwType
)
{
unsigned
int
index
=
HANDLE2INDEX
(
handle
);
OBJECTHDR
*
pObject
;
...
...
@@ -269,7 +269,7 @@ exit:
* non zero, if successful
* zero, if not successful (invalid handle)
*/
int
lookup_handle
(
HANDLETABLE
*
lpTable
,
HCRYPTKEY
handle
,
DWORD
dwType
,
OBJECTHDR
**
lplpObject
)
int
lookup_handle
(
struct
handle_table
*
lpTable
,
HCRYPTKEY
handle
,
DWORD
dwType
,
OBJECTHDR
**
lplpObject
)
{
int
ret
=
0
;
...
...
@@ -304,7 +304,7 @@ exit:
* non zero, if successful
* zero, if not successful (invalid handle or out of memory)
*/
int
copy_handle
(
HANDLETABLE
*
lpTable
,
HCRYPTKEY
handle
,
DWORD
dwType
,
HCRYPTKEY
*
copy
)
int
copy_handle
(
struct
handle_table
*
lpTable
,
HCRYPTKEY
handle
,
DWORD
dwType
,
HCRYPTKEY
*
copy
)
{
OBJECTHDR
*
pObject
;
int
ret
;
...
...
@@ -347,7 +347,7 @@ int copy_handle(HANDLETABLE *lpTable, HCRYPTKEY handle, DWORD dwType, HCRYPTKEY
* INVALID_HANDLE_VALUE, if something went wrong.
* a handle to the new object, if successful.
*/
HCRYPTKEY
new_object
(
HANDLETABLE
*
lpTable
,
size_t
cbSize
,
DWORD
dwType
,
DESTRUCTOR
destructor
,
HCRYPTKEY
new_object
(
struct
handle_table
*
lpTable
,
size_t
cbSize
,
DWORD
dwType
,
DESTRUCTOR
destructor
,
OBJECTHDR
**
ppObject
)
{
OBJECTHDR
*
pObject
;
...
...
dlls/rsaenh/handle.h
View file @
7682bc6f
...
...
@@ -42,28 +42,28 @@ struct tagOBJECTHDR
DESTRUCTOR
destructor
;
};
typedef
struct
tagHANDLETABLEENTRY
struct
handle_table_entry
{
OBJECTHDR
*
pObject
;
unsigned
int
iNextFree
;
}
HANDLETABLEENTRY
;
};
typedef
struct
tagHANDLETABLE
struct
handle_table
{
unsigned
int
iEntries
;
unsigned
int
iFirstFree
;
HANDLETABLEENTRY
*
paEntries
;
struct
handle_table_entry
*
paEntries
;
CRITICAL_SECTION
mutex
;
}
HANDLETABLE
;
};
void
init_handle_table
(
HANDLETABLE
*
lpTable
);
void
destroy_handle_table
(
HANDLETABLE
*
lpTable
);
int
release_handle
(
HANDLETABLE
*
lpTable
,
HCRYPTKEY
handle
,
DWORD
dwType
);
int
copy_handle
(
HANDLETABLE
*
lpTable
,
HCRYPTKEY
handle
,
DWORD
dwType
,
HCRYPTKEY
*
copy
);
int
lookup_handle
(
HANDLETABLE
*
lpTable
,
HCRYPTKEY
handle
,
DWORD
dwType
,
OBJECTHDR
**
lplpObject
);
int
is_valid_handle
(
HANDLETABLE
*
lpTable
,
HCRYPTKEY
handle
,
DWORD
dwType
);
void
init_handle_table
(
struct
handle_table
*
lpTable
);
void
destroy_handle_table
(
struct
handle_table
*
lpTable
);
int
release_handle
(
struct
handle_table
*
lpTable
,
HCRYPTKEY
handle
,
DWORD
dwType
);
int
copy_handle
(
struct
handle_table
*
lpTable
,
HCRYPTKEY
handle
,
DWORD
dwType
,
HCRYPTKEY
*
copy
);
int
lookup_handle
(
struct
handle_table
*
lpTable
,
HCRYPTKEY
handle
,
DWORD
dwType
,
OBJECTHDR
**
lplpObject
);
int
is_valid_handle
(
struct
handle_table
*
lpTable
,
HCRYPTKEY
handle
,
DWORD
dwType
);
HCRYPTKEY
new_object
(
HANDLETABLE
*
lpTable
,
size_t
cbSize
,
DWORD
dwType
,
DESTRUCTOR
destructor
,
HCRYPTKEY
new_object
(
struct
handle_table
*
lpTable
,
size_t
cbSize
,
DWORD
dwType
,
DESTRUCTOR
destructor
,
OBJECTHDR
**
ppObject
);
#ifdef __cplusplus
...
...
dlls/rsaenh/rsaenh.c
View file @
7682bc6f
...
...
@@ -343,7 +343,7 @@ RSAENH_CPHashData(
/******************************************************************************
* CSP's handle table (used by all acquired key containers)
*/
static
HANDLETABLE
handle_table
;
static
struct
handle_table
handle_table
;
/******************************************************************************
* DllMain (RSAENH.@)
...
...
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