IRC Log Viewer » #firebreath » 2012-09-08

IRC Nick Time (GMT-7) Message
The_Cjay 10:09 Hello guys. :)
I have one very specific question about firebreath
So.. I'm creating plugin and it should show "Open File" dialog window
(it's because there is no way to get system file path from javascript neither <input type="file">)
Then. All work pretty nice but IE.
It constantly fails GetOpenFileNameW(&ofn) run
(..W is because of weird specifics of my application - don't worry)
So.. my questins are - why it occurs? Can I handle it somehow?
taxilian 10:09 one moment
The_Cjay 10:09 And bring this damn open file dialog showing.
Thank you in advance. Sorry for weird english :)
taxilian 10:09 why does it fail? what error?
The_Cjay 10:09 Well.. "fails" it's said roughly
Just returns !=0
Few minutes and I could get exact HRESULT.
Oh.. Please wait while I rebuild
taxilian 10:09 use
also, you know that you can't do that on the main thread? it's a blocking dialog, and you must not ever block the main thread
The_Cjay 10:09 Sure. I use boost::thread and callback for whole method
taxilian 10:09 okay
The_Cjay 10:09 And it's not GetLastError-function. It uses CommDlgExtendedError to determine exact error occured
until it rebuilds - one more question. Which encoding for string used in browser? What codepage I get when call JSAPIs method(string) from browser?
And what kind of string shoud I use? (windows plugin)
Oh.. well.. about filename. It returns FNERR_INVALIDFILENAME. Seems that it's my issue.
Answer found there:
Simply called memset(sFile,0,len);
The_Cjay 11:09 Well. Thank you all, especially @taxilian. I need to go. :)