Bopha
Bopha

Reputation: 3446

how can I create DLL without having class

can anyone give me some steps to create DLL without using class which means it will just have methods in the header file and source file would be only DLLmain() plus other methods. I'm using Visual Studio 2005 to create MFC DLL, but it always generates class. I never create DLL before but I was told that I can create DLL without class/object oriented concepts, just plain functions.

thanks.

Upvotes: 1

Views: 886

Answers (1)

Serge Wautier
Serge Wautier

Reputation: 21898

For a regular Win32 DLL:

In the New Project wizard, under Visual C++ / Win32, choose Win32 Project.

Then in the next page, choose DLL as application type.

You may want to select Export functions as well to get sample code of exported variables, functions and classes. From there on, simply delete what you dont need (such as classes).

I no longer have the Windows Mobile SDK installed, but I'm pretty sure you'll find the same kind of wizard to create a Windows Mobile DLL project.

Of course, if you don't want C++ classes, forget about MFC!

Upvotes: 1

Related Questions