Hi,
I try to hook the CoGetClassObject() function.
In fact, the function is hooked but I can't manage to do what CoGetClassObject() does.
Well, I dont know what CoGetClassObject() does exactly so it's a bit hard to try to "emulate" it.
Here is my code :
So it seems that I forgot "few" instructions, but I don't know which.Code:HRESULT WINAPI MyCoGetClassObject( __in REFCLSID rclsid, __in DWORD dwClsContext, __in_opt LPVOID pServerInfo, __in REFIID riid, __out LPVOID *ppv ){ [...] if( it!= dict.end() ){ module = LoadLibraryWReal(it->second.c_str()); if(!module) return HRESULT_FROM_WIN32(GetLastError()); dllGetClassObject = (FUNC) GetProcAddress(module,"DllGetClassObject"); if(!dllGetClassObject) return HRESULT_FROM_WIN32(GetLastError()); hr = dllGetClassObject(rclsid, IID_IClassFactory, &pClassFactory); if (FAILED(hr)) return hr; return S_OK; } return CoGetClassObjectReal( rclsid,dwClsContext,pServerInfo,riid,ppv); }
If anyone has an idea,
thanks.


Reply With Quote

Bookmarks