c++ - undefined reference to Mysnprintf -


CodeBlocks and am trying to create hook DLL inside

DllMain

  #include "main.h" #include "asm.h" #include & lt; Stdio.h & gt; using namespace std; Static Violence WINAPI Mysnprintf (four * str, int len, const char * format, ...); Static Zero InitDll () {origininalsnprintf = (snprintfFn) GetProcAddress (GetModuleHandleA ("msvcr90.dll"), "_snprintf"); ASM code; Code.JMP ((int) Mysnprintf); // where JMP = Aussie & amp; JMP (Intrate) {...}}   

I have no clue what is wrong because if I did this with Microsoft Visual C ++ So this will not work the error !!!

The linker tells you that is undefined , and that's right. You have not written definition for your function you have only declared .

After the function, place some curly braces and tell your compiler what you want to do do to do that function: stable Violence WINAPI Mysnprintf (four * str, int len, const char * format, ...) {...}

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -