MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / FindDLL

Method FindDLL

neo/framework/FileSystem.cpp:3671–3696  ·  view source on GitHub ↗

================= idFileSystemLocal::FindDLL ================= */

Source from the content-addressed store, hash-verified

3669=================
3670*/
3671void idFileSystemLocal::FindDLL( const char *name, char _dllPath[ MAX_OSPATH ] ) {
3672 idFile *dllFile = NULL;
3673 char dllName[MAX_OSPATH];
3674 idStr dllPath;
3675
3676 sys->DLL_GetFileName( name, dllName, MAX_OSPATH );
3677
3678 if (!serverPaks.Num() && Sys_GetPath(PATH_EXE, dllPath)) {
3679 // from executable directory first - this is handy for developement
3680 dllPath.StripFilename( );
3681 dllPath.AppendPath( dllName );
3682 dllFile = OpenExplicitFileRead( dllPath );
3683 }
3684
3685 if ( !dllFile && !serverPaks.Num() )
3686 dllFile = OpenFileReadFlags( dllName, FSFLAG_SEARCH_DIRS );
3687
3688 if ( dllFile ) {
3689 dllPath = dllFile->GetFullPath( );
3690 CloseFile( dllFile );
3691 dllFile = NULL;
3692 } else {
3693 dllPath = "";
3694 }
3695 idStr::snPrintf( _dllPath, MAX_OSPATH, "%s", dllPath.c_str() );
3696}
3697
3698/*
3699================

Callers 2

LoadMayaDllMethod · 0.80
LoadMayaDllMethod · 0.80

Calls 6

AppendPathMethod · 0.80
Sys_GetPathFunction · 0.50
DLL_GetFileNameMethod · 0.45
NumMethod · 0.45
GetFullPathMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected