Damnit all. One more time. Thanks for the help Dimitry ;-)
Chris
On Monday 21 October 2002 07:52 pm, Dmitry Timoshkov wrote:
"Chris Morgan" cmorgan@alum.wpi.edu wrote:
- hFile = CreateFileA( filename, GENERIC_READ, FILE_SHARE_READ,
- NULL, OPEN_EXISTING, 0, 0);
if (hFile == INVALID_HANDLE_VALUE) return FALSE;
...
- fullCmdLine = HeapAlloc(GetProcessHeap(), 0, fullCmdLength);
- if(!fullCmdLine) return FALSE; /* return false on memory alloc failure
*/
You are still leaking a file handle here.
Why remove a CreateFileA call out of the reach of your new code since you don't use hFile at all?