Cannot convert of type HANDLE to HANDLE
div0
div0 at users.sourceforge.net
Tue Sep 8 10:35:05 PDT 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,
> Sam
>
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.
- --
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-----
More information about the Digitalmars-d-learn
mailing list