mirror of
https://github.com/reactos/wine.git
synced 2024-11-29 22:50:43 +00:00
Changed SNOOP16_RegisterDLL to take a module handle instead of
pointer. Moved snoop function prototypes to kernel16_private.h.
This commit is contained in:
parent
4de9cfd1cd
commit
964b7fb14d
@ -153,6 +153,11 @@ extern void SELECTOR_FreeBlock( WORD sel );
|
||||
#define IS_SELECTOR_32BIT(sel) \
|
||||
(wine_ldt_is_system(sel) || (wine_ldt_copy.flags[LOWORD(sel) >> 3] & WINE_LDT_FLAGS_32BIT))
|
||||
|
||||
/* snoop16.c */
|
||||
extern void SNOOP16_RegisterDLL(HMODULE16,LPCSTR);
|
||||
extern FARPROC16 SNOOP16_GetProcAddress16(HMODULE16,DWORD,FARPROC16);
|
||||
extern int SNOOP16_ShowDebugmsgSnoop(const char *dll,int ord,const char *fname);
|
||||
|
||||
/* task.c */
|
||||
extern void TASK_CreateMainTask(void);
|
||||
extern HTASK16 TASK_SpawnTask( NE_MODULE *pModule, WORD cmdShow,
|
||||
|
@ -84,9 +84,6 @@ typedef struct
|
||||
|
||||
static const BUILTIN16_DESCRIPTOR *builtin_dlls[MAX_DLLS];
|
||||
|
||||
extern void SNOOP16_RegisterDLL(NE_MODULE*,LPCSTR);
|
||||
extern FARPROC16 SNOOP16_GetProcAddress16(HMODULE16,DWORD,FARPROC16);
|
||||
|
||||
static HINSTANCE16 NE_LoadModule( LPCSTR name, BOOL lib_only );
|
||||
static BOOL16 NE_FreeModule( HMODULE16 hModule, BOOL call_wep );
|
||||
|
||||
@ -941,7 +938,7 @@ static HMODULE16 NE_LoadExeHeader( HANDLE handle, LPCSTR path )
|
||||
else pModule->dlls_to_init = 0;
|
||||
|
||||
NE_RegisterModule( pModule );
|
||||
SNOOP16_RegisterDLL(pModule,path);
|
||||
SNOOP16_RegisterDLL(hModule,path);
|
||||
return hModule;
|
||||
}
|
||||
|
||||
|
@ -41,8 +41,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(snoop);
|
||||
|
||||
#include "pshpack1.h"
|
||||
|
||||
extern int SNOOP16_ShowDebugmsgSnoop(const char *dll,int ord,const char *fname);
|
||||
|
||||
void WINAPI SNOOP16_Entry(FARPROC proc, LPBYTE args, CONTEXT86 *context);
|
||||
void WINAPI SNOOP16_Return(FARPROC proc, LPBYTE args, CONTEXT86 *context);
|
||||
|
||||
@ -102,13 +100,13 @@ static SNOOP16_RELAY *snr;
|
||||
static HANDLE16 xsnr = 0;
|
||||
|
||||
void
|
||||
SNOOP16_RegisterDLL(NE_MODULE *pModule,LPCSTR name) {
|
||||
SNOOP16_RegisterDLL(HMODULE16 hModule,LPCSTR name) {
|
||||
SNOOP16_DLL **dll = &(firstdll);
|
||||
char *s;
|
||||
|
||||
if (!TRACE_ON(snoop)) return;
|
||||
|
||||
TRACE("hmod=%x, name=%s\n", pModule->self, name);
|
||||
TRACE("hmod=%x, name=%s\n", hModule, name);
|
||||
|
||||
if (!snr) {
|
||||
xsnr=GLOBAL_Alloc(GMEM_ZEROINIT,2*sizeof(*snr),0,WINE_LDT_FLAGS_CODE|WINE_LDT_FLAGS_32BIT);
|
||||
@ -134,7 +132,7 @@ SNOOP16_RegisterDLL(NE_MODULE *pModule,LPCSTR name) {
|
||||
snr[1].lret = 0xcb66;
|
||||
}
|
||||
while (*dll) {
|
||||
if ((*dll)->hmod == pModule->self)
|
||||
if ((*dll)->hmod == hModule)
|
||||
{
|
||||
/* another dll, loaded at the same address */
|
||||
GlobalUnlock16((*dll)->funhandle);
|
||||
@ -150,7 +148,7 @@ SNOOP16_RegisterDLL(NE_MODULE *pModule,LPCSTR name) {
|
||||
*dll = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(SNOOP16_DLL)+strlen(name));
|
||||
|
||||
(*dll)->next = NULL;
|
||||
(*dll)->hmod = pModule->self;
|
||||
(*dll)->hmod = hModule;
|
||||
if ((s=strrchr(name,'\\')))
|
||||
name = s+1;
|
||||
strcpy( (*dll)->name, name );
|
||||
@ -346,7 +344,7 @@ void WINAPI SNOOP16_Return(FARPROC proc, LPBYTE args, CONTEXT86 *context) {
|
||||
ret->origreturn = NULL; /* mark as empty */
|
||||
}
|
||||
#else /* !__i386__ */
|
||||
void SNOOP16_RegisterDLL(NE_MODULE *pModule,LPCSTR name) {
|
||||
void SNOOP16_RegisterDLL(HMODULE16 hModule,LPCSTR name) {
|
||||
if (!TRACE_ON(snoop)) return;
|
||||
FIXME("snooping works only on i386 for now.\n");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user