Using the Export Qualifier Method
You can mark each function and variable you want to export with an export qualifier. Currently, not all compilers recognize the same export qualifier names. The most commonly used qualifier is __declspec(dllexport). Some compilers also recognize __export. LabWindows/CVI recognizes both. The cvidef.h include file defines the DLLEXPORT macro to resolve differences among compilers and platforms. The DLLEXPORT macro is used in the following examples:
int DLLEXPORT DLLSTDCALL MyFunc (int parm) {}
int DLLEXPORT myVar = 0;
If the type of your variable or function requires an asterisk (*) in the syntax, put the qualifier after the asterisk, as in the following example:
char * DLLEXPORT myVar = NULL;
When LabWindows/CVI creates a DLL, it exports all symbols for which export qualifiers appear in either the definition or the declaration. If you use an export qualifier on the definition and an import qualifier on the declaration, LabWindows/CVI exports the symbol. External compilers differ widely in their behavior on this point. Some require that the declaration and definition agree.