comparison loader/dshow/DS_Filter.c @ 342:ac9bfa4a1005

using expLoadLibraryA instead of LoadLibraryA
author arpi_esp
date Wed, 11 Apr 2001 02:11:39 +0000
parents 1f7c824033fb
children 9355b2ae634e
comparison
equal deleted inserted replaced
341:ac58837db8ad 342:ac9bfa4a1005
9 using namespace std; 9 using namespace std;
10 10
11 typedef long STDCALL (*GETCLASS) (const GUID*, const GUID*, void**); 11 typedef long STDCALL (*GETCLASS) (const GUID*, const GUID*, void**);
12 extern "C" char* def_path; 12 extern "C" char* def_path;
13 13
14 extern "C" int STDCALL LoadLibraryA(const char*); 14 extern "C" int STDCALL expLoadLibraryA(const char*);
15 //extern "C" int WINAPI expLoadLibraryA(char* name);
15 extern "C" STDCALL void* GetProcAddress(int, const char*); 16 extern "C" STDCALL void* GetProcAddress(int, const char*);
16 extern "C" int STDCALL FreeLibrary(int); 17 extern "C" int STDCALL FreeLibrary(int);
17 18
18 extern "C" void Setup_LDT_Keeper(); 19 extern "C" void Setup_LDT_Keeper();
19 extern "C" void setup_FS_Segment(); 20 extern "C" void setup_FS_Segment();
24 m_pOurInput(0), m_pOurOutput(0), 25 m_pOurInput(0), m_pOurOutput(0),
25 m_pImp(0), m_pAll(0), m_pParentFilter(0) 26 m_pImp(0), m_pAll(0), m_pParentFilter(0)
26 { 27 {
27 } 28 }
28 29
29 void DS_Filter::Create(string dllname, const GUID* id, AM_MEDIA_TYPE* in_fmt, AM_MEDIA_TYPE* out_fmt) 30 void DS_Filter::Create(char* dllname, const GUID* id, AM_MEDIA_TYPE* in_fmt, AM_MEDIA_TYPE* out_fmt)
30 { 31 {
31 32
32 Setup_LDT_Keeper(); 33 Setup_LDT_Keeper();
33 34
34 try 35 try
35 { 36 {
36 string _fullname=def_path; 37 // string _fullname=def_path;
37 _fullname+="/"; 38 // _fullname+="/";
38 _fullname+=dllname; 39 // _fullname+=dllname;
39 m_iHandle= LoadLibraryA(_fullname.c_str()); 40 // m_iHandle= LoadLibraryA(_fullname.c_str());
41 m_iHandle= expLoadLibraryA(dllname);
40 if(!m_iHandle)throw FATAL("Could not open DLL"); 42 if(!m_iHandle)throw FATAL("Could not open DLL");
41 GETCLASS func=(GETCLASS)GetProcAddress(m_iHandle, "DllGetClassObject"); 43 GETCLASS func=(GETCLASS)GetProcAddress(m_iHandle, "DllGetClassObject");
42 if(!func)throw FATAL("Illegal or corrupt DLL"); 44 if(!func)throw FATAL("Illegal or corrupt DLL");
43 45
44 HRESULT result; 46 HRESULT result;