General discussion

Locked

dll registration

By dlembry ·
I have source for an old DLL the in Visual C that I would like to put a wrapper around so that it can be registered as a resource in VB rather than having to put declarations in the VB source and put the DLL in the PATH.
I am looking for a simple example that I could follow. someting like the f_to_c function in a DLL that can be called from VB6.

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

dll registration

by MadestroITSolutions In reply to dll registration

My friend, if you have a DLL, its methods are probably callable from VB. DLL's are meant to be shared by applications regardless of their source code language, unless the methods are protected (not public) or the DLL is not creatable. If you want touse it in VB, simply select references in the project menu, and select it. If it doesnt appear on the list, you can either browse to it, or register it on the system with regsvr32.exe. Registering it makes it available in the reference list. If youdistribute the application make sure you include your DLL with it.

Any questions or comments, please feel free to write at: juanja01@optonline.net

Good Luck!

Collapse -

dll registration

by dlembry In reply to dll registration

I think you missed my point. I have a DLL that doesn't get registered by regsvr32.exe. Since I know the entry points and I have the .LIB file I can put declarations in the VB source and call the DLL. But the DLL doesn't can't be found unless it is in the Path.

Collapse -

dll registration

by dlembry In reply to dll registration

Point value changed by question poster.
The DLL was orginally created with VC 1.5 as a 16bit dll and was upgraded to 32bit, but it does not contain any registration code.

Collapse -

dll registration

by smart_santanu In reply to dll registration

In the DLL you require to declare the exported function as stdcall so that it can in turn be called by VB.

The next steps are as simple as API programming in VB.

Collapse -

dll registration

by dlembry In reply to dll registration

The point is that I don't want to have to set up declarations in the VB code for the DLL functions that have been exported. Yes, I have used the stdcall, else they would not be found by the VB application at all.

Back to Web Development Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums