iPromise Grandmaster Cheater
Reputation: -1
Joined: 27 Jun 2009 Posts: 529 Location: Canada
|
Posted: Thu Aug 09, 2012 5:36 am Post subject: Loading your driver, receiving output.. |
|
|
I am on a Windows 7 x86 os. Each time I attempt to load my driver, I get no errors however, when I wait to see output from DebugView, I don't see my drivers text.
I am lost, and I don't know how to fix this error.
Driver.c
| Code: |
#include <ntddk.h>
NTSTATUS DriverEntry (PDRIVER_OBJECT pDriverObject, PUNICODE_STRING pRegistryPath)
{
DbgPrint("DriverEntry Called \r\n");
return STATUS_SUCCESS;
}
|
Loader.cpp
| Code: |
#include <Windows.h>
#include <iostream>
using namespace std;
void main ()
{
// Open the service manager
SC_HANDLE hscManager = OpenSCManager ( NULL, NULL, SC_MANAGER_CREATE_SERVICE );
SERVICE_STATUS ss;
if ( hscManager )
{
// Attempt to open service
SC_HANDLE hService = OpenService ( hscManager, "First", SERVICE_START | DELETE | SERVICE_STOP );
// If the service does not exist, create the service
if ( !hService )
hService = CreateService ( hscManager, "First", "First Driver", SERVICE_START | DELETE | SERVICE_STOP, SERVICE_KERNEL_DRIVER,
SERVICE_DEMAND_START, SERVICE_ERROR_IGNORE, "C:\\FirstDriver.sys", NULL, NULL, NULL, NULL, NULL );
if ( hService )
{
// Start the driver
StartService ( hService, 0, NULL );
cout << "Enter any key to close the driver." << endl;
system ("PAUSE");
// Stop the driver
ControlService(hService, SERVICE_CONTROL_STOP, &ss);
CloseServiceHandle ( hService );
DeleteService(hService);
}
else
cout << "Failed to create the service." << endl;
}
else
cout << "Failed to open service." << endl;
// Close the manager
CloseServiceHandle ( hscManager );
system ( "CLS" );
system ( "PAUSE" );
}
|
thx
|
|
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25833 Location: The netherlands
|
Posted: Thu Aug 09, 2012 8:44 am Post subject: |
|
|
is dbgview set to capture all kernelmode messages? (default it's off)
Also, check if your service is valid (!hService) is not a good method, as INVALID_HANDLE (-1) is also not 0
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|