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
fc67bbf2
Commit
fc67bbf2
authored
Nov 08, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ctapi32: Implement Wow64 entry points in the Unix library.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9f69a0dd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
14 deletions
+49
-14
ctapi32.c
dlls/ctapi32/ctapi32.c
+1
-3
unixlib.c
dlls/ctapi32/unixlib.c
+48
-6
unixlib.h
dlls/ctapi32/unixlib.h
+0
-5
No files found.
dlls/ctapi32/ctapi32.c
View file @
fc67bbf2
...
@@ -38,7 +38,6 @@ static unixlib_handle_t ctapi_handle;
...
@@ -38,7 +38,6 @@ static unixlib_handle_t ctapi_handle;
static
BOOL
load_functions
(
void
)
{
static
BOOL
load_functions
(
void
)
{
struct
attach_params
params
;
char
soname
[
MAX_PATH
]
=
FALLBACK_LIBCTAPI
;
char
soname
[
MAX_PATH
]
=
FALLBACK_LIBCTAPI
;
LONG
result
;
LONG
result
;
HKEY
key_handle
;
HKEY
key_handle
;
...
@@ -61,8 +60,7 @@ static BOOL load_functions(void) {
...
@@ -61,8 +60,7 @@ static BOOL load_functions(void) {
}
}
TRACE
(
"Loading library '%s'
\n
"
,
soname
);
TRACE
(
"Loading library '%s'
\n
"
,
soname
);
params
.
libname
=
soname
;
if
(
!
CTAPI_CALL
(
attach
,
soname
))
return
TRUE
;
if
(
!
CTAPI_CALL
(
attach
,
&
params
))
return
TRUE
;
MESSAGE
(
"Wine cannot find any usable hardware library, ctapi32.dll not working.
\n
"
);
MESSAGE
(
"Wine cannot find any usable hardware library, ctapi32.dll not working.
\n
"
);
MESSAGE
(
"Please create the key
\"
HKEY_CURRENT_USER
\\
Software
\\
Wine
\\
ctapi32
\"
in your registry
\n
"
);
MESSAGE
(
"Please create the key
\"
HKEY_CURRENT_USER
\\
Software
\\
Wine
\\
ctapi32
\"
in your registry
\n
"
);
...
...
dlls/ctapi32/unixlib.c
View file @
fc67bbf2
...
@@ -40,9 +40,9 @@ static void *ctapi_handle;
...
@@ -40,9 +40,9 @@ static void *ctapi_handle;
static
NTSTATUS
attach
(
void
*
args
)
static
NTSTATUS
attach
(
void
*
args
)
{
{
struct
attach_params
*
params
=
args
;
const
char
*
libname
=
args
;
if
(
!
(
ctapi_handle
=
dlopen
(
params
->
libname
,
RTLD_NOW
)))
return
STATUS_DLL_NOT_FOUND
;
if
(
!
(
ctapi_handle
=
dlopen
(
libname
,
RTLD_NOW
)))
return
STATUS_DLL_NOT_FOUND
;
#define LOAD_FUNCPTR(f) if((p##f = dlsym(ctapi_handle, #f)) == NULL) return STATUS_ENTRYPOINT_NOT_FOUND
#define LOAD_FUNCPTR(f) if((p##f = dlsym(ctapi_handle, #f)) == NULL) return STATUS_ENTRYPOINT_NOT_FOUND
LOAD_FUNCPTR
(
CT_init
);
LOAD_FUNCPTR
(
CT_init
);
...
@@ -60,14 +60,14 @@ static NTSTATUS detach( void *args )
...
@@ -60,14 +60,14 @@ static NTSTATUS detach( void *args )
static
NTSTATUS
ct_init
(
void
*
args
)
static
NTSTATUS
ct_init
(
void
*
args
)
{
{
struct
ct_init_params
*
params
=
args
;
const
struct
ct_init_params
*
params
=
args
;
return
pCT_init
(
params
->
ctn
,
params
->
pn
);
return
pCT_init
(
params
->
ctn
,
params
->
pn
);
}
}
static
NTSTATUS
ct_data
(
void
*
args
)
static
NTSTATUS
ct_data
(
void
*
args
)
{
{
struct
ct_data_params
*
params
=
args
;
const
struct
ct_data_params
*
params
=
args
;
return
pCT_data
(
params
->
ctn
,
params
->
dad
,
params
->
sad
,
params
->
lenc
,
return
pCT_data
(
params
->
ctn
,
params
->
dad
,
params
->
sad
,
params
->
lenc
,
params
->
command
,
params
->
lenr
,
params
->
response
);
params
->
command
,
params
->
lenr
,
params
->
response
);
...
@@ -75,12 +75,12 @@ static NTSTATUS ct_data( void *args )
...
@@ -75,12 +75,12 @@ static NTSTATUS ct_data( void *args )
static
NTSTATUS
ct_close
(
void
*
args
)
static
NTSTATUS
ct_close
(
void
*
args
)
{
{
struct
ct_close_params
*
params
=
args
;
const
struct
ct_close_params
*
params
=
args
;
return
pCT_close
(
params
->
ctn
);
return
pCT_close
(
params
->
ctn
);
}
}
unixlib_entry_t
__wine_unix_call_funcs
[]
=
const
unixlib_entry_t
__wine_unix_call_funcs
[]
=
{
{
attach
,
attach
,
detach
,
detach
,
...
@@ -88,3 +88,45 @@ unixlib_entry_t __wine_unix_call_funcs[] =
...
@@ -88,3 +88,45 @@ unixlib_entry_t __wine_unix_call_funcs[] =
ct_data
,
ct_data
,
ct_close
,
ct_close
,
};
};
#ifdef _WIN64
typedef
ULONG
PTR32
;
static
NTSTATUS
wow64_ct_data
(
void
*
args
)
{
struct
{
IU16
ctn
;
PTR32
dad
;
PTR32
sad
;
IU16
lenc
;
PTR32
command
;
PTR32
lenr
;
PTR32
response
;
}
const
*
params32
=
args
;
struct
ct_data_params
params
=
{
params32
->
ctn
,
ULongToPtr
(
params32
->
dad
),
ULongToPtr
(
params32
->
sad
),
params32
->
lenc
,
ULongToPtr
(
params32
->
command
),
ULongToPtr
(
params32
->
lenr
),
ULongToPtr
(
params32
->
response
)
};
return
ct_data
(
&
params
);
}
const
unixlib_entry_t
__wine_unix_call_wow64_funcs
[]
=
{
attach
,
detach
,
ct_init
,
wow64_ct_data
,
ct_close
,
};
#endif
/* _WIN64 */
dlls/ctapi32/unixlib.h
View file @
fc67bbf2
...
@@ -31,11 +31,6 @@ typedef unsigned short IU16;
...
@@ -31,11 +31,6 @@ typedef unsigned short IU16;
typedef
signed
char
IS8
;
typedef
signed
char
IS8
;
typedef
signed
short
IS16
;
typedef
signed
short
IS16
;
struct
attach_params
{
const
char
*
libname
;
};
struct
ct_init_params
struct
ct_init_params
{
{
IU16
ctn
;
IU16
ctn
;
...
...
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