0

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

2
Contributors
3
Replies
5
Views
8 Years
Discussion Span
Last Post by Ancient Dragon
0

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.

0

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

0

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.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.