Every driver dynamic library needs to implement the standard driver factory function and use it to return implementations of the OpenVR driver interfaces. This function is the entry-point for every driver.
A typical factory function looks like this:
#define HMD_DLL_EXPORT extern "C" __declspec( dllexport ) HMD_DLL_EXPORT void *HmdDriverFactory( const char *pInterfaceName, int *pReturnCode ) { if( 0 == strcmp( IServerTrackedDeviceProvider_Version, pInterfaceName ) ) { return <global for server driver provider>; } if( 0 == strcmp( IVRWatchdogProvider_Version, pInterfaceName ) ) { return <global for watchdog driver>; } if( pReturnCode ) *pReturnCode = HmdError_Init_InterfaceNotFound; return NULL; }
If you wish to implement IVRWatchdogProvider, please see the example code in the sample driver.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4