Subject: Help with using DLLs in VB
Posted By: vb_programmer Post Date: 9/20/2003 12:02:25 PM
Hello to All Forum Members ;

I need to know one thing ...

Is it possible to use a DLL which can't be registered with RegSvr ?? If yes can you please tell me How can I use it with VB ?

I have one DLL downloaded from Net which is used for PNG and MNG image creation. When I tried to register it with RegSvr , it said "Failed to fine DLLRegisterServer functon in <DLL file Path>"

What does it mean ?? Can't I use such DLLs with VB ?? I have three such DLLs downloaded from Internet Websites , before this , I've never used such DLLs in VB. I know only one way of using DLL ... setting Reference from VB IDE.

Please help me to learn how to use such DLLs with VB ??

Waiting for your valuable response ...

Ruturaj.

Reply By: pgtips Reply Date: 9/22/2003 2:42:24 AM
Hi Ruturaj,

You need a Declare statement for each exported function in the dll.  That statement tells VB where to find the DLL, and what are the data types of the parameters and return value.

If you can give an example of one of the functions you wish to call, I can show you what the Declare should look like.

rgds
Phil
Reply By: Yehuda Reply Date: 9/23/2003 5:39:04 PM
VB can only use COM Dlls.  The other dlls cannot be used by referencing them.  However, you can declare functions from these Dlls (such as is done for windows APIs).  Talk to the manufacturer of the dll.  What Dll is it?

Yehuda

Go to topic 4476

Return to index page 1040
Return to index page 1039
Return to index page 1038
Return to index page 1037
Return to index page 1036
Return to index page 1035
Return to index page 1034
Return to index page 1033
Return to index page 1032
Return to index page 1031