On Saturday, 11 January 2020 at 12:22:25 UTC, Marcone wrote:
    wchar[1024] szFileName = 0;
    ofn.lpstrFile = cast(LPWSTR) szFileName;

You shouldn't cast there, just use `szFileName.ptr` instead.

    ofn.nMaxFile = MAX_PATH;

and this should be the length of the array. It may require a case

nMaxFile = cast(DWORD) szFileName.length;

Reply via email to