Moved the beginnings of some toolhelp exports to their own module.
[reactos.git] / reactos / lib / kernel32 / misc / toolhelp.c
1 /* $Id: toolhelp.c,v 1.1 2003/01/05 10:07:08 robd Exp $
2 *
3 * KERNEL32.DLL toolhelp functions
4 *
5 * COPYRIGHT: See COPYING in the top level directory
6 * PROJECT: ReactOS system libraries
7 * FILE: lib/kernel32/misc/toolhelp.c
8 * PURPOSE: Toolhelp functions
9 * PROGRAMMER: Robert Dickenson ( robd@mok.lvcm.com)
10 * UPDATE HISTORY:
11 * Created 05 January 2003
12 */
13
14 #include <windows.h>
15 #include <tlhelp32.h>
16
17
18 BOOL
19 STDCALL
20 Process32First(HANDLE hSnapshot, LPPROCESSENTRY32 lppe)
21 {
22 SetLastError(ERROR_NO_MORE_FILES);
23 return FALSE;
24 }
25
26 BOOL
27 STDCALL
28 Process32Next(HANDLE hSnapshot, LPPROCESSENTRY32 lppe)
29 {
30 SetLastError(ERROR_NO_MORE_FILES);
31 return FALSE;
32 }
33
34 BOOL
35 STDCALL
36 Process32FirstW(HANDLE hSnapshot, LPPROCESSENTRY32W lppe)
37 {
38 if (!lppe || lppe->dwSize != sizeof(PROCESSENTRY32W)) {
39 SetLastError(ERROR_INVALID_PARAMETER);
40 return FALSE;
41 }
42
43 SetLastError(ERROR_NO_MORE_FILES);
44 return FALSE;
45 }
46
47 BOOL
48 STDCALL
49 Process32NextW(HANDLE hSnapshot, LPPROCESSENTRY32W lppe)
50 {
51 SetLastError(ERROR_NO_MORE_FILES);
52 return FALSE;
53 }
54
55 HANDLE
56 STDCALL
57 CreateToolhelp32Snapshot(DWORD dwFlags, DWORD th32ProcessID)
58 {
59 // return open handle to snapshot on success, -1 on failure
60 // the snapshot handle behavies like an object handle
61 HANDLE hSnapshot = -1;
62
63 if (dwFlags & TH32CS_INHERIT) {
64 }
65 // if (dwFlags & TH32CS_SNAPALL) { // == (TH32CS_SNAPHEAPLIST + TH32CS_SNAPMODULE + TH32CS_SNAPPROCESS + TH32CS_SNAPTHREAD)
66 // }
67 if (dwFlags & TH32CS_SNAPHEAPLIST) {
68 }
69 if (dwFlags & TH32CS_SNAPMODULE) {
70 }
71 if (dwFlags & TH32CS_SNAPPROCESS) {
72 }
73 if (dwFlags & TH32CS_SNAPTHREAD) {
74 }
75
76 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
77
78 // caller must use CloseHandle to destroy the returned snapshot handle
79 return hSnapshot;
80 }
81
82 BOOL
83 WINAPI
84 Toolhelp32ReadProcessMemory(DWORD th32ProcessID,
85 LPCVOID lpBaseAddress, LPVOID lpBuffer,
86 DWORD cbRead, LPDWORD lpNumberOfBytesRead)
87 {
88 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
89 return FALSE;
90 }
91
92
93 /* EOF */