Click here to Skip to main content
16,004,882 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: DLL Load issue Pin
George_George29-Aug-07 23:41
George_George29-Aug-07 23:41 
GeneralRe: DLL Load issue Pin
Naveen29-Aug-07 23:48
Naveen29-Aug-07 23:48 
GeneralRe: DLL Load issue Pin
George_George29-Aug-07 23:53
George_George29-Aug-07 23:53 
GeneralRe: DLL Load issue Pin
Naveen30-Aug-07 0:02
Naveen30-Aug-07 0:02 
GeneralRe: DLL Load issue Pin
George_George30-Aug-07 0:06
George_George30-Aug-07 0:06 
QuestionVC++ dll to C++ Builder Pin
smsmfe29-Aug-07 21:06
smsmfe29-Aug-07 21:06 
AnswerRe: VC++ dll to C++ Builder Pin
eli1502197929-Aug-07 21:53
eli1502197929-Aug-07 21:53 
GeneralRe: VC++ dll to C++ Builder Pin
smsmfe29-Aug-07 22:34
smsmfe29-Aug-07 22:34 
Eli, thanks for your (fast) reply!!
But I still got the same linking-error message.

Ok, this is what the cpp-file in vc++ looks like:

#include "stdafx.h"
#include "SHA.h"
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}

return TRUE;
}

// This is an example of an exported variable
SHA_API int nSHA=0;

// This is an example of an exported function.
SHA_API int fnSHA(void)
{
return 42;
}

// This is the constructor of a class that has been exported.
// see SHA.h for the class definition
CSHA::CSHA()
{
return;
}
CSHA *CSHA::New()
{
return new CSHA();
}
//--------------------------------------------------
This is the h-file (which I also use in my borland project):
#ifdef SHA_EXPORTS
#define SHA_API __declspec(dllexport)
#else
#define SHA_API __declspec(dllimport)
#endif

// This class is exported from the SHA.dll
class SHA_API CSHA {
public:
CSHA(void);
CSHA* New(void);
// TODO: add your methods here.
};

extern SHA_API int nSHA;

SHA_API int fnSHA(void);

//--------------------------------------------------
Borland cpp-file:

#include <vcl.h>
#pragma hdrstop
#include "sha.h"

CSHA* dll();

#pragma argsused
int main(int argc, char* argv[])
{
CSHA test;
CSHA* h = test.New();
return 0;
}
GeneralRe: VC++ dll to C++ Builder Pin
eli1502197930-Aug-07 0:00
eli1502197930-Aug-07 0:00 
GeneralRe: VC++ dll to C++ Builder Pin
smsmfe30-Aug-07 1:02
smsmfe30-Aug-07 1:02 
GeneralRe: VC++ dll to C++ Builder Pin
eli1502197930-Aug-07 1:13
eli1502197930-Aug-07 1:13 
GeneralRe: VC++ dll to C++ Builder Pin
smsmfe30-Aug-07 1:18
smsmfe30-Aug-07 1:18 
GeneralRe: VC++ dll to C++ Builder Pin
smsmfe29-Aug-07 23:33
smsmfe29-Aug-07 23:33 
Questionhow to compare char * and WCHAR * Pin
GauranG Shah29-Aug-07 20:58
GauranG Shah29-Aug-07 20:58 
AnswerRe: how to compare char * and WCHAR * Pin
Nishad S29-Aug-07 21:12
Nishad S29-Aug-07 21:12 
AnswerRe: how to compare char * and WCHAR * Pin
Suneet.0329-Aug-07 23:14
Suneet.0329-Aug-07 23:14 
QuestionExcel automation Pin
__yash__29-Aug-07 20:47
professional__yash__29-Aug-07 20:47 
AnswerRe: Excel automation Pin
Roger Broomfield29-Aug-07 21:34
Roger Broomfield29-Aug-07 21:34 
GeneralRe: Excel automation Pin
__yash__29-Aug-07 22:55
professional__yash__29-Aug-07 22:55 
GeneralRe: Excel automation Pin
Roger Broomfield29-Aug-07 23:25
Roger Broomfield29-Aug-07 23:25 
GeneralRe: Excel automation Pin
__yash__30-Aug-07 1:14
professional__yash__30-Aug-07 1:14 
QuestionStack overflow Pin
Maynka29-Aug-07 20:30
Maynka29-Aug-07 20:30 
AnswerRe: Stack overflow Pin
Cedric Moonen29-Aug-07 20:41
Cedric Moonen29-Aug-07 20:41 
AnswerRe: Stack overflow Pin
Stephen Hewitt29-Aug-07 21:17
Stephen Hewitt29-Aug-07 21:17 
QuestionOpenMp Pin
yoaz29-Aug-07 20:05
yoaz29-Aug-07 20:05 

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.