Solved

DLLEXPORT name decoration and varargs

Posted on 1999-01-18
2
910 Views
Last Modified: 2008-03-10
What is the name decoration applied to a function that such as:

#define DLLEXPORT __declspec(dllexport)
#define STDCALL __stdcall
typedef   unsigned char     text;
typedef   unsigned short    ub2;
typedef            short    sb2;
typedef   unsigned long     ub4;
typedef            long     sb4;

sb4 DLLEXPORT STDCALL hdSetRow(HOSTDATA *hd,ub4 row,ub4 numargs,...)
sb4 DLLEXPORT STDCALL hdSetCol(HOSTDATA *hd,ub4 row,ub4 col,void *buf,ub4 bloblen)

I'm trying to create a .def file with linker statements such as:

LIBRARY fmloci
EXPORTS hdSetRow = _hdSetRow   <-- What goes here?
EXPORTS hdSetCol = _hdSetCol@20
0
Comment
Question by:zebada
2 Comments
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 100 total points
ID: 1184488
Standard calls do not support variable arguments. You will need to either change your hdSetRow to not use variable arguments, or to use __cdecl.
0
 
LVL 6

Author Comment

by:zebada
ID: 1184489
Thanks a bunch,
(That was quick, less than five minutes)
I'm posting another question....

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now