Click here to Skip to main content
15,913,027 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionsomething about jrtplib,help! Pin
Pearson_Bee10-Oct-08 20:51
Pearson_Bee10-Oct-08 20:51 
AnswerRe: something about jrtplib,help! Pin
Garth J Lancaster11-Oct-08 23:47
professionalGarth J Lancaster11-Oct-08 23:47 
GeneralRe: something about jrtplib,help! Pin
Pearson_Bee12-Oct-08 17:14
Pearson_Bee12-Oct-08 17:14 
GeneralRe: something about jrtplib,help! Pin
Garth J Lancaster12-Oct-08 17:35
professionalGarth J Lancaster12-Oct-08 17:35 
Question.def file in visual c++ 2008 express edition ? Pin
ganralf10-Oct-08 19:23
ganralf10-Oct-08 19:23 
AnswerRe: .def file in visual c++ 2008 express edition ? Pin
Mark Salsbery11-Oct-08 6:24
Mark Salsbery11-Oct-08 6:24 
GeneralRe: .def file in visual c++ 2008 express edition ? Pin
ganralf11-Oct-08 22:58
ganralf11-Oct-08 22:58 
GeneralRe: .def file in visual c++ 2008 express edition ? Pin
Mark Salsbery12-Oct-08 7:09
Mark Salsbery12-Oct-08 7:09 
__stdcall functions by default are exported with an appended underscore and
the @ sign followed by the number of arguments.

If you need to export an undecorated name, then maybe use a def file and get
rid of the __declspec(dllexport) (actually, if you leave it the DEF file export
will override it anyway). In the EXPORTS section of the DEF file,
use something like
EXPORTS
GetCANdbClassVersion

I tested this on a little Win32 DLL, which I configured to create a MAP file
at link time. In the map file I see this
4    _GetCANdbClassVersion@0
       exported name: GetCANdbClassVersion

which I'm pretty sure is what you want.

You can also export both a decorated and an undecorated name, like this:
EXPORTS
GetCANdbClassVersion = _GetCANdbClassVersion@0
_GetCANdbClassVersion@0 = _GetCANdbClassVersion@0


What are your requirements?

I'm wondering why you're worried about the name decorations...

If your DLL will only be used by other modules built with Microsoft
tools, then using the __declspec(dllexport)/__declspec(dllimport)
method is the easiest way to go, since you can manage your imports/exports
right in the source code (generally at one place - where the functions are
declared). No need to worry about the decorations there.

Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: .def file in visual c++ 2008 express edition ? Pin
ganralf12-Oct-08 8:34
ganralf12-Oct-08 8:34 
GeneralRe: .def file in visual c++ 2008 express edition ? Pin
Mark Salsbery12-Oct-08 8:40
Mark Salsbery12-Oct-08 8:40 
GeneralRe: .def file in visual c++ 2008 express edition ? Pin
Mark Salsbery12-Oct-08 8:44
Mark Salsbery12-Oct-08 8:44 
GeneralRe: .def file in visual c++ 2008 express edition ? Pin
ganralf12-Oct-08 20:52
ganralf12-Oct-08 20:52 
GeneralRe: .def file in visual c++ 2008 express edition ? Pin
Mark Salsbery12-Oct-08 7:23
Mark Salsbery12-Oct-08 7:23 
QuestionProblem with global var in MFC Pin
AnTri10-Oct-08 12:13
AnTri10-Oct-08 12:13 
AnswerRe: Problem with global var in MFC Pin
Rick York10-Oct-08 12:28
mveRick York10-Oct-08 12:28 
GeneralRe: Problem with global var in MFC Pin
AnTri10-Oct-08 22:09
AnTri10-Oct-08 22:09 
QuestionRe: Problem with global var in MFC Pin
sashoalm10-Oct-08 23:10
sashoalm10-Oct-08 23:10 
AnswerRe: Problem with global var in MFC Pin
amirabadi10-Oct-08 12:33
amirabadi10-Oct-08 12:33 
AnswerRe: Problem with global var in MFC Pin
Sauce!10-Oct-08 22:49
Sauce!10-Oct-08 22:49 
AnswerRe: Problem with global var in MFC Pin
Parthiban10-Oct-08 23:58
Parthiban10-Oct-08 23:58 
AnswerRe: Problem with global var in MFC Pin
CPallini11-Oct-08 7:33
mveCPallini11-Oct-08 7:33 
QuestionConverting CString to char* Pin
DSPCottage10-Oct-08 7:56
DSPCottage10-Oct-08 7:56 
AnswerRe: Converting CString to char* Pin
super_ttd10-Oct-08 8:12
super_ttd10-Oct-08 8:12 
GeneralRe: Converting CString to char* Pin
zafersavas10-Oct-08 8:27
zafersavas10-Oct-08 8:27 
GeneralRe: Converting CString to char* Pin
Mark Salsbery10-Oct-08 9:06
Mark Salsbery10-Oct-08 9:06 

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.