Previous: Stdcall Calling Convention, Up: Windows Calling Conventions

F.6.3 DLL Calling Convention

This convention, which is GNAT-specific, must be used when you want to import in Ada a variables defined in a DLL. For functions and procedures this convention is equivalent to the Stdcall convention. As an example, if a DLL contains a variable defined as:

     int my_var;

then, to access this variable from Ada you should write:

     My_Var :;
     pragma Import (DLL, My_Var);

The remarks concerning the External_Name and Link_Name parameters given in the previous sections equally apply to the DLL calling convention.