Mercurial > mplayer.hg
changeset 342:ac9bfa4a1005
using expLoadLibraryA instead of LoadLibraryA
author | arpi_esp |
---|---|
date | Wed, 11 Apr 2001 02:11:39 +0000 |
parents | ac58837db8ad |
children | ec7b16345547 |
files | loader/dshow/DS_Filter.c loader/dshow/DS_Filter.h |
diffstat | 2 files changed, 9 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/loader/dshow/DS_Filter.c Wed Apr 11 02:10:47 2001 +0000 +++ b/loader/dshow/DS_Filter.c Wed Apr 11 02:11:39 2001 +0000 @@ -11,7 +11,8 @@ typedef long STDCALL (*GETCLASS) (const GUID*, const GUID*, void**); extern "C" char* def_path; -extern "C" int STDCALL LoadLibraryA(const char*); +extern "C" int STDCALL expLoadLibraryA(const char*); +//extern "C" int WINAPI expLoadLibraryA(char* name); extern "C" STDCALL void* GetProcAddress(int, const char*); extern "C" int STDCALL FreeLibrary(int); @@ -26,17 +27,18 @@ { } -void DS_Filter::Create(string dllname, const GUID* id, AM_MEDIA_TYPE* in_fmt, AM_MEDIA_TYPE* out_fmt) +void DS_Filter::Create(char* dllname, const GUID* id, AM_MEDIA_TYPE* in_fmt, AM_MEDIA_TYPE* out_fmt) { Setup_LDT_Keeper(); try { - string _fullname=def_path; - _fullname+="/"; - _fullname+=dllname; - m_iHandle= LoadLibraryA(_fullname.c_str()); +// string _fullname=def_path; +// _fullname+="/"; +// _fullname+=dllname; +// m_iHandle= LoadLibraryA(_fullname.c_str()); + m_iHandle= expLoadLibraryA(dllname); if(!m_iHandle)throw FATAL("Could not open DLL"); GETCLASS func=(GETCLASS)GetProcAddress(m_iHandle, "DllGetClassObject"); if(!func)throw FATAL("Illegal or corrupt DLL");
--- a/loader/dshow/DS_Filter.h Wed Apr 11 02:10:47 2001 +0000 +++ b/loader/dshow/DS_Filter.h Wed Apr 11 02:11:39 2001 +0000 @@ -16,7 +16,7 @@ public: DS_Filter(); virtual ~DS_Filter(); - void Create(string dllname, const GUID* id, AM_MEDIA_TYPE* in_fmt, AM_MEDIA_TYPE* out_fmt); + void Create(char* dllname, const GUID* id, AM_MEDIA_TYPE* in_fmt, AM_MEDIA_TYPE* out_fmt); void Start(); void Stop(); int m_iHandle;