static HMODULE WINAPI OVRLoadLibraryA( __in LPCSTR lpLibFileName ) { OVRTargetAPI targetAPI = DirectX; bool needShim = checkForOverride( lpLibFileName, targetAPI ); if( !needShim ) return (*oldProcA)( lpLibFileName ); return createShim( lpLibFileName, targetAPI ); }
static HMODULE WINAPI OVRLoadLibraryW( __in LPCWSTR lpLibFileName ) { WIDE_TO_MB(lpLibFileName); // Convert lpLibFileName -> lpLibFileName_cstr OVRTargetAPI targetAPI = DirectX; bool needShim = checkForOverride( lpLibFileName_cstr, targetAPI ); if( !needShim ) return (*oldProcW)( lpLibFileName ); return createShim( lpLibFileName_cstr, targetAPI ); }
static BOOL WINAPI OVRGetModuleHandleExA( __in DWORD dwFlags, __in_opt LPCSTR lpModuleName, __out HMODULE *phModule ) { OVRTargetAPI targetAPI = DirectX; bool needShim = checkForOverride( lpModuleName, targetAPI ); if( !needShim ) { return (*oldProcModExA)( dwFlags, lpModuleName, phModule ); } *phModule = createShim( lpModuleName, targetAPI ); return TRUE; }
static HMODULE WINAPI OVRLoadLibraryExA( __in LPCSTR lpLibFileName, __reserved HANDLE hFile, __in DWORD dwFlags ) { OVRTargetAPI targetAPI = DirectX; bool needShim = checkForOverride( lpLibFileName, targetAPI ); if( !needShim ) return (*oldProcExA)( lpLibFileName, hFile, dwFlags ); // FIXME: Don't throw away the flags parameter return createShim( lpLibFileName, targetAPI ); }
static HMODULE WINAPI OVRLoadLibraryExW( __in LPCWSTR lpLibFileName, HANDLE hFile, __in DWORD dwFlags ) { WIDE_TO_MB(lpLibFileName); // Convert lpLibFileName -> lpLibFileName_cstr OVRTargetAPI targetAPI = DirectX; bool needShim = checkForOverride( lpLibFileName_cstr, targetAPI ); if( !needShim ) return (*oldProcExW)( lpLibFileName, hFile, dwFlags ); // FIXME: Don't throw away the flags parameter return createShim( lpLibFileName_cstr, targetAPI ); }
static BOOL WINAPI OVRGetModuleHandleExW( __in DWORD dwFlags, __in_opt LPCWSTR lpModuleName, __out HMODULE *phModule ) { WIDE_TO_MB(lpModuleName); // Convert lpModuleName -> lpModuleName_cstr OVRTargetAPI targetAPI = DirectX; bool needShim = checkForOverride( lpModuleName_cstr, targetAPI ); if( !needShim ) { return (*oldProcModExW)( dwFlags, lpModuleName, phModule ); } *phModule = createShim( lpModuleName_cstr, targetAPI ); return TRUE; }