Click here to Skip to main content
15,911,762 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: dllimport Pin
George_George17-Feb-08 2:01
George_George17-Feb-08 2:01 
GeneralRe: dllimport Pin
Rajkumar R17-Feb-08 2:10
Rajkumar R17-Feb-08 2:10 
GeneralRe: dllimport Pin
George_George17-Feb-08 13:40
George_George17-Feb-08 13:40 
GeneralRe: dllimport [modified] Pin
Rajkumar R17-Feb-08 18:10
Rajkumar R17-Feb-08 18:10 
GeneralRe: dllimport Pin
George_George18-Feb-08 2:57
George_George18-Feb-08 2:57 
GeneralRe: dllimport Pin
Rajkumar R18-Feb-08 3:04
Rajkumar R18-Feb-08 3:04 
GeneralRe: dllimport Pin
George_George18-Feb-08 3:13
George_George18-Feb-08 3:13 
AnswerRe: dllimport Pin
Rajkumar R18-Feb-08 4:14
Rajkumar R18-Feb-08 4:14 
George_George wrote:
I mean how linker utilize the import library to generate two forms of call statement



George_George wrote:
one for the case with dllimport


how call statement is mapped to indirect pointer to IAT slot is extracted in the previous reply.


George_George wrote:
one for the case without dllimport


without dllimport means the function is statically linked, that is linker knows the address of the function,
Without __declspec(dllimport), given this code:

   void func1(void);

   void main(void)
   {
       func1();
   }
the compiler generates code that looks like this:

    call func1
and the linker translates the call into something like this:

    call 0x4000000         ; The address of 'func1'.

the address of the function is already known to the linker.

If 
func1
 exists in another DLL, the linker can't resolve this directly because it has no way of knowing what the address of 
func1
 is. 


and the remaining section decribes the technique used for dllimport.
GeneralRe: dllimport Pin
George_George18-Feb-08 15:35
George_George18-Feb-08 15:35 
Generalarray of zero elements Pin
George_George16-Feb-08 23:24
George_George16-Feb-08 23:24 
GeneralRe: array of zero elements [modified] Pin
CPallini17-Feb-08 2:44
mveCPallini17-Feb-08 2:44 
GeneralRe: array of zero elements Pin
Rajkumar R17-Feb-08 3:22
Rajkumar R17-Feb-08 3:22 
GeneralRe: array of zero elements Pin
CPallini17-Feb-08 3:51
mveCPallini17-Feb-08 3:51 
JokeRe: array of zero elements Pin
Rajkumar R17-Feb-08 4:06
Rajkumar R17-Feb-08 4:06 
GeneralRe: array of zero elements Pin
George_George17-Feb-08 13:30
George_George17-Feb-08 13:30 
GeneralRe: array of zero elements Pin
Rajkumar R17-Feb-08 16:38
Rajkumar R17-Feb-08 16:38 
GeneralRe: array of zero elements Pin
George_George17-Feb-08 23:04
George_George17-Feb-08 23:04 
QuestionRe: array of zero elements Pin
Rajkumar R18-Feb-08 2:38
Rajkumar R18-Feb-08 2:38 
GeneralRe: array of zero elements Pin
George_George18-Feb-08 2:45
George_George18-Feb-08 2:45 
GeneralRe: array of zero elements Pin
Rajkumar R18-Feb-08 3:09
Rajkumar R18-Feb-08 3:09 
GeneralRe: array of zero elements Pin
George_George18-Feb-08 3:31
George_George18-Feb-08 3:31 
GeneralRe: array of zero elements Pin
George_George17-Feb-08 13:31
George_George17-Feb-08 13:31 
QuestionRe: array of zero elements [modified] Pin
Rajkumar R17-Feb-08 3:26
Rajkumar R17-Feb-08 3:26 
GeneralRe: array of zero elements Pin
George_George17-Feb-08 13:30
George_George17-Feb-08 13:30 
QuestionRe: array of zero elements Pin
kakan17-Feb-08 19:28
professionalkakan17-Feb-08 19:28 

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.