- Timestamp:
- Dec 18, 1999, 6:17:55 PM (26 years ago)
- Location:
- trunk/src/kernel32
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/exceptutil.asm
r737 r2115 1 ; $Id: exceptutil.asm,v 1. 2 1999-08-29 14:56:02sandervl Exp $1 ; $Id: exceptutil.asm,v 1.3 1999-12-18 17:17:54 sandervl Exp $ 2 2 3 3 ;/* … … 174 174 SetFS endp 175 175 176 PUBLIC getCS 177 getCS proc near 178 mov eax, cs 179 ret 180 getCS endp 181 182 PUBLIC getDS 183 getDS proc near 184 mov eax, ds 185 ret 186 getDS endp 187 176 188 PUBLIC SetReturnFS 177 189 SetReturnFS proc near -
trunk/src/kernel32/stubs.cpp
r2111 r2115 1 /* $Id: stubs.cpp,v 1.1 3 1999-12-18 16:19:19sandervl Exp $ */1 /* $Id: stubs.cpp,v 1.14 1999-12-18 17:17:55 sandervl Exp $ */ 2 2 3 3 /* … … 20 20 #include <builtin.h> 21 21 #include "handlemanager.h" 22 #include <string.h> 22 23 23 24 #include "stubs.h" … … 2498 2499 cbRead, 2499 2500 lpNumberOfBytesRead)); 2500 2501 return (FALSE); 2501 // FIXME: check this, if we ever run win32 binaries in different addressspaces 2502 // ... and add a sizecheck 2503 memcpy(lpBuffer,lpBaseAddress,cbRead); 2504 if (lpNumberOfBytesRead) *lpNumberOfBytesRead = cbRead; 2505 return TRUE; 2506 } 2507 2508 /***************************************************************************** 2509 * Name : DWORD WriteProcessMemory 2510 * Purpose : The WriteProcessMemory function writes memory in a specified 2511 * process. The entire area to be written to must be accessible, 2512 * or the operation fails. 2513 * Parameters: HANDLE hProcess handle of process whose memory is written to 2514 * LPVOID lpBaseAddress address to start writing to 2515 * LPVOID lpBuffer address of buffer to write data to 2516 * DWORD cbWrite number of bytes to write 2517 * LPDWORD lpNumberOfBytesWritten actual number of bytes written 2518 * Variables : 2519 * Result : TRUE / FALSE 2520 * Remark : 2521 * Status : UNTESTED STUB 2522 * 2523 * Author : Patrick Haller [Mon, 1998/06/15 08:00] 2524 *****************************************************************************/ 2525 2526 DWORD WIN32API WriteProcessMemory(HANDLE hProcess, 2527 LPCVOID lpBaseAddress, 2528 LPVOID lpBuffer, 2529 DWORD cbWrite, 2530 LPDWORD lpNumberOfBytesWritten) 2531 { 2532 dprintf(("Kernel32: WriteProcessMemory(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n", 2533 hProcess, 2534 lpBaseAddress, 2535 lpBuffer, 2536 cbWrite, 2537 lpNumberOfBytesWritten)); 2538 2539 // FIXME: check this, if we ever run win32 binaries in different addressspaces 2540 // ... and add a sizecheck 2541 memcpy((void*)lpBaseAddress,lpBuffer,cbWrite); 2542 if (lpNumberOfBytesWritten) *lpNumberOfBytesWritten = cbWrite; 2543 return TRUE; 2502 2544 } 2503 2545 … … 2996 3038 2997 3039 2998 /*****************************************************************************2999 * Name : DWORD WriteProcessMemory3000 * Purpose : The WriteProcessMemory function writes memory in a specified3001 * process. The entire area to be written to must be accessible,3002 * or the operation fails.3003 * Parameters: HANDLE hProcess handle of process whose memory is written to3004 * LPVOID lpBaseAddress address to start writing to3005 * LPVOID lpBuffer address of buffer to write data to3006 * DWORD cbWrite number of bytes to write3007 * LPDWORD lpNumberOfBytesWritten actual number of bytes written3008 * Variables :3009 * Result : TRUE / FALSE3010 * Remark :3011 * Status : UNTESTED STUB3012 *3013 * Author : Patrick Haller [Mon, 1998/06/15 08:00]3014 *****************************************************************************/3015 3016 DWORD WIN32API WriteProcessMemory(HANDLE hProcess,3017 LPCVOID lpBaseAddress,3018 LPVOID lpBuffer,3019 DWORD cbWrite,3020 LPDWORD lpNumberOfBytesWritten)3021 {3022 dprintf(("Kernel32: WriteProcessMemory(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",3023 hProcess,3024 lpBaseAddress,3025 lpBuffer,3026 cbWrite,3027 lpNumberOfBytesWritten));3028 3029 return (FALSE);3030 }3031 3040 3032 3041 -
trunk/src/kernel32/thread.cpp
r1898 r2115 1 /* $Id: thread.cpp,v 1.1 8 1999-11-30 20:19:34sandervl Exp $ */1 /* $Id: thread.cpp,v 1.19 1999-12-18 17:17:55 sandervl Exp $ */ 2 2 3 3 /* … … 28 28 #include <windllbase.h> 29 29 #include <winexebase.h> 30 #include "exceptutil.h" 30 31 31 32 ODINDEBUGCHANNEL(KERNEL32-THREAD) … … 142 143 BOOL WIN32API GetThreadContext(HANDLE hThread, PCONTEXT lpContext) 143 144 { 145 USHORT cs, ds; 146 144 147 dprintf(("GetThreadContext NOT IMPLEMENTED!! (TRUE)\n")); 145 148 memset(lpContext, 0, sizeof(CONTEXT)); 149 150 /* make up some plausible values for segment registers */ 151 cs = getCS(); 152 ds = getDS(); 153 lpContext->SegCs = cs; 154 lpContext->SegDs = ds; 155 lpContext->SegEs = ds; 156 lpContext->SegGs = ds; 157 lpContext->SegSs = ds; 158 lpContext->SegFs = ds; 159 146 160 return TRUE; 147 161 }
Note:
See TracChangeset
for help on using the changeset viewer.