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
==========================