DLL_ROUT example question

DLL_ROUT example question

I went through the example and upon creating a dll I used the DUMPBIN/exports command and I see _DLL_ROUT@20.

I thought I should be able to see the variables at there byte size also?

I cannot tell from the output how the variables are sized? Is there another area I should be looking at?

The variables are below. It would seem to me that integer is 4 bytes. What about the hidden string size?
SUBROUTINE DLL_ROUT (INT_ARG, STR_IN, STR_OUT)
INTEGER INT_ARG
CHARACTER*(*) STR_IN, STR_OUT

Thanks for any comments.

Ken

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Steve Lionel (Intel)'s picture

First of all, you can only DLLEXPORT variables from a MODULE, not from a routine. Even if variables are exported, there is no size information given. The @20 at the end of the routine name is defined by the STDCALL calling convention and specifies the number of bytes of stack pushed for the argument list, four for each pushed argument. The string lengths are hidden argumenst so that makes a total of five pushed arguments - 5*4=20.

Steve

Steve

Thanks Steve.

One more question for Steve or anyone.

Shouldn't I be able to see the .lib file somwhere called out in the project settings? I don't see any evidence that it has used the .lib file.

Thanks

Steve Lionel (Intel)'s picture

The .lib is an output from building the DLL - it's not actually part of your project, any more than the DLL is.

If you have an application that uses the DLL, then it has the .lib as an input. This may be implicit if you use subprojects (Developer Studio automatically links against the .libs of DLL or static library subprojects).

Steve

Steve

Login to leave a comment.