GetOpenFileName does not work in Cygwin
By ake.rehn... on April 25, 2010 14:21 (imported from Google Code)
What steps will reproduce the problem?
- Start insight
- Choose File->Open
or
- Compile this with $ gcc testdlg.c -mwindows -o testdlg.exe
#include <windows.h>
#include <commdlg.h>
#include <stdio.h>
main ()
{
OPENFILENAMEW ofn;
WCHAR file[100];
char s[256];
int result;
ZeroMemory(&ofn, sizeof(ofn));
ofn.lStructSize = sizeof(ofn);
ofn.nMaxFile = 100;
ofn.lpstrFile = (WCHAR *) file;
ofn.lpstrFile[0]= '\0';
MessageBox(NULL, "About to GetOpenFileNameW","akre",0);
result = GetOpenFileNameW(&ofn);
MessageBox(NULL, "GetOpenFileNameW return","akre",0);
}
- In cygwin bash: ./testdlg.exe
What is the expected output? What do you see instead?
Expect to see a File open dialog. Instead the program is terminated with
exit code 0xc0000417 (STATUS_INVALID_CRUNTIME_PARAMETER).
What version of the product are you using? On what operating system?
1.4.4.0 Windows XP SP2
Please provide any additional information below.
Removing tortoisegit makes the problem go away.