Results 1 to 2 of 2
  1. #1
    xByte
    xByte is offline
    Guest
    Join Date
    2012 Aug
    Posts
    2
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    1
    Thanked in
    1 Post
    Rep Power
    0

    Talking [C++] Form In Dll

    Hi guys,
    this is a simple code for a dll, that call a Windows Form at injection

    Used: Visual C++ 2008 Express Edition ( for me ), however you this code is thinked for Vc++, so i don't know if work well with embarcadero or Qt or other ide

    Step 1: Create new empty project ( Win32 ) - Dynamic Lib;
    Step 2: Add to solution the file "Main.dll", open the file and paste this code:

    Code:
    #include <windows.h>
    #include "Linker.h" 
    void WINAPI MyThread ( )
    {
    }
     
     
        switch ( dwReason ) {
                   case DLL_PROCESS_ATTACH:
                            DisableThreadLibraryCalls(hModule);
                if ( CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)Main, NULL, 0, NULL) == NULL ) {
                                  return FALSE;
                }
     
                break;
     
            case DLL_PROCESS_DETACH:
                break;
     
            case DLL_THREAD_ATTACH:
                break;
     
     
     
     
        return TRUE;
    }
    Step 3: Add a new Form, name "Form1", now open Form1.cpp and paste this code:
    Code:
    #include "Form1.h"
    #include <Windows.h>
     
    using namespace bot; 
    [STAThreadAttribute]
    int Main()
    {
     
        // Enabling Windows XP visual effects before any controls are created
        Application::EnableVisualStyles();
        Application::SetCompatibleTextRenderingDefault(false); 
     
     
    }
    Step4: Add a linker in the solution with this content:

    Code:
    int Main();

    Just Finish!

    Credits to The Nu||z for the code.

    Sorry for my bad english, i'm italian
    The Tut ins't copied, if you found it in italian forum i have post it

  2. The Following User Says Thank You to xByte For This Useful Post:


  3. #2
    xByte
    xByte is offline
    Guest
    Join Date
    2012 Aug
    Posts
    2
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    1
    Thanked in
    1 Post
    Rep Power
    0
    Up

Similar Threads

  1. [Help] How to safe my charector form Free PK ?
    By coperation in forum Forsaken World
    Replies: 0
    Last Post: 2012-07-18, 03:53 AM
  2. Replies: 1
    Last Post: 2012-01-07, 11:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •