home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tricks of the Windows Gam…ming Gurus (2nd Edition)
/
Disc2.iso
/
msdn_vcb
/
samples
/
vc98
/
sdk
/
sdktools
/
image
/
drwatson
/
walk.c
< prev
Wrap
C/C++ Source or Header
|
1995-03-15
|
1KB
|
87 lines
/*++
Copyright (c) 1993 Microsoft Corporation
Module Name:
walk.c
Abstract:
This file provides support for stack walking.
Author:
Wesley Witt (wesw) 1-May-1993
Environment:
User Mode
--*/
#include <windows.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "drwatson.h"
#include "proto.h"
LPVOID
SwFunctionTableAccess(
PDEBUGPACKET dp,
DWORD dwPCAddr
)
{
return SymFunctionTableAccess( dp->hProcess, dwPCAddr );
}
DWORD
SwGetModuleBase(
PDEBUGPACKET dp,
DWORD ReturnAddress
)
{
IMAGEHLP_MODULE ModuleInfo;
if (SymGetModuleInfo( dp->hProcess, ReturnAddress, &ModuleInfo )) {
return ModuleInfo.BaseOfImage;
}
return 0;
}
BOOL
SwReadProcessMemory(
PDEBUGPACKET dp,
LPCVOID lpBaseAddress,
LPVOID lpBuffer,
DWORD nSize,
LPDWORD lpNumberOfBytesRead
)
{
return DoMemoryRead(
dp,
lpBaseAddress,
lpBuffer,
nSize,
lpNumberOfBytesRead
);
}
DWORD
SwTranslateAddress(
PDEBUGPACKET dp,
HANDLE hThread,
LPADDRESS lpaddr
)
{
return 0;
}