Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > .NET Languages
You last visited: Today at 22:40

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[C#] auto load dll on injection

Discussion on [C#] auto load dll on injection within the .NET Languages forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2011
Posts: 10
Received Thanks: 0
[C#] auto load dll on injection

I have a dll(made by me in c#) and I want to auto load a function when it is injected into a process. How can I do this? An little example would be perfect for me.

PS: Sorry for my english..
tdr2010 is offline  
Old 10/09/2012, 00:24   #2
 
elite*gold: 0
Join Date: May 2010
Posts: 793
Received Thanks: 268
thats not posible in C#.

you have to write native code thats calls your function. The easiest is to use c++/Cli because that allows you to merge nativ code (with a dllmain) with managed code that calls your function, without having to initialize the .net by yourself.
nkkk is offline  
Old 10/09/2012, 19:16   #3
 
elite*gold: 0
Join Date: May 2011
Posts: 10
Received Thanks: 0
ok...how cand I make a simple c++ native dll? (using Visual C++?) an example?
tdr2010 is offline  
Old 10/09/2012, 19:30   #4
 
elite*gold: 0
Join Date: May 2010
Posts: 793
Received Thanks: 268
hm i use us untimate but i think its possible with vc++ too.

you make a new c++ cli dynamic library, and then add the following file:
Code:
#pragma unmanaged

#include<Windows.h>
#include "managedStart.h"

DWORD WINAPI ThreadProc(LPVOID lpParameter);

BOOL APIENTRY DllMain( HMODULE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved
					 )
{
	switch (ul_reason_for_call)
	{
	case DLL_PROCESS_ATTACH:
		CreateThread(NULL,NULL,ThreadProc,NULL,0,NULL);
		break;
	case DLL_THREAD_ATTACH:
	case DLL_THREAD_DETACH:
	case DLL_PROCESS_DETACH:
		break;
	}
	return TRUE;
}

DWORD WINAPI ThreadProc(LPVOID lpParameter)
{
	Sleep(200);
	ManagedStart();
	return 0;
}
ManagedStart is a managed! function declared in managedStart.h, and defined in managedStart.cpp which calls your function from your C# dll.
nkkk is offline  
Old 10/16/2012, 10:01   #5
 
Naworia's Avatar
 
elite*gold: 12
Join Date: Aug 2011
Posts: 455
Received Thanks: 418
Use key events if possible in dynamic libraries
Naworia is offline  
Old 10/16/2012, 18:30   #6
 
elite*gold: 42
Join Date: Jun 2008
Posts: 5,425
Received Thanks: 1,888
Quote:
Originally Posted by nkkk View Post
thats not posible in C#.

you have to write native code thats calls your function. The easiest is to use c++/Cli because that allows you to merge nativ code (with a dllmain) with managed code that calls your function, without having to initialize the .net by yourself.

And whats hard about starting the CLR-Host by urself? :<
MoepMeep is offline  
Reply


Similar Threads Similar Threads
[S] WarRock Int CRC Bypass (Auto DLL Load)
09/27/2012 - WarRock Trading - 4 Replies
Hello guys. I wanted to show you a DLL (called DSETUP.dll) which removes the CRC Check. If you wanted to have it, just PM me and we can make a Deal (i LOVE e*gold & psc). Its 100% working, i will support you if you have problems. And... If it doesnt work ill guarantee that i WILL help you to fix this. And... This dll only needs to replace the old DSETUP.dll so that you dont need a injector: Run the Client as there had no CRC Check been. This CRC Check will remove the CRC Check 100% and...
Shaiya MultiBot v1.6#Auto potion,auto collection,auto stroke,auto skill
06/01/2012 - Shaiya Hacks, Bots, Cheats & Exploits - 12 Replies
http://d1205.hizliresim.com/x/5/5bjkl.jpg Hello everyone friends. I took off and I wanted to share the new version of Hilemizin. Other editions, a new difference: * Layout option 2.Skill. One trick from Image; http://c1205.hizliresim.com/x/4/59sgl.jpg Use the same fashion as yet. Slot {1} / Flat Beat Flat Beat Talent = 1 you put in the game. That it is the other options we.
[QUESTION] Auto Assembly / Code Injection
05/30/2009 - Dekaron - 2 Replies
Ok, I just need to know one thing. When you use code injection to search an address (example, speed hacking address), how do you make it so your able to send it to the table? You need the & but, I don't know where, or if I can put that in to make it work. Please post if it's possible, and if it is, how? Thanks so much.
i want to trade my 100m SRO gold to your levelup load or RF load
04/15/2008 - Silkroad Online Trading - 1 Replies
hi..........anyone want SRO gold i have 100m i want to trade this to your levelup load or RF load anyone have just pm me or contact me this email add. [email protected] or +639202300892



All times are GMT +1. The time now is 22:40.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.