Hi

I have defined the class in C++ file as

__declspec(dllexport) int clsName ::CreateDocument(char* filein, char* fileout, char* config)

where clsName is the class name

But after I compiled the code and use the dll in .net code I am getting a run time error
"Unable to find an entry point named 'CreateDocument' in DLL"

Is there anything I am missing.

Kindly advice
Regards
Karan

CreateDocument() is a member of a class, so in the application program you have to declare an instance of that class in order to call it, unless of course it is a static method. My suggestion is to export/import the entire class instead of just one method.

Hi

I went through different websites. But I didn't get any tutorial that can tell me how to import a class in C#

Can you please help me out.
Regards
Karan

This is c++ board, not C#. Which language are you using?

__declspec(dllexport)  class clsName
{
   // blabla
};

then in the c++ file

__declspec(dllimport)  class clsName
{
   // blabla
};
This question has already been answered. Start a new discussion instead.