Skip to content

Instantly share code, notes, and snippets.

@sprite2005
Created March 7, 2012 14:37
Show Gist options
  • Save sprite2005/1993510 to your computer and use it in GitHub Desktop.
Save sprite2005/1993510 to your computer and use it in GitHub Desktop.
Header:
class CefBrowserDetour : public CefBrowser
{
public:
static bool Mine_CreateBrowser(CefWindowInfo& windowInfo,
CefRefPtr<CefClient> client,
const CefString& url,
const CefBrowserSettings& settings);
static bool (*Real_CreateBrowser)(CefWindowInfo& windowInfo,
CefRefPtr<CefClient> client,
const CefString& url,
const CefBrowserSettings& settings);
};
Initializing Function Pointer:
bool (CefBrowserDetour::*Real_CreateBrowser)(CefWindowInfo& windowInfo,
CefRefPtr<CefClient> client,
const CefString& url,
const CefBrowserSettings& settings) = (bool (*)(CefWindowInfo&, CefRefPtr<CefClient>, const CefString&, CefBrowserSettings&))DetourFindFunction("libcef.dll", "cef_browser_create");
Error:
Error 9 error C2440: 'initializing' : cannot convert from 'bool (__cdecl *)(CefWindowInfo &,CefRefPtr<T>,const CefString &,CefBrowserSettings &)' to 'bool (__thiscall CefBrowserDetour::* )(CefWindowInfo &,CefRefPtr<T>,const CefString &,const CefBrowserSettings &)' c:\users\sprite\documents\visual studio 2010\swtor\projects\patchlogger3\patchlogger3dll\dllmain.cpp 172
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment