Click here to Skip to main content
15,884,629 members
Articles / Programming Languages / C#

Driver Loader [DLoad] from Scratch

Rate me:
Please Sign up or sign in to vote.
5.00/5 (30 votes)
2 Nov 2009CPOL7 min read 75.5K   7.9K   92  
A tool for loading device drivers
// dllmain.cpp : Defines the entry point for the DLL application.
#include "stdafx.h"

/*
Notice, to be able to load this DLL in C# application,
you cannot use here specific libraries, for example
you cannot use MessageBox function,
you cannot use shlwapi.dll functions, etc, etc.
For this you can thank C# lang coz it is has so fucking
brilliant dependencies resolving system.
*/

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

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer ORM
Poland Poland
codeceptive[at]gmail.com

Comments and Discussions