943,591 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Marked Solved
  • Views: 2648
  • C++ RSS
Dec 9th, 2008
0

Unable to find an entry point

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
karang is offline Offline
46 posts
since Jul 2008
Dec 9th, 2008
0

Re: Unable to find an entry point

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.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,947 posts
since Aug 2005
Dec 9th, 2008
0

Re: Unable to find an entry point

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
Reputation Points: 10
Solved Threads: 0
Light Poster
karang is offline Offline
46 posts
since Jul 2008
Dec 9th, 2008
0

Re: Unable to find an entry point

This is c++ board, not C#. Which language are you using?
C++ Syntax (Toggle Plain Text)
  1. __declspec(dllexport) class clsName
  2. {
  3. // blabla
  4. };

then in the c++ file
C++ Syntax (Toggle Plain Text)
  1. __declspec(dllimport) class clsName
  2. {
  3. // blabla
  4. };
Last edited by Ancient Dragon; Dec 9th, 2008 at 1:01 am.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,947 posts
since Aug 2005

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: linked list
Next Thread in C++ Forum Timeline: just wondering if this would output C++ alone? need second opinion





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC