Hello AP
API declaration like
Declare Auto Sub CGL Lib "Game.dll" _
Alias "CreateGameLevel" (ByVal s As Integer)
is used for "native" dll`s you do not need to register them ( they are
written in C , C++ ) the dll muct be in the system directory or in the
application path
dll`s that need to be registred with regsvr32.dll ( needed for install
location , and classid lookup ) are dll`s with a std ole interface (
Activex / COM / idispatch ) these dll`s need to be referenced in your
project .
project explorer , references , select the COM tab , press browse and
select the dll , now in you project you can access the property`s and
methods with the following syntax
private nameyoulike as new yourclassname
if the class exposes events
private withevents nameyoulike as new yourclassname
hth
M. Posseth
"AP" <no@no.com> wrote in message news:Uq********************@pipex.net...
Hello, I am trying to register a dll so that I can call functions from it
within vb.net.
I have used the command "regsvr32 game.dll" which diplays a message box
saying DllRegisterServer in Game.dll suceeded.
In my VB.net application, I have added the following function to a module.
Declare Auto Sub CGL Lib "Game.dll" _
Alias "CreateGameLevel" (ByVal s As Integer)
When I try to run the program with the code CGL(1) placed in the Form load
method, I get an System.DllNotFound Exception, unable to load dll.
Why is this message appearing after windows has successfully registered
the dll, what am I doing wrong?
Thanks
AP