title: Converting integer memory address to static member function pointer
body: <p>Im trying to detour a member function in a binary executable. I only know the function signature and the VA of the method.
  With the help of the 'method' sample, included in Detours Express 3.0, I came up with this:</p>
  
  <pre><code>class Detour
  {
  public:
      void mine_target(const char* text)
      {
          printf("text = %s\n", text);
          (this-&gt;*real_target)(text);
      }
  
      static void (Detour::*real_target)(const char* text);
  };
  
  void (Detour::*real_target)(const char* text) 
      = (void (Detour::*)(const char*))0x401010;
  </code></pre>
  
  <p>Which gives me the error:</p>
  
  <pre><code>error C2440: 'type cast' : cannot convert from 'int' to 'void (__thiscall Detour:: *)(const char *)'
               There are no conversions from integral values to pointer-to-member values
  </code></pre>