Click here to Skip to main content
16,007,163 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralDistributing Fonts Pin
David Lantsman24-Oct-01 0:05
David Lantsman24-Oct-01 0:05 
GeneralRe: Distributing Fonts Pin
#realJSOP24-Oct-01 0:55
professional#realJSOP24-Oct-01 0:55 
GeneralRe: Distributing Fonts Pin
markkuk24-Oct-01 1:19
markkuk24-Oct-01 1:19 
GeneralProvide ATL/DLL to Delphi programmer Pin
mimi23-Oct-01 23:51
mimi23-Oct-01 23:51 
GeneralLoading Icons Pin
Drawil23-Oct-01 22:56
Drawil23-Oct-01 22:56 
GeneralRe: Loading Icons Pin
Eugene Pustovoyt24-Oct-01 0:01
Eugene Pustovoyt24-Oct-01 0:01 
GeneralRe: Loading Icons Pin
Drawil24-Oct-01 9:41
Drawil24-Oct-01 9:41 
GeneralC DLL Wraper Pin
Biggy23-Oct-01 22:45
Biggy23-Oct-01 22:45 
COULD SOMEONE HELP ME OUT AS TO HOW TO WRITE A WRAPPER IN Visual C++ 6


I have a dll (SbLm_LogClient.dll ) written in C which I need to use in my vb code. The DLL functions uses _cdecl convention hence I an getting errors. I guess the way round it is to write a wrapper in C++ using the __stdcall convention. I know the dll exposes two interfaces.
Interface 1 - SbLm_Log accepts an Integer and a Char
Interface 2 - SbLm_CloseLogClient is a sub, it accepts no parameters

I have an include (.h) and a .a file from the from the author. The content of the .h file is below

#ifdef WINDOWS_NT
#ifndef SbLm_LogClient_h_included
#define SbLm_LogClient_h_included

#ifdef BUILDING_DLL
#define DLLIMPORT __declspec (dllexport)
#else /* Not BUILDING_DLL */
#define DLLIMPORT __declspec (dllimport)
#endif /* Not BUILDING_DLL */

DLLIMPORT int SbLm_Log(int, char *);
DLLIMPORT int SbLm_CloseLogClient();

#endif // SbLm_LogClient_h_included
#else
int SbLm_Log(int, char *);
int SbLm_CloseLogClient();
#endif


Question:
1) What will the code in the .cpp file be to call this two interfaces from a new COM dll
Questioncase insensitive compare??? Pin
Tryhard23-Oct-01 22:37
Tryhard23-Oct-01 22:37 
AnswerRe: case insensitive compare??? Pin
Jon Sagara23-Oct-01 22:41
Jon Sagara23-Oct-01 22:41 
AnswerRe: case insensitive compare??? Pin
Jonas Larsson23-Oct-01 22:46
Jonas Larsson23-Oct-01 22:46 
AnswerRe: case insensitive compare??? Pin
Tomasz Sowinski24-Oct-01 0:21
Tomasz Sowinski24-Oct-01 0:21 
AnswerRe: case insensitive compare??? Pin
Bill Wilson24-Oct-01 6:16
Bill Wilson24-Oct-01 6:16 
GeneralZip files Pin
Mangesh Sardesai23-Oct-01 22:04
Mangesh Sardesai23-Oct-01 22:04 
GeneralRe: Zip files Pin
markkuk23-Oct-01 22:21
markkuk23-Oct-01 22:21 
QuestionHow do I Get The App Path? Pin
23-Oct-01 21:45
suss23-Oct-01 21:45 
AnswerRe: How do I Get The App Path? Pin
Luu Truong Huy23-Oct-01 22:19
Luu Truong Huy23-Oct-01 22:19 
AnswerRe: How do I Get The App Path? Pin
Nish Nishant23-Oct-01 23:04
sitebuilderNish Nishant23-Oct-01 23:04 
AnswerRe: How do I Get The App Path? Pin
Tomasz Sowinski23-Oct-01 23:44
Tomasz Sowinski23-Oct-01 23:44 
AnswerRe: How do I Get The App Path? Pin
Eugene Pustovoyt24-Oct-01 0:09
Eugene Pustovoyt24-Oct-01 0:09 
QuestionHow to limit a zone of scrolling of the View? Pin
Eugene Pustovoyt23-Oct-01 20:25
Eugene Pustovoyt23-Oct-01 20:25 
AnswerRe: How to limit a zone of scrolling of the View? Pin
Christian Graus23-Oct-01 20:39
protectorChristian Graus23-Oct-01 20:39 
AnswerRe: How to limit a zone of scrolling of the View? Pin
Tomasz Sowinski23-Oct-01 23:31
Tomasz Sowinski23-Oct-01 23:31 
GeneralRe: How to limit a zone of scrolling of the View? Pin
Eugene Pustovoyt23-Oct-01 23:54
Eugene Pustovoyt23-Oct-01 23:54 
GeneralRe: How to limit a zone of scrolling of the View? Pin
Tomasz Sowinski23-Oct-01 23:59
Tomasz Sowinski23-Oct-01 23:59 

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.