, , DLL, (UNIX ). .DEF-, , Microsoft , _declspec (dllexport) :
_declspec(dllexport) DWORD MyFunction ();
.DLL- .LIB-..LIB- -, . DLL- .
, , , , _declspec (dllexport). , , Microsoft Visual C++, _EXPORTS.
. () C++, __cplusplus, , , :
extern ""
, , DLL MyLibrary MyLibrary, :
#if defined(MYLIBRARY_EXPORTS)
#define LIBSPEC _declspec(dllexport)
#elif defined(__cplusplus)
#define LIBSPEC extern "C" _declspec(dllimport)
#else
#define LIBSPEC _declspec(dllimport)
#endif
LIBSPEC DWORD MyFunction ();
Visual C++ MYLIBRARY_EXPORTS , DLL MyLibrary. , DLL, MYLIBRARYEXPORTS , .
.DLL-. , ; .DLL- . , DLL, , Windows .DLL-, DLL , , , . , , .
, .
, , .
Windows. , GetSystemDirectory; :\WINDOWS\SYSTEM32.
|
|
16- Windows, Windows 9x. , , , .
Windows ( GetWindowsDirectory).
, PATH, , .
, , " ". Web- http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/loadlibrary.asp, SetDllDirectory, Windows NT 5.1 ( Windows XP). LoadLibraryEx, .
Utilities, Web- , , ReportError, .
, , .