Commit 2e244c45 authored by Ulrich Weigand's avatar Ulrich Weigand Committed by Alexandre Julliard

Implemented CommonUnimpStub, MapHInst(LS|SL)_PN, W32S_BackTo32.

Stub for HouseCleanLogicallyDeadHandles, fixed k32wvsprintfA.
parent 5efaf50e
...@@ -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) {
} }
/*************************************************************************** /***************************************************************************
* MapHInstLS (KERNEL32.518) * MapHInstSL (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 ) {
......
...@@ -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 stub HouseCleanLogicallyDeadHandles 33 stdcall 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
......
...@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment