- error 998 Invalid access to memory location. Here's why:
- Posted by pete on April 9th, 2008
Post is only to document this misleading error message.
The error appears if I call a function that takes struct STARTUPINFO
as an argument and I forget to initialize the first member of the
struct to sizeof(STARTUPINFO):
Good: STARTUPINFO si = {sizeof(si)};
Bad: STARTUPINFO si;
Example:
STARTUPINFO si; // Bad
stat = CreateProcess( NULL, "myApp.exe", NULL, NULL, FALSE,
CREATE_NEW_CONSOLE, NULL, NULL, &si,
&pi );
returns 0 and GetLastError() returns 998.
-- Pete
- Posted by Christian ASTOR on April 9th, 2008
On 9 avr, 10:15, pete <pete...@yahoo.com> wrote:
Because you're certainly in Debug Mode.
In Release, you will get an Access violation...
Similar Posts
- Error loading NvCpl.dll - invalid access to memory location (Microsoft Windows) by hotister@hotmail.com
- what type of catch() variable for an invalid memory access? (Development Resources) by Dennis Edward
- "Invalid access to Memory Location" and Printui.dll - Errors on Install (Printers) by Doc
- Invalid memory access (Windows ME) by Mow Green
- Error 1606: Could not access network location (Windows NT) by Y.B.

