Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

GetModuleHandle - errors

0 views
Skip to first unread message

Darren Davison

unread,
Feb 12, 1996, 3:00:00 AM2/12/96
to
I am using the GetModuleHandle function from VB3.0, but get a return value
of 0 every time I call it. My API reference says the function returns this
value on error.

As it happens from all projects, at design time, run time, and running as
interpreted EXE file, on every call, I am assuming something is wrong with
one of my Windows files. I don't have problems with any other API calls
from VB. Any information or help greatly appreciated as to how to correct
this fault.

(could responses please be e-mailed since I my Usenet stuff is up to 3 days
late - many thanks)
--

>>Redeye<<
ddav...@vossnet.co.uk

Philip K Chung

unread,
Feb 14, 1996, 3:00:00 AM2/14/96
to
In article <4focng$s...@serv4.vossnet.co.uk>, ddav...@vossnet.co.uk(Darren Davison) wrote:
>I am using the GetModuleHandle function from VB3.0, but get a return value
>of 0 every time I call it. My API reference says the function returns this
>value on error.
>
>As it happens from all projects, at design time, run time, and running as
>interpreted EXE file, on every call, I am assuming something is wrong with
>one of my Windows files. I don't have problems with any other API calls
>from VB. Any information or help greatly appreciated as to how to correct
>this fault.

i just tried the following in VB 3.0 and it seemed to work fine:

-- added "WIN30API.TXT" to project
-- added Textbox to form (named "Text1")
-- added Pushbutton to form
-- double-clicked on Pushbutton and added following code:

Text1 = GetModuleHandle("SHELL.DLL")

-- run form

every time i push the button i get a non-zero value.

my guess is that you have mis-typed the module name or something like that.

HTH!

phil

==========================
Phil Chung
Pon...@concentric.net
75252...@compuserve.com
==========================

0 new messages