Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Moving a C++ EXE to a DLL

Status
Not open for further replies.

jimboden

Programmer
Jun 21, 2001
1
US
I am new to C++. I normally program in VB.NET, but I have a program that has a control on it that has a memory leak and I am trying to eliminate it or reduce it by creating this control dynamically on a form. I have tried it with vb6 and VB.net but it will not recognize it and allow me to do this dynamically.

I have generated a C++ program with this same control to test a theory of creating and destroying this object. Now I have to turn this exe into a DLL and call it from a VB6 app. I am now sort of lost as to how to take it from a standalone EXE to a DLL. One twist to this program, is that the VB6 app has to pass some information to this DLL and it is to return a boolean from the DLL.

What do I need to do to make this happen. If need be I can attach a sample of my program.

Thanks Jim
 
If you want to use the control, the way to go is to make the program as a COM object and register it in the system. That's what VB understands. And if you need only certain functionallity to be obtainable from your program through function calls, then just rewrite your code for DLL project and export the functions. From VB you'll be able to call them as any other WinAPI function.

------------------
When you do it, do it right.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top