Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

DLL_ROUT example question

pecan204
Beginner
1,608 Views
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
0 Kudos
3 Replies
Steven_L_Intel1
Employee
1,608 Views
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
0 Kudos
pecan204
Beginner
1,608 Views
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
0 Kudos
Steven_L_Intel1
Employee
1,608 Views
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
0 Kudos
Reply