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
2e244c45
Commit
2e244c45
authored
Oct 11, 1998
by
Ulrich Weigand
Committed by
Alexandre Julliard
Oct 11, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented CommonUnimpStub, MapHInst(LS|SL)_PN, W32S_BackTo32.
Stub for HouseCleanLogicallyDeadHandles, fixed k32wvsprintfA.
parent
5efaf50e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
9 deletions
+60
-9
module.c
loader/ne/module.c
+22
-2
kernel32.spec
relay32/kernel32.spec
+6
-6
ordinals.c
win32/ordinals.c
+32
-1
No files found.
loader/ne/module.c
View file @
2e244c45
...
@@ -293,6 +293,10 @@ WORD NE_GetOrdinal( HMODULE16 hModule, const char *name )
...
@@ -293,6 +293,10 @@ WORD NE_GetOrdinal( HMODULE16 hModule, const char *name )
*/
*/
FARPROC16
NE_GetEntryPoint
(
HMODULE16
hModule
,
WORD
ordinal
)
FARPROC16
NE_GetEntryPoint
(
HMODULE16
hModule
,
WORD
ordinal
)
{
{
return
NE_GetEntryPointEx
(
hModule
,
ordinal
,
TRUE
);
}
FARPROC16
NE_GetEntryPointEx
(
HMODULE16
hModule
,
WORD
ordinal
,
BOOL16
snoop
)
{
NE_MODULE
*
pModule
;
NE_MODULE
*
pModule
;
WORD
curOrdinal
=
1
;
WORD
curOrdinal
=
1
;
BYTE
*
p
;
BYTE
*
p
;
...
@@ -335,7 +339,7 @@ FARPROC16 NE_GetEntryPoint( HMODULE16 hModule, WORD ordinal )
...
@@ -335,7 +339,7 @@ FARPROC16 NE_GetEntryPoint( HMODULE16 hModule, WORD ordinal )
else
sel
=
GlobalHandleToSel
(
NE_SEG_TABLE
(
pModule
)[
sel
-
1
].
hSeg
);
else
sel
=
GlobalHandleToSel
(
NE_SEG_TABLE
(
pModule
)[
sel
-
1
].
hSeg
);
if
(
sel
==
0xffff
)
if
(
sel
==
0xffff
)
return
(
FARPROC16
)
PTR_SEG_OFF_TO_SEGPTR
(
sel
,
offset
);
return
(
FARPROC16
)
PTR_SEG_OFF_TO_SEGPTR
(
sel
,
offset
);
if
(
!
fnSNOOP16_GetProcAddress16
)
if
(
!
snoop
||
!
fnSNOOP16_GetProcAddress16
)
return
(
FARPROC16
)
PTR_SEG_OFF_TO_SEGPTR
(
sel
,
offset
);
return
(
FARPROC16
)
PTR_SEG_OFF_TO_SEGPTR
(
sel
,
offset
);
else
else
return
(
FARPROC16
)
fnSNOOP16_GetProcAddress16
(
hModule
,
ordinal
,(
FARPROC16
)
PTR_SEG_OFF_TO_SEGPTR
(
sel
,
offset
));
return
(
FARPROC16
)
fnSNOOP16_GetProcAddress16
(
hModule
,
ordinal
,(
FARPROC16
)
PTR_SEG_OFF_TO_SEGPTR
(
sel
,
offset
));
...
@@ -1165,13 +1169,29 @@ REGS_ENTRYPOINT(MapHInstLS) {
...
@@ -1165,13 +1169,29 @@ REGS_ENTRYPOINT(MapHInstLS) {
}
}
/***************************************************************************
/***************************************************************************
* MapHInst
LS
(KERNEL32.518)
* MapHInst
SL
(KERNEL32.518)
*/
*/
REGS_ENTRYPOINT
(
MapHInstSL
)
{
REGS_ENTRYPOINT
(
MapHInstSL
)
{
EAX_reg
(
context
)
=
MapHModuleSL
(
EAX_reg
(
context
));
EAX_reg
(
context
)
=
MapHModuleSL
(
EAX_reg
(
context
));
}
}
/***************************************************************************
/***************************************************************************
* MapHInstLS_PN (KERNEL32.517)
*/
REGS_ENTRYPOINT
(
MapHInstLS_PN
)
{
if
(
EAX_reg
(
context
))
EAX_reg
(
context
)
=
MapHModuleLS
(
EAX_reg
(
context
));
}
/***************************************************************************
* MapHInstSL_PN (KERNEL32.519)
*/
REGS_ENTRYPOINT
(
MapHInstSL_PN
)
{
if
(
EAX_reg
(
context
))
EAX_reg
(
context
)
=
MapHModuleSL
(
EAX_reg
(
context
));
}
/***************************************************************************
* WIN16_MapHInstLS (KERNEL.472)
* WIN16_MapHInstLS (KERNEL.472)
*/
*/
VOID
WINAPI
WIN16_MapHInstLS
(
CONTEXT
*
context
)
{
VOID
WINAPI
WIN16_MapHInstLS
(
CONTEXT
*
context
)
{
...
...
relay32/kernel32.spec
View file @
2e244c45
...
@@ -27,8 +27,8 @@ type win32
...
@@ -27,8 +27,8 @@ type win32
13 stdcall k32OemToCharBuffA(ptr ptr long) OemToCharBuff32A
13 stdcall k32OemToCharBuffA(ptr ptr long) OemToCharBuff32A
14 stdcall k32LoadStringA(long long ptr long) LoadString32A
14 stdcall k32LoadStringA(long long ptr long) LoadString32A
15 varargs k32wsprintfA() wsprintf32A
15 varargs k32wsprintfA() wsprintf32A
16 stdcall k32wvsprintfA() wvsprintf32A
16 stdcall k32wvsprintfA(
ptr str ptr
) wvsprintf32A
17
stub
CommonUnimpStub
17
register CommonUnimpStub()
CommonUnimpStub
18 stdcall GetProcessDword(long long) GetProcessDword
18 stdcall GetProcessDword(long long) GetProcessDword
19 stub ThunkTheTemplateHandle
19 stub ThunkTheTemplateHandle
20 stub DosFileHandleToWin32Handle
20 stub DosFileHandleToWin32Handle
...
@@ -44,7 +44,7 @@ type win32
...
@@ -44,7 +44,7 @@ type win32
30 stdcall GlobalUnWire16(long) GlobalUnWire16
30 stdcall GlobalUnWire16(long) GlobalUnWire16
31 stdcall GlobalFree16(long) GlobalFree16
31 stdcall GlobalFree16(long) GlobalFree16
32 stdcall GlobalSize16(long) GlobalSize16
32 stdcall GlobalSize16(long) GlobalSize16
33 st
ub
HouseCleanLogicallyDeadHandles
33 st
dcall HouseCleanLogicallyDeadHandles()
HouseCleanLogicallyDeadHandles
34 stdcall GetWin16DOSEnv() GetWin16DOSEnv
34 stdcall GetWin16DOSEnv() GetWin16DOSEnv
35 stdcall LoadLibrary16(str) LoadLibrary16
35 stdcall LoadLibrary16(str) LoadLibrary16
36 stdcall FreeLibrary16(long) FreeLibrary16
36 stdcall FreeLibrary16(long) FreeLibrary16
...
@@ -62,7 +62,7 @@ type win32
...
@@ -62,7 +62,7 @@ type win32
48 stdcall ReleaseThunkLock(ptr) ReleaseThunkLock
48 stdcall ReleaseThunkLock(ptr) ReleaseThunkLock
49 stdcall RestoreThunkLock(long) RestoreThunkLock
49 stdcall RestoreThunkLock(long) RestoreThunkLock
50 stdcall AddAtomA(str) AddAtom32A
50 stdcall AddAtomA(str) AddAtom32A
51
stub
W32S_BackTo32
51
register W32S_BackTo32()
W32S_BackTo32
52 stdcall GetThunkBuff() GetThunkBuff
52 stdcall GetThunkBuff() GetThunkBuff
53 stdcall GetThunkStuff(str str) GetThunkStuff
53 stdcall GetThunkStuff(str str) GetThunkStuff
54 stdcall K32WOWCallback16(long long) WOWCallback16
54 stdcall K32WOWCallback16(long long) WOWCallback16
...
@@ -531,9 +531,9 @@ type win32
...
@@ -531,9 +531,9 @@ type win32
514 stdcall LockResource(long) LockResource32
514 stdcall LockResource(long) LockResource32
515 stdcall MakeCriticalSectionGlobal(ptr) MakeCriticalSectionGlobal
515 stdcall MakeCriticalSectionGlobal(ptr) MakeCriticalSectionGlobal
516 register MapHInstLS() MapHInstLS
516 register MapHInstLS() MapHInstLS
517
stub
MapHInstLS_PN
517
register MapHInstLS_PN()
MapHInstLS_PN
518 register MapHInstSL() MapHInstSL
518 register MapHInstSL() MapHInstSL
519
stub
MapHInstSL_PN
519
register MapHInstSL_PN()
MapHInstSL_PN
520 stdcall MapHModuleLS(long) MapHModuleLS
520 stdcall MapHModuleLS(long) MapHModuleLS
521 stdcall MapHModuleSL(long) MapHModuleSL
521 stdcall MapHModuleSL(long) MapHModuleSL
522 stdcall MapLS(ptr) MapLS
522 stdcall MapLS(ptr) MapLS
...
...
win32/ordinals.c
View file @
2e244c45
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
#include "module.h"
#include "module.h"
#include "task.h"
#include "task.h"
#include "callback.h"
#include "callback.h"
#include "stackframe.h"
#include "debug.h"
#include "debug.h"
/**********************************************************************
/**********************************************************************
...
@@ -90,7 +91,7 @@ DWORD WINAPI GetProcessDword(DWORD processid,DWORD action)
...
@@ -90,7 +91,7 @@ DWORD WINAPI GetProcessDword(DWORD processid,DWORD action)
case
52
:
/* return process flags */
case
52
:
/* return process flags */
return
process
->
flags
;
return
process
->
flags
;
case
56
:
/* unexplored */
case
56
:
/* unexplored */
return
0
;
return
process
->
process_dword
;
default:
default:
WARN
(
win32
,
"Unknown offset (%ld)
\n
"
,
action
);
WARN
(
win32
,
"Unknown offset (%ld)
\n
"
,
action
);
return
0
;
return
0
;
...
@@ -112,6 +113,7 @@ VOID WINAPI SetProcessDword(DWORD processid,DWORD action,DWORD value)
...
@@ -112,6 +113,7 @@ VOID WINAPI SetProcessDword(DWORD processid,DWORD action,DWORD value)
if
(
!
process
||
action
>
56
)
return
;
if
(
!
process
||
action
>
56
)
return
;
switch
(
action
)
{
switch
(
action
)
{
case
56
:
process
->
process_dword
=
value
;
break
;
default:
default:
FIXME
(
win32
,
"Unknown offset (%ld)
\n
"
,
action
);
FIXME
(
win32
,
"Unknown offset (%ld)
\n
"
,
action
);
break
;
break
;
...
@@ -139,6 +141,35 @@ LPVOID WINAPI GetPK16SysVar(void)
...
@@ -139,6 +141,35 @@ LPVOID WINAPI GetPK16SysVar(void)
return
PK16SysVar
;
return
PK16SysVar
;
}
}
/**********************************************************************
* CommonUnimpStub (KERNEL32.17)
*/
REGS_ENTRYPOINT
(
CommonUnimpStub
)
{
if
(
EAX_reg
(
context
))
MSG
(
"*** Unimplemented Win32 API: %s
\n
"
,
EAX_reg
(
context
)
);
switch
((
ECX_reg
(
context
)
>>
4
)
&
0x0f
)
{
case
15
:
EAX_reg
(
context
)
=
-
1
;
break
;
case
14
:
EAX_reg
(
context
)
=
0x78
;
break
;
case
13
:
EAX_reg
(
context
)
=
0x32
;
break
;
case
1
:
EAX_reg
(
context
)
=
1
;
break
;
default
:
EAX_reg
(
context
)
=
0
;
break
;
}
ESP_reg
(
context
)
+=
(
ECX_reg
(
context
)
&
0x0f
)
*
4
;
}
/**********************************************************************
* HouseCleanLogicallyDeadHandles (KERNEL32.33)
*/
void
WINAPI
HouseCleanLogicallyDeadHandles
(
void
)
{
/* Whatever this is supposed to do, our handles probably
don't need it :-) */
}
BOOL32
WINAPI
_KERNEL32_100
(
HANDLE32
threadid
,
DWORD
exitcode
,
DWORD
x
)
{
BOOL32
WINAPI
_KERNEL32_100
(
HANDLE32
threadid
,
DWORD
exitcode
,
DWORD
x
)
{
FIXME
(
thread
,
"(%d,%ld,0x%08lx): stub
\n
"
,
threadid
,
exitcode
,
x
);
FIXME
(
thread
,
"(%d,%ld,0x%08lx): stub
\n
"
,
threadid
,
exitcode
,
x
);
...
...
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