Stefan Leichter Stefan.Leichter@camline.com writes:
- HINSTANCE hinst32;
- if (hinst16 == GetModuleHandle16("msvideo.dll"))
hinst32 = GetModuleHandleA("msvfw32.dll");
- else
hinst32 = HINSTANCE_32(GetExePtr( hinst16 ));
This doesn't seem right. Why do you need this?
Am Thursday 19 August 2010 11:58:23 schrieb Alexandre Julliard:
Stefan Leichter Stefan.Leichter@camline.com writes:
- HINSTANCE hinst32;
- if (hinst16 == GetModuleHandle16("msvideo.dll"))
hinst32 = GetModuleHandleA("msvfw32.dll");
- else
hinst32 = HINSTANCE_32(GetExePtr( hinst16 ));
This doesn't seem right. Why do you need this?
This was just a try to fix bug 23866.
call 32 bit function from 16 bit and back is still some "black magic" for me. Therefore i searched the wine sources for a similar case. Most/all places to convert HINSTANCE16 to HINSTANCE i found are dlls/user.exe16/window.c . Looks like i picked a "wrong" code fragment from there.
Should i send a new patch only using HINSTANCE_32(GetExePtr( hinst16 )) ?
Stefan Leichter Stefan.Leichter@camline.com writes:
This was just a try to fix bug 23866.
call 32 bit function from 16 bit and back is still some "black magic" for me. Therefore i searched the wine sources for a similar case. Most/all places to convert HINSTANCE16 to HINSTANCE i found are dlls/user.exe16/window.c . Looks like i picked a "wrong" code fragment from there.
Should i send a new patch only using HINSTANCE_32(GetExePtr( hinst16 )) ?
No, that's wrong too. If the 16-bit code really needs a valid instance you have to pass it unmodified, otherwise you may just as well pass 0.