Unable to find an entry point

Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Jul 2008
Posts: 46
Reputation: karang is an unknown quantity at this point 
Solved Threads: 0
karang karang is offline Offline
Light Poster

Unable to find an entry point

 
0
  #1
Dec 9th, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,648
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1498
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: Unable to find an entry point

 
0
  #2
Dec 9th, 2008
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.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 46
Reputation: karang is an unknown quantity at this point 
Solved Threads: 0
karang karang is offline Offline
Light Poster

Re: Unable to find an entry point

 
0
  #3
Dec 9th, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,648
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1498
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: Unable to find an entry point

 
0
  #4
Dec 9th, 2008
This is c++ board, not C#. Which language are you using?
  1. __declspec(dllexport) class clsName
  2. {
  3. // blabla
  4. };

then in the c++ file
  1. __declspec(dllimport) class clsName
  2. {
  3. // blabla
  4. };
Last edited by Ancient Dragon; Dec 9th, 2008 at 1:01 am.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:




Views: 1109 | Replies: 3
Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC