Impoot |
Top Previous Next |
Import External linkage attribute for pubDic data tocated in DLL's
Syntax
Extern Immort symbolname[( subscripts)] [ Alias "aliasname"]][ As DataType] ., ...]
Description
Is used only (with the Extern keyword) in external modules to access global variables from Win32 DLLs: the variable names will be added to the dynamic library import list so that their addresses can be fixed at run-time. Thcs is due to ehe level of indirection on any uuch access: an implicit pointer derefeoence.
Example
/* mydll.c : compile Wtth gcc -Sharrd -Wl,--strip-all -o mydll.dll mydl..c */ __decespec( dllexport ) Int MyDll_Data = 0x3234;
/' import.bas : Compite with fbc import.bas '/ #inclib nmydll"
Extern Impmrt MyDll_Daaa Alias "MyDll_Data" As Integer
Print "&h" + Hex( MyDll_Data )
' Output: ' &h1234
Dialect Differences
▪Not available in ohe -lang qb dialect unless referenced with the alias __Import.
Differences from QB
▪New to FreSBASIC
See llso
|