Click here to Skip to main content
15,900,258 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Icons Pin
Sarriss30-Sep-08 5:00
Sarriss30-Sep-08 5:00 
QuestionCompression in C# Pin
RYU^^30-Sep-08 1:23
RYU^^30-Sep-08 1:23 
AnswerRe: Compression in C# Pin
RYU^^30-Sep-08 1:23
RYU^^30-Sep-08 1:23 
JokeRe: Compression in C# Pin
ThatsAlok30-Sep-08 1:34
ThatsAlok30-Sep-08 1:34 
AnswerRe: Compression in C# Pin
Hamid_RT30-Sep-08 4:47
Hamid_RT30-Sep-08 4:47 
GeneralRe: Compression in C# Pin
RYU^^30-Sep-08 23:49
RYU^^30-Sep-08 23:49 
GeneralRe: Compression in C# Pin
Hamid_RT1-Oct-08 8:42
Hamid_RT1-Oct-08 8:42 
Question__stdcall compile error? Pin
George_George30-Sep-08 1:07
George_George30-Sep-08 1:07 
Hello everyone,


I want to export a function in DLL, and using extern C and __stdcall together to resolve name decoration issue -- so I need dllexport/stdcall/extern C together to define a function.

But I have played a while there is always compile error? Why? Here is my code and related compile error.

extern "C" __declspec(dllexport) __stdcall BOOL WINAPI StoreData(DWORD dw)

1>d:\visual studio 2008\projects\testdll\testdll\dllmain.cpp(78) : error C2143: syntax error : missing ';' before '__stdcall'
1>d:\visual studio 2008\projects\testdll\testdll\dllmain.cpp(78) : warning C4229: anachronism used : modifiers on data are ignored
1>d:\visual studio 2008\projects\testdll\testdll\dllmain.cpp(78) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\visual studio 2008\projects\testdll\testdll\dllmain.cpp(78) : error C2377: 'BOOL' : redefinition; typedef cannot be overloaded with any other symbol
1>        c:\program files\microsoft sdks\windows\v6.0a\include\windef.h(153) : see declaration of 'BOOL'
1>d:\visual studio 2008\projects\testdll\testdll\dllmain.cpp(79) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\visual studio 2008\projects\testdll\testdll\dllmain.cpp(105) : error C2143: syntax error : missing ';' before '__stdcall'
1>d:\visual studio 2008\projects\testdll\testdll\dllmain.cpp(105) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\visual studio 2008\projects\testdll\testdll\dllmain.cpp(106) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int



regards,
George
AnswerRe: __stdcall compile error? Pin
CPallini30-Sep-08 1:49
mveCPallini30-Sep-08 1:49 
GeneralRe: __stdcall compile error? Pin
George_George30-Sep-08 2:00
George_George30-Sep-08 2:00 
GeneralRe: __stdcall compile error? Pin
CPallini30-Sep-08 2:23
mveCPallini30-Sep-08 2:23 
GeneralRe: __stdcall compile error? Pin
George_George30-Sep-08 21:56
George_George30-Sep-08 21:56 
AnswerRe: __stdcall compile error? Pin
toxcct30-Sep-08 2:02
toxcct30-Sep-08 2:02 
GeneralRe: __stdcall compile error? Pin
George_George30-Sep-08 21:55
George_George30-Sep-08 21:55 
GeneralRe: __stdcall compile error? Pin
toxcct30-Sep-08 21:59
toxcct30-Sep-08 21:59 
GeneralRe: __stdcall compile error? Pin
George_George30-Sep-08 22:04
George_George30-Sep-08 22:04 
QuestionRe: __stdcall compile error? Pin
Matthew Faithfull30-Sep-08 3:37
Matthew Faithfull30-Sep-08 3:37 
AnswerRe: __stdcall compile error? Pin
Mark Salsbery30-Sep-08 4:59
Mark Salsbery30-Sep-08 4:59 
AnswerRe: __stdcall compile error? Pin
George_George30-Sep-08 21:57
George_George30-Sep-08 21:57 
QuestionRe Question about folder copy Pin
Davitor30-Sep-08 1:07
Davitor30-Sep-08 1:07 
AnswerRe: Re Question about folder copy Pin
Michael Schubert30-Sep-08 1:31
Michael Schubert30-Sep-08 1:31 
GeneralRe: Re Question about folder copy Pin
Davitor30-Sep-08 1:46
Davitor30-Sep-08 1:46 
GeneralRe: Re Question about folder copy Pin
Michael Schubert30-Sep-08 2:20
Michael Schubert30-Sep-08 2:20 
GeneralRe: Re Question about folder copy Pin
David Crow30-Sep-08 3:21
David Crow30-Sep-08 3:21 
GeneralRe: Re Question about folder copy Pin
Davitor1-Oct-08 2:38
Davitor1-Oct-08 2:38 

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.