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

C / C++ / MFC

 
GeneralRe: Way to start window service before login screen??? Pin
ThatsAlok27-Apr-05 23:13
ThatsAlok27-Apr-05 23:13 
GeneralRe: Way to start window service before login screen??? Pin
Yulianto.27-Apr-05 23:22
Yulianto.27-Apr-05 23:22 
GeneralRe: Way to start window service before login screen??? Pin
ThatsAlok27-Apr-05 23:53
ThatsAlok27-Apr-05 23:53 
GeneralRe: Way to start window service before login screen??? Pin
Yulianto.28-Apr-05 0:01
Yulianto.28-Apr-05 0:01 
GeneralRe: Way to start window service before login screen??? Pin
ThatsAlok28-Apr-05 0:11
ThatsAlok28-Apr-05 0:11 
GeneralIts urgent.. regarding WAVEFORMATEX Pin
mpallavi27-Apr-05 21:19
mpallavi27-Apr-05 21:19 
Generalmulti row tab control Pin
Bilge Kaan27-Apr-05 20:49
Bilge Kaan27-Apr-05 20:49 
QuestionHow to import class from a dll? Pin
eli1502197927-Apr-05 20:46
eli1502197927-Apr-05 20:46 
Hi,
I want to import a class from a dll dynamiclly by using LoadLibrary(DLLFile)
and not by using Project->Settings->Link....
Is it the same as loading regular function from a dll(By getting a pointer
to that function)?

for example,if in my dll the function looks like this:

in my dll.h file:
#define TCPDLL_API __declspec(dllexport)

#ifdef __cplusplus
extern "C" {
#endif


TCPDLL_API ERROR_CODES FLRInitializeConnections(IPStruct *Server,int num_of_radars);


#ifdef __cplusplus
}
#endif


and in my dll.cpp file:
TCPDLL_API ERROR_CODES  FLRInitializeConnections(IPStruct *Server , int num_of_radars)
{
   //Do something
}


now,when i want to use the function :

in my app.h:
typedef ERROR_CODES (*FLRInitializeConnections_PROC      )(IPStruct*,int);

HINSTANCE hLib;

// imported functions handles
FLRInitializeConnections_PROC FLRInitializeConnections;


and in my app.cpp:
hLib = LoadLibrary(DLL name);

FLRInitializeConnections = (FLRInitializeConnections_PROC)GetProcAddress(hLib,"FLRInitializeConnections");


Now i can call the function from the dll.

My question is - in order to use a class from a dll , what should i do?
Do i need to get a pointer to that class or can i load the dll and make instance of that class in the regular way?

With best regards,
Eli
AnswerRe: How to import class from a dll? Pin
stolid_rock27-Apr-05 21:43
stolid_rock27-Apr-05 21:43 
GeneralRe: How to import class from a dll? Pin
eli1502197927-Apr-05 22:13
eli1502197927-Apr-05 22:13 
GeneralUnRegestering the dll Pin
Anonymous27-Apr-05 20:38
Anonymous27-Apr-05 20:38 
GeneralRe: UnRegestering the dll Pin
«_Superman_»27-Apr-05 20:45
professional«_Superman_»27-Apr-05 20:45 
GeneralRe: UnRegestering the dll Pin
ThatsAlok27-Apr-05 23:00
ThatsAlok27-Apr-05 23:00 
GeneralRe: UnRegestering the dll Pin
«_Superman_»27-Apr-05 23:43
professional«_Superman_»27-Apr-05 23:43 
GeneralRe: UnRegestering the dll Pin
ThatsAlok27-Apr-05 23:52
ThatsAlok27-Apr-05 23:52 
GeneralRe: UnRegestering the dll Pin
22491728-Apr-05 1:37
22491728-Apr-05 1:37 
GeneralRe: UnRegestering the dll Pin
ThatsAlok28-Apr-05 2:35
ThatsAlok28-Apr-05 2:35 
GeneralRe: UnRegestering the dll Pin
22491728-Apr-05 5:19
22491728-Apr-05 5:19 
GeneralHELP! I need some video source codes Pin
yeetins27-Apr-05 20:17
yeetins27-Apr-05 20:17 
GeneralRe: HELP! I need some video source codes Pin
khan++27-Apr-05 20:58
khan++27-Apr-05 20:58 
Generalto check _variant_t variable value Pin
Anonymous27-Apr-05 20:14
Anonymous27-Apr-05 20:14 
GeneralParse XML in VC++ Pin
Reveur127-Apr-05 20:03
Reveur127-Apr-05 20:03 
GeneralRe: Parse XML in VC++ Pin
ThatsAlok27-Apr-05 23:03
ThatsAlok27-Apr-05 23:03 
QuestionInterpreter javascript in VC++? Pin
Priyank Bolia27-Apr-05 19:43
Priyank Bolia27-Apr-05 19:43 
AnswerRe: Interpreter javascript in VC++? Pin
Alexander M.,28-Apr-05 5:20
Alexander M.,28-Apr-05 5:20 

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.