digitalmars.D.learn - Cannot convert of type HANDLE to HANDLE
- Sam Hu (15/15) Sep 08 2009 Under DMD 2.032+Window Xp:
- div0 (18/40) Sep 08 2009 -----BEGIN PGP SIGNED MESSAGE-----
- Sam Hu (9/14) Sep 08 2009 Thanks for your help.
- Ary Borenszweig (2/16) Sep 09 2009 FQN = Fully Qualified Name
- Sam Hu (2/3) Sep 09 2009 Got it.Thanks!
Under DMD 2.032+Window Xp: Can I use HMODULE LoadLibraryEx( LPCTSTR lpFileName, // file name of module HANDLE hFile, // reserved, must be NULL DWORD dwFlags // entry-point execution option ); in D2?Given below code : HMODULE hDll=LoadLibraryEx(toStringz("netmsg.dll"),null, DONT_RESOLVE_DLL_REFERENCES); I got below error: cannot implicitly convert expression (LoadLibraryExA(toStringz("netmsg.dll"),null,1u)) of type HANDLE to HANDLE What's the problem? Thanks for your help in advance. Regards, Sam
Sep 08 2009
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Sam Hu wrote:Under DMD 2.032+Window Xp: Can I use HMODULE LoadLibraryEx( LPCTSTR lpFileName, // file name of module HANDLE hFile, // reserved, must be NULL DWORD dwFlags // entry-point execution option ); in D2?Given below code : HMODULE hDll=LoadLibraryEx(toStringz("netmsg.dll"),null, DONT_RESOLVE_DLL_REFERENCES); I got below error: cannot implicitly convert expression (LoadLibraryExA(toStringz("netmsg.dll"),null,1u)) of type HANDLE to HANDLE What's the problem? Thanks for your help in advance. Regards, SamYou must have two different HANDLEs around. The one in phobos is aliased to void* and there is no LoadLibraryEx call in phobos, so you must be using something else. Try using the FQN of the import where you are getting the LoadLibraryEx from. - -- My enormous talent is exceeded only by my outrageous laziness. http://www.ssTk.co.uk -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iD8DBQFKppXJT9LetA9XoXwRAtjpAKCekF9+98z16ISxv8dglgBAovRpcgCgq8kR g5OtnDy+4rOXpGnu5fBaxG8= =qIrZ -----END PGP SIGNATURE-----
Sep 08 2009
div0 Wrote:You must have two different HANDLEs around. The one in phobos is aliased to void* and there is no LoadLibraryEx call in phobos, so you must be using something else. Try using the FQN of the import where you are getting the LoadLibraryEx from.Thanks for your help. Yeah.I use DFL plus win32 package(http://www.dsource.org/projects/bindings/wiki/WindowsApi). import dfl.all; import Win32=win32.windows; Now it got compiled and ran,but all main functions wrote in win32 API did not work(I mean does nothing),almost just a functionless Form. PS.For *FQN of the import*,what do you mean? Regards, Sam
Sep 08 2009
Sam Hu escribió:div0 Wrote:FQN = Fully Qualified NameYou must have two different HANDLEs around. The one in phobos is aliased to void* and there is no LoadLibraryEx call in phobos, so you must be using something else. Try using the FQN of the import where you are getting the LoadLibraryEx from.Thanks for your help. Yeah.I use DFL plus win32 package(http://www.dsource.org/projects/bindings/wiki/WindowsApi). import dfl.all; import Win32=win32.windows; Now it got compiled and ran,but all main functions wrote in win32 API did not work(I mean does nothing),almost just a functionless Form. PS.For *FQN of the import*,what do you mean?
Sep 09 2009
Ary Borenszweig Wrote:FQN = Fully Qualified NameGot it.Thanks!
Sep 09 2009