Using EOS SDK on Windows

Reference information for implementing EOS SDK on Windows

Linking on Windows

Windows requires you to add both the link-time library and load-time library to the link command for your project.

  • The link-time library will be EOSSDK.lib

  • The run-time library will be EOSSDK.dll

Use /DELAYDLL during linking to prevent the library from automatically loading at startup. Read the Loading section below for more information.

Loading on Windows

If you do not link using /DELAYDLL then the EOS SDK will load automatically at the start of the application. When using /DELAYDLL then there are two ways that you can load the DLL.

The standard use is a fully implemented __delayLoadHelper2 function. This will allow the first call to the EOS SDK to automatically load the DLL. Microsoft provides an implementation with the MSVC Toolchain in the file delayhlp.cpp. You can prevent the automatic loading of the DLL by providing a completely blank implementation, similar to:

extern "C"
FARPROC WINAPI
__delayLoadHelper2(
    PCImgDelayDescr     pidd,
    FARPROC *           ppfnIATEntry
)
{
    return NULL;
}

Alternatively, you can explicitly load the module with the following:

HMODULE Module = ::LoadLibrary(Filename);

Where Filename is the path to the EOS SDK DLL file. If the DLL is in the working directory of the game then the filename does not need to be a full path. This will most likely be something similar to EOSSDK-Win64-Shipping.dll for 64-bit Windows.

Unloading the Module

To unload the module you can use:

::FreeLibrary(Module);

Where Module is the value returned by ::LoadLibrary.