exit/unload injected .net dll menu

Shout-Out

User Tag List

Results 1 to 6 of 6
  1. #1
    YetiHunter's Avatar Member
    Reputation
    6
    Join Date
    Aug 2006
    Posts
    57
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    exit/unload injected .net dll

    hi, i'm injecting a clr bootstrapper which loads a .net dll. My problem is that no matter what i do to kill / unload the created threads or the dll it is still loaded in wow. this is what i'm doing:

    Code:
    shutdown in the .net dll
    
    guiThread.Abort();
    Environment.Exit(int.Parse(Environment.GetCommandLineArgs()[1]));
    that should kill the threads i have additionally created

    Code:
    and in the clr bootstrapper im unloading the dll and cleaning up the clr
    		DWORD *AppDom = NULL;
    		lpRuntimeHost->GetCurrentAppDomainId(AppDom);
    		lpRuntimeHost->UnloadAppDomain(*AppDom, false);
    		lpRuntimeHost->Stop();
    		lpRuntimeHost->Release();
    but after i've done all that the dll is still loaded into wow.

    exit/unload injected .net dll
  2. #2
    Jens's Avatar Contributor
    Reputation
    179
    Join Date
    Sep 2006
    Posts
    251
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The library will still hang around even if it has nothing to do, you should take a look at FreeLibrary

    Code:
    [DllImport("kernel32.dll", CharSet=CharSet.Auto, SetLastError=true)]
    public static extern bool FreeLibrary([In] IntPtr hModule);

  3. #3
    YetiHunter's Avatar Member
    Reputation
    6
    Join Date
    Aug 2006
    Posts
    57
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes of cause. that works fine for my clr-bootstrapper but not for the .net dll, mainly because i don't have the pointer to the module and i don't see how i could get it

  4. #4
    Jens's Avatar Contributor
    Reputation
    179
    Join Date
    Sep 2006
    Posts
    251
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's an equally trivial task:
    Code:
    [DllImport("kernel32.dll", CharSet=CharSet.Auto, SetLastError=true)]
    public static extern IntPtr GetModuleHandle(string lpModuleName);

  5. #5
    YetiHunter's Avatar Member
    Reputation
    6
    Join Date
    Aug 2006
    Posts
    57
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks alot. =)

  6. #6
    skra's Avatar Member
    Reputation
    1
    Join Date
    Apr 2009
    Posts
    33
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    free library has no effect for me. could that be because the clr is still running if so, how can i keep the clrruntimehost pointer? after i start my .net dll it vanishes =(

Similar Threads

  1. [Release][C#]WhiteMagic - Injected .NET Helper Library
    By Apoc in forum WoW Memory Editing
    Replies: 53
    Last Post: 01-23-2013, 09:58 AM
  2. C# .NET Dll Injector
    By adaephon in forum WoW Memory Editing
    Replies: 18
    Last Post: 01-02-2013, 09:12 PM
  3. HadesMem: Creating a Process and Injecting a DLL
    By GliderPro in forum WoW Memory Editing
    Replies: 3
    Last Post: 12-20-2010, 02:31 AM
  4. Destructor's Tutorial: Managed .NET DLL Injection
    By ugkbunb in forum Programming
    Replies: 1
    Last Post: 07-30-2009, 05:15 PM
  5. Injecting a DLL via EasyHook
    By Viano in forum Programming
    Replies: 0
    Last Post: 07-25-2009, 11:02 AM
All times are GMT -5. The time now is 12:44 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search