0

what i'm trying to do: i have source code of old game that built in c, and i want that this game process will change the title of external winform application, something like:

int Handle;

    //Find The WinForm Window Handle
    UseLibFunction("user32.dll","FindWindow","My_WinForm_Window_Title",Handle)

    //Change The Title
    UseLibFunction("user32.dll","SendMessage","WM_SETTEXT","New Title",Handle)

since i'm not a good programmer in C i can't create kind of global function such as "UseLibFunction" (use UseLibFunction function anytime and in any c file that i want - kind of global function , something like : include("thefunction.c"))
another thing: i don't have any c function named: UseLibFunction which means that i need to create this function but i have no idea from where to start.
so:
since it's the first and the last c project that i'm going to create:
someone can give me example to how to use the user32.dll functions by c?

  • You'll need to use a windows SDK or the latest version of mingw64, include `` and link with either `user32.lib` or `user32.so` depending on compiler. – Mgetz Apr 23 '14 at 23:26
  • i'm using borland 3.1 – user3566615 Apr 23 '14 at 23:33
  • I would highly suggest using a more modern compiler like [MinGW64](http://nuwen.net/mingw.html) which comes with its own windows SDK and is C11 compliant. – Mgetz Apr 23 '14 at 23:41
  • thanks about your comments, i alredy tried this compiler but when i'm runing the compiled exe there is no window creation , i also tried dosbox, the only compiler that compiled it successfully is borland 3.1 , if you have any idea how to make this project easier let me know =) – user3566615 Apr 23 '14 at 23:47
  • I would start [with the tutorials on modern window programming](http://msdn.microsoft.com/en-us/library/ff381406%28v=vs.85%29.aspx) and use mingw64 as the compiler. – Mgetz Apr 23 '14 at 23:50
  • thanks, i will try it (remind me dll injection) – user3566615 Apr 23 '14 at 23:52

0 Answers0