MiniDumpWriteDump fails with MiniDumpNormal but works with MiniDumpWithFullMemory
===

I'm calling [MiniDumpWriteDump][1] API from a top level exception handler from a local service app running on Windows XP SP3 like so:

    _MINIDUMP_EXCEPTION_INFORMATION ExInfo;
    DWORD dwProcID = ::GetCurrentProcessId();
    DWORD dwThreadID = ::GetCurrentThreadId();
    
    ExInfo.ThreadId = dwThreadID;
    ExInfo.ExceptionPointers = pExceptionInfo;   //Receive it from the exception handler
    ExInfo.ClientPointers = NULL;
    
    if(!pfnMiniDumpWriteDump(GetCurrentProcess(), dwProcID, hFile, MiniDumpNormal, &ExInfo, NULL, NULL))
    {
    	int nOSError = ::GetLastError();	//I receive 0x80070057
    }

The above fails with the error code 0x80070057, but if I change the dump type to MiniDumpWithFullMemory it works just fine. Any idea why?


  [1]: http://msdn.microsoft.com/en-us/library/windows/desktop/ms680360%28v=vs.85%29.aspx