EarlabModuleInstance::~EarlabModuleInstance() { (*mDeleteInstance)(mInstance); if (mModule != NULL) FreeModuleFile(); if (mModuleName != NULL) delete [] mModuleName; }
HMODULE CRemoteLoader::LoadLibraryByPathIntoMemoryA( PCHAR Path, BOOL PEHeader ) { HMODULE hReturnValue = NULL; DebugShout( "[LoadLibraryByPathIntoMemoryA] %s (0x%X)", Path, PEHeader ); ModuleFile File = InitModuleFile( Path ); if( File.IsValid() == FALSE ) { DebugShout( "[LoadLibraryByPathIntoMemoryA] Failed to open file handle!" ); return NULL; } hReturnValue = LoadLibraryFromMemory( File.Buffer, File.Size, PEHeader, Path ); if( FreeModuleFile( File ) == FALSE ) { DebugShout( "[LoadLibraryByPathIntoMemoryA] Failed to free file handle..." ); } return hReturnValue; }