/************************************************************************************************** FILE: DISKFREE.H PURPOSE: Contains the prototypes for the functions exported by DISKFREE.DLL. This file uses conditional compilation so that it can be included both in the source file for the DLL (interrupt.c) and in any LabWindows/CVI program that wants to call functions in the dll. **************************************************************************************************/ #ifndef _DISKFREE #define _DISKFREE #if defined (_NI_mswin_) // _NI_mswin_ is defined automatically when compiling with the Windows version of CVI. #define PREFIX typedef unsigned short HWND; #elif defined(_MSC_VER) // for Visual C++ #define PREFIX __declspec( dllexport ) //FAR __export __loadds #else #error "This has been tested in CVI and VC++ only, modifications may be needed for other compilers" #endif /************************************************************************************************** PROTOTYPES: Here are the function prototypes suitable for including both in a - LabWindows/CVI program which uses the dll - the MSVC DLL itself **************************************************************************************************/ extern unsigned long PREFIX AvailableDiskSize(unsigned char DiskNum); #endif // _DISKFREE /************************************************************************************************** NOTES: While writing in Microsoft C a DLL meant to be used with LabWindows/CVI, be aware of the following: - C++ style comments (with '//') are not allowed in LabWindows/CVI - int(egers) are 16 bits on MSVC and 32 on CVI. You should use either short (16b) or long (32b) instead. - CVI uses a 32 bit compiler in a flat addressing space. Pointers are NOT compatible. They must be converted with the CVI function Alloc16BitAlias() and passed to the DLL with the DLL function GiveDLL16BitAliasTo32BitBuffer() or a similar one - use compilation defines _NI_mswin_ or _MSC_VER to select the code to compile in the shared *.h files **************************************************************************************************/