Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This structure contains process creation information that can be used by a debugger.
Syntax
typedef struct _CREATE_PROCESS_DEBUG_INFO { HANDLE hFile; HANDLE hProcess; HANDLE hThread; LPVOID lpBaseOfImage; DWORD dwDebugInfoFileOffset; DWORD nDebugInfoSize; LPVOID lpThreadLocalBase; LPTHREAD_START_ROUTINE lpStartAddress; LPVOID lpImageName; WORD fUnicode; } CREATE_PROCESS_DEBUG_INFO; |
Members
- hFile
-
Handle to the process's image file.
In Windows Embedded CE, this member is always NULL.
- hProcess
-
Handle to the process.
If this member is NULL, the handle is not valid.
Otherwise, the debugger can use the member to read from and write to the process's memory.
- hThread
-
Handle to the initial thread of the process identified by the hProcessmember.
If hThreadis NULL, the handle is not valid.
Otherwise, the debugger has THREAD_GET_CONTEXT, THREAD_SET_CONTEXT, and THREAD_SUSPEND_RESUME access to the thread, allowing the debugger to read from and write to the registers of the thread and to control execution of the thread.
- lpBaseOfImage
-
Pointer to the base address of the executable image that the process is running.
- dwDebugInfoFileOffset
-
Offset to the debugging information in the file identified by the hFilemember.
This member is always set to 0.
- nDebugInfoSize
-
Size, in bytes, of the debugging information in the file.
This member is always set to 0.
- lpThreadLocalBase
-
Pointer to a block of data.
At offset 0x2C into this block is another pointer, called ThreadLocalStoragePointer, that points to an array of per-module thread local storage blocks.
This gives a debugger access to per-thread data in the threads of the process being debugged using the same algorithms that a compiler would use.
- lpStartAddress
-
Pointer to the starting address of the thread.
This value might only be an approximation of the thread's starting address because any application with appropriate access to the thread can change the thread's context by using the SetThreadContextfunction.
- lpImageName
-
Pointer to the file name associated with the hFilemember.
This member might be NULL, or it might contain the address of a string pointer in the address space of the process being debugged. That address might, in turn, either be NULL or point to the actual file name.
If fUnicodeis a nonzero value, the name string is Unicode; otherwise, it is ANSI.
This member is optional.
Debuggers must be prepared to handle the case where lpImageNameis NULL or where *lpImageName, in the address space of the process being debugged, is NULL.
Specifically, the system does not provide an image name for a create process event, and will not likely pass an image name for the first DLL event.
The system also does not provide this information in the case of debug events that originate from a call to the DebugActiveProcessfunction.
- fUnicode
-
Indicates whether a file name specified by the lpImageNamemember is Unicode or ANSI.
If this value is nonzero, the file name is Unicode.
If this value is 0, the file name is ASCII.
Remarks
The lpImageNamemember is a pointer into the address space of the process that is being debugged.
To retrieve the actual image name, use the ReadProcessMemoryfunction, as shown in the following code example:
Copy Code | |
---|---|
ReadProcessMemory( hProcess, lpImageName, lpBuffer, nSize, &NumberOfBytesRead ); |
For the DebugActiveProcessfunction, if the dwDebugEventCodemember of the DEBUG_EVENTstructure has a value of CREATE_PROCESS_DEBUG_EVENT or CREATE_THREAD_DEBUG_EVENT, the lpStartAddressmember is NULL.
The lpThreadLocalBasemember points directly to the thread local storage (TLS) data block of the process that is being debugged.
To obtain the TLS data for a slot, call the ReadProcessMemoryfunction and then pass the following calculated value for the lpBaseAddressparameter: lpThreadLocalBase+4*<slot number>.
Requirements
Header | winbase.h |
Windows Embedded CE | Windows CE 2.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |