CommonLib
Loading...
Searching...
No Matches
preprocessor_win32.h File Reference
#include "host/common.h"

Go to the source code of this file.

Macros

#define DLL_IMPORT   extern "C" __declspec(dllimport)
#define DLL_IMPORT_EXPLICIT(LIBRARY_NAME, MEMBER_NAME)
#define DLL_EXPORT   extern "C" __declspec(dllexport)
#define NAKED   __declspec(naked)

Macro Definition Documentation

◆ DLL_EXPORT

#define DLL_EXPORT   extern "C" __declspec(dllexport)

Marks a member to be exported from a dynamic link library.

◆ DLL_IMPORT

#define DLL_IMPORT   extern "C" __declspec(dllimport)

Marks a member to be imported from a dynamic link library.

◆ DLL_IMPORT_EXPLICIT

#define DLL_IMPORT_EXPLICIT ( LIBRARY_NAME,
MEMBER_NAME )
Value:
GetProcAddress(LoadLibrary(TEXT(LIBRARY_NAME)), MEMBER_NAME)

Loads a dynamic link library and imports a member from it.

Parameters
LIBRARY_NAMEThe name of the dynamic link library to load.
MEMBER_NAMEThe name of the exported member to import.
Returns
A pointer to the imported member. Use FUNCTION_PTR to call imported function pointers.

◆ NAKED

#define NAKED   __declspec(naked)

Marks a function as naked (no epilogue and prologue).

Remarks
This specification is only available on x86 and ARM.