GetFileVersionInfoSize doesn't work on PocketPC?
-
When I try to use the API function GetFileVersionInfoSize() to retrieve the size of the version resource in my PocketPC app the size returned is always zero. When I get the error value with GetLastError() the error value is: Error 1814: The specified resource name cannot be found in the image file. I am passing the name of my executable file to GetFileVersionInfoSize() as follows: The path to the executable is: My Device\debug\myappce.exe size = GetFileVersionInfoSize(_T("myappce.exe",&dummy); I have also tried: size = GetFileVersionInfoSize(_T("\\\\debug\\myappce.exe",&dummy); Is there something I am doing wrong ... are GetFileVersionInfoSize and the rest of the version API functions supported on PocketPC (winCE 4.2) ? Thanks, Tom
-
When I try to use the API function GetFileVersionInfoSize() to retrieve the size of the version resource in my PocketPC app the size returned is always zero. When I get the error value with GetLastError() the error value is: Error 1814: The specified resource name cannot be found in the image file. I am passing the name of my executable file to GetFileVersionInfoSize() as follows: The path to the executable is: My Device\debug\myappce.exe size = GetFileVersionInfoSize(_T("myappce.exe",&dummy); I have also tried: size = GetFileVersionInfoSize(_T("\\\\debug\\myappce.exe",&dummy); Is there something I am doing wrong ... are GetFileVersionInfoSize and the rest of the version API functions supported on PocketPC (winCE 4.2) ? Thanks, Tom
Try this TCHAR FileName[MAX_PATH + 3] = TEXT("\""); DWORD FileSize; DWORD InfoSize; FileSize = GetModuleFileName(NULL, FileName + 1, MAX_PATH+3); InfoSize = GetFileVersionInfoSize(FileName, &FileSize); The result? Sometimes it works sometimes it doesn't. Cheers. Don't know much < I, don't care much > I, while I am here ... just be happy :)