Click here to Skip to main content
15,891,033 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralHandling DLL Load Failures Pin
Californian220-Mar-08 11:44
Californian220-Mar-08 11:44 
GeneralRe: Handling DLL Load Failures Pin
Chris Losinger20-Mar-08 11:52
professionalChris Losinger20-Mar-08 11:52 
QuestionRe: Handling DLL Load Failures Pin
Mark Salsbery20-Mar-08 11:55
Mark Salsbery20-Mar-08 11:55 
GeneralRe: Handling DLL Load Failures Pin
Californian220-Mar-08 16:17
Californian220-Mar-08 16:17 
GeneralRe: Handling DLL Load Failures Pin
Mark Salsbery20-Mar-08 16:21
Mark Salsbery20-Mar-08 16:21 
QuestionWhat is the Best Way to Parse and Store User Input from a CTreeCtrl Dialog? Pin
Stuck At Zero20-Mar-08 10:08
Stuck At Zero20-Mar-08 10:08 
GeneralRe: What is the Best Way to Parse and Store User Input from a CTreeCtrl Dialog? Pin
Member 75496024-Mar-08 10:23
Member 75496024-Mar-08 10:23 
Generalextern "C" in DLL Pin
Alan Balkany20-Mar-08 7:21
Alan Balkany20-Mar-08 7:21 
Hi there,

I'm trying to make a C++ DLL with non-decorated method names that can be called from .NET. I've followed the format described in several articles, but it just won't compile:


class Vdr
{
public:
extern "C" __declspec (dllexport)
int add (int a, int b);
};


I get the compile error:

Error 1 error C2059: syntax error : 'string' c:\alan\4000\vdrdll\vdrdll\vdr.h 5

which is the line with extern "C". If I take out the extern "C", it compiles, but with decorated method names. Any ideas on what the problem is? Thanks!
QuestionRe: extern "C" in DLL Pin
David Crow20-Mar-08 7:28
David Crow20-Mar-08 7:28 
GeneralRe: extern "C" in DLL Pin
Alan Balkany20-Mar-08 7:36
Alan Balkany20-Mar-08 7:36 
QuestionRe: extern "C" in DLL Pin
David Crow20-Mar-08 7:51
David Crow20-Mar-08 7:51 
GeneralRe: extern "C" in DLL Pin
Alan Balkany20-Mar-08 7:55
Alan Balkany20-Mar-08 7:55 
GeneralRe: extern "C" in DLL Pin
James R. Twine20-Mar-08 7:45
James R. Twine20-Mar-08 7:45 
GeneralRe: extern "C" in DLL Pin
Alan Balkany20-Mar-08 7:49
Alan Balkany20-Mar-08 7:49 
GeneralRe: extern "C" in DLL Pin
James R. Twine20-Mar-08 8:43
James R. Twine20-Mar-08 8:43 
GeneralRe: extern "C" in DLL Pin
Alan Balkany20-Mar-08 8:51
Alan Balkany20-Mar-08 8:51 
GeneralRe: extern "C" in DLL Pin
led mike20-Mar-08 8:53
led mike20-Mar-08 8:53 
GeneralRe: extern "C" in DLL Pin
Mark Salsbery20-Mar-08 12:00
Mark Salsbery20-Mar-08 12:00 
GeneralRe: extern "C" in DLL Pin
Nemanja Trifunovic20-Mar-08 7:57
Nemanja Trifunovic20-Mar-08 7:57 
GeneralRe: extern "C" in DLL Pin
Alan Balkany20-Mar-08 8:01
Alan Balkany20-Mar-08 8:01 
Generaluse fgets to read record by record in a file Pin
prasadbuddhika20-Mar-08 6:55
prasadbuddhika20-Mar-08 6:55 
GeneralRe: use fgets to read record by record in a file Pin
CPallini20-Mar-08 7:02
mveCPallini20-Mar-08 7:02 
QuestionRe: use fgets to read record by record in a file Pin
Maximilien20-Mar-08 7:26
Maximilien20-Mar-08 7:26 
GeneralRe: use fgets to read record by record in a file Pin
prasadbuddhika21-Mar-08 0:42
prasadbuddhika21-Mar-08 0:42 
GeneralUSB Enumeration problem. Pin
koumodaki20-Mar-08 5:10
koumodaki20-Mar-08 5:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.