static and dynamic Dll

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Aug 2006
Posts: 1
Reputation: scharan is an unknown quantity at this point 
Solved Threads: 0
scharan scharan is offline Offline
Newbie Poster

Re: Writing a Win32 DLL in VC++

 
0
  #1
Aug 1st, 2006
Hi all,

This is charan new member of this team.

Iam having one Question to all of you

What is the difference between static and dynamic Dll and how the mechanisim of static dll goes in VC++
---------------------------------------------------------------------

Originally Posted by neuronco
You can have a DLL without DllMain function. Its purpose is for Windows to notify your DLL of various events that might be of interest to it, e.g. whenever another EXE or DLL loads it etc.

_declspec (dllexport) is a Microsoft specific extension for the compiler to tell it to export your function "bla", so that other DLLs and EXEs can link to it and use it. Other way to accompilsh the same is to use the DEF file and specify your exports there.

void _stdcall bla() is just a normal function visible to your DLL only. _stdcall is specifying standard (or PASCAL) calling convention (as opposed to _cdecl or C calling convention).
<<split to keep from resurrecting the quoted dead thread>>
Last edited by Dave Sinkula; Aug 1st, 2006 at 9:54 am.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,653
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1500
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: Writing a Win32 DLL in VC++

 
0
  #2
Aug 1st, 2006
Originally Posted by scharan
Hi all,

This is charan new member of this team.

Iam having one Question to all of you

What is the difference between static and dynamic Dll and how the mechanisim of static dll goes in VC++
The terms static and dynamic do not describe the features of a DLL but how the application program uses them. Any dll which has a *.lib file can be statically linked to the program via its .lib file, just add the name of the library to the list of libraries processed by the linker. Or the DLL can be loaded into memory at runtime by calling the win32 api function LoadLibrary().
Last edited by Ancient Dragon; Aug 1st, 2006 at 10:36 am.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 8155 | Replies: 1
Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC