954,499 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Unable to find an entry point

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

karang
Light Poster
46 posts since Jul 2008
Reputation Points: 10
Solved Threads: 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.

Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

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

karang
Light Poster
46 posts since Jul 2008
Reputation Points: 10
Solved Threads: 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
};
Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You