Results 1 to 8 of 8
  1. #1
    2JJ1's Avatar
    Join Date
    Jan 2017
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0

    How can I make my DLL run fine for others?

    Hi, brand new to this forum, so please forgive me if I don't act similar to the rest of the community. I am here to ask what can I do to make a DLL compiled in Visual Studio run for others? When executed, the .NET created form runs fine when the DLL's starting point tells it to open. Unfortunately, it seems that this is the case only for me. For others, nothing happens at all for them. No form opens. Below is the code used for the DLL's entry.

    Code:
    void LOAD() {
    	ConsoleHacks();
    	Application::EnableVisualStyles();
    	Application::SetCompatibleTextRenderingDefault(false);
    	ApocClient::MainForm mainForm;
    	Application::Run(%mainForm);
    	exit(EXIT_FAILURE);
    }
    
    #pragma unmanaged
    BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID lpReserved) {
    	DisableThreadLibraryCalls(hModule);
    	if (dwReason == DLL_PROCESS_ATTACH) {
    		HANDLE hThread = NULL;
    		HANDLE hDllMainThread = OpenThread(THREAD_ALL_ACCESS, NULL, GetCurrentThreadId());
    		if (lpReserved == NULL) {
    			if (!(hThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)LOAD, 0, 0, 0))) { //start main()
    				CloseHandle(hDllMainThread);
    				return FALSE;
    			}
    			CloseHandle(hThread);
    		}
    		else if (dwReason == DLL_PROCESS_DETACH) {}
    		return TRUE;
    	}
    }

  2. #2
    kevzuidwest's Avatar
    Join Date
    Feb 2016
    Gender
    male
    Location
    The Netherlands
    Posts
    63
    Reputation
    21
    Thanks
    1,169
    My Mood
    Hot
    Try compiling the Forms in release mode, VC++ Redistributable Packages only contain release dlls.
    "It's not a bug, it's a feature"
    Remember to show some appreciation for my efforts.

  3. #3
    Nimboso's Avatar
    Join Date
    Sep 2015
    Gender
    male
    Posts
    554
    Reputation
    21
    Thanks
    2,635
    Also compile with static linking so that everything you need from the redistributable DLL is compiled within your DLL.

    Entirely misread the question.
    Last edited by Nimboso; 01-10-2017 at 01:04 PM.

  4. #4
    niko1921's Avatar
    Join Date
    Apr 2014
    Gender
    male
    Location
    mov Location, eax
    Posts
    130
    Reputation
    36
    Thanks
    261
    I thought that it's was impossible use clr on DLL injection with .NET...

  5. #5
    Threadstarter
    New Member
    2JJ1's Avatar
    Join Date
    Jan 2017
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0
    Quote Originally Posted by niko1921 View Post
    I thought that it's was impossible use clr on DLL injection with .NET...
    I'm doing it, so i'd say its very possible.

    Quote Originally Posted by kevzuidwest View Post
    Try compiling the Forms in release mode, VC++ Redistributable Packages only contain release dlls.
    Changing to release mode has fixed the problem, thank you very much.

  6. #6
    niko1921's Avatar
    Join Date
    Apr 2014
    Gender
    male
    Location
    mov Location, eax
    Posts
    130
    Reputation
    36
    Thanks
    261
    Quote Originally Posted by 2JJ1 View Post
    I'm doing it, so i'd say its very possible.



    Changing to release mode has fixed the problem, thank you very much.
    also game depends...

  7. #7
    kevzuidwest's Avatar
    Join Date
    Feb 2016
    Gender
    male
    Location
    The Netherlands
    Posts
    63
    Reputation
    21
    Thanks
    1,169
    My Mood
    Hot
    Quote Originally Posted by 2JJ1 View Post
    Changing to release mode has fixed the problem, thank you very much.
    No problem .
    "It's not a bug, it's a feature"
    Remember to show some appreciation for my efforts.

  8. #8
    Hugo Boss's Avatar
    Join Date
    Oct 2011
    Gender
    male
    Posts
    28,752
    Reputation
    4790
    Thanks
    5,902
    My Mood
    Angelic
    Seems like you got things solved.

     
    Super User since 08-29-2017
    Global Moderator from 10-02-2016 - 08-29-2017
    Premium Seller since 11-16-2016
    Moderator from 09-24-2015 - 01-09-2016
    Alliance of Valiant Arms Minion from 11-12-2015 - 01-09-2016
    Market place Minion from 09-24-2015 - 01-09-2016
    Crossfire Minion from 09-11-2015 - 01-09-2016

    Middleman from 07-07-2015 - 01-09-2016
    Market Place Minion from 03-03-2014 - 08-01-2014
    Middleman from 01-30-2014 - 08-01-2014
    Moderator from 03-29-2013 - 04-04-2013
    Market Place Minion from 03-07-2013 - 04-04-2013
    Premium Member since 01-25-2013
    Middleman from 12-04-2012 - 04-04-2013
    Registered since 10-9-2011

Similar Threads

  1. [Solved] How can I make my DayZ run faster, but still look good?
    By Pikush in forum DayZ Help & Requests
    Replies: 3
    Last Post: 08-28-2014, 06:37 PM
  2. [Help] How can I make keygen with 2 textbox and progressbar running ?
    By mralexlee in forum Visual Basic Programming
    Replies: 17
    Last Post: 12-21-2013, 08:54 PM
  3. [Help Request] How can i make a dll use a keybind after injection?
    By ikillindreams in forum C++/C Programming
    Replies: 1
    Last Post: 03-08-2013, 06:53 PM
  4. [Help] How can you make a .Dll with VB?
    By creto98 in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 9
    Last Post: 03-21-2011, 10:04 PM
  5. [Help] How can I make dll not to UnDeTECT?
    By kkandoli11 in forum Sudden Attack General
    Replies: 8
    Last Post: 04-19-2010, 05:45 PM