to see which Windows functions XnView calls after receiving filename from my addon to load new picture from file by using SDK's LoadBitmap().
Code: Select all
WideCharToMultiByte ( CP_ACP, 0, "D:\4354~1\D7E0~1\F695~1.JPG", -1, 0x000537b4, 261, NULL, NULL )
GetWindowLongA ( 0x00010462, GWL_USERDATA )
LoadCursorA ( NULL, IDC_WAIT )
SetCursor ( 0x00010015 )
FindFirstFileA ( "D:\4354~1\D7E0~1\F695~1.JPG", 0x00052df4 )
memmove ( 0x00052a98, 0x000527e6, 36 )
memmove ( 0x00052ca0, 0x000527ce, 20 )
memmove ( 0x00052df4, 0x00052a6c, 44 )
FindClose ( 0x00199770 )
CreateFileA ( "D:\4354~1\D7E0~1\F695~1.JPG", GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, 0x00052f0c, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL )
GetFileType ( 0x00000188 )
SetFilePointer ( 0x00000188, 0, NULL, FILE_BEGIN )
ReadFile ( 0x00000188, 0x01909b28, 4096, 0x00052a00, NULL )
ReadFile ( 0x00000188, 0x01909b28, 4096, 0x0005295c, NULL )
ReadFile ( 0x00000188, 0x01909b28, 4096, 0x0005295c, NULL )
ReadFile ( 0x00000188, 0x01909b28, 4096, 0x0005295c, NULL )
ReadFile ( 0x00000188, 0x01909b28, 4096, 0x0005295c, NULL )
ReadFile ( 0x00000188, 0x01909b28, 4096, 0x0005295c, NULL )
ReadFile ( 0x00000188, 0x01909b28, 4096, 0x0005295c, NULL )
ReadFile ( 0x00000188, 0x01909b28, 4096, 0x0005295c, NULL )
ReadFile ( 0x00000188, 0x01909b28, 4096, 0x0005295c, NULL )
ReadFile ( 0x00000188, 0x01909b28, 4096, 0x0005295c, NULL )
ReadFile ( 0x00000188, 0x01909b28, 4096, 0x0005295c, NULL )
ReadFile ( 0x00000188, 0x01909b28, 4096, 0x0005295c, NULL )
ReadFile ( 0x00000188, 0x01899758, 4096, 0x00052948, NULL )
I'm not sure what for is called FindFirstFileA(), since returned handle isn't used anywhere.
But handle returned by CreateFileA() is used only by bunch of calls to ReadFile(), therefore I assume this handle doesn't mess with any Unicode-unsupporting windows and controls of XnView.
I see no reason why is impossible accepting filenames in wchar_t and using CreateFileW() to open them for reading.