Click here to Skip to main content
15,897,291 members
Articles / Desktop Programming / MFC

How to install driver dynamically or install driver as a service for Windows

Rate me:
Please Sign up or sign in to vote.
3.85/5 (7 votes)
2 Dec 2011CPOL2 min read 60.2K   4.3K   40  
Install driver dynamically or install driver as a service for Windows.
/*++
Copyright (c)  AntiDebugLIB Corporation.  All rights reserved.


Module Name:

    install.h

--*/
#include <winsvc.h>

#define DRIVER_FUNC_INSTALL     0x01
#define DRIVER_FUNC_REMOVE      0x02
#define DRIVER_NAME       "Gjglly"

static bool IsWinNT_via();
BOOL GJ_IsAntidebugWorking();

BOOLEAN
InstallDriver(
    __in SC_HANDLE  SchSCManager,
    __in LPCTSTR    DriverName,
    __in LPCTSTR    ServiceExe
    );


BOOLEAN
RemoveDriver(
    __in SC_HANDLE  SchSCManager,
    __in LPCTSTR    DriverName
    );

BOOLEAN
StartDriver(
    __in SC_HANDLE  SchSCManager,
    __in LPCTSTR    DriverName
    );

BOOLEAN
StopDriver(
    __in SC_HANDLE  SchSCManager,
    __in LPCTSTR    DriverName
    );

BOOLEAN
ManageDriver(
    __in LPCTSTR  DriverName,
    __in LPCTSTR  ServiceName,
    __in USHORT   Function
    );

BOOLEAN
SetupDriverName(
    __inout_bcount_full(BufferLength) PCHAR DriverLocation,
    __in ULONG BufferLength
    );

BOOL GJ_Install_ADL_Driver_BOOT_START();
void	GJ_Uninstall_ADL_Driver();

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
Engineer AntiDebugLIB Inc
United States United States
There are so many hackers all over the world that no software can escape the doom of being cracked.And even almost everybody believe that it is impossible to protect the applications through the technology means.But we still work hard to find applications protection solution [32-bit] [64-bit] in order to protect our works.

Homepage:

http://www.antidebuglib.com/

http://www.wintsd.com/

Comments and Discussions