Back to square one.
Is the driver installed?
Is the driver running? Does net start “your driver name” succeed?
Bill Wandel
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]
On Behalf Of xxxxx@yahoo.co.uk
Sent: Friday, September 19, 2008 4:53 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Createfile error
So I tidied up the code, recompiled and had debugview running. Nothing shows
up in debugview. Which is totally weird.
Tidied code is
NTSTATUS
DriverEntry(
IN PDRIVER_OBJECT driverObject,
IN PUNICODE_STRING registryPath
)
{
NTSTATUS status = STATUS_SUCCESS; //Optimistic start!!
UNICODE_STRING ntUnicodeString; // NT Device Name
“\Device\SmplSys”
UNICODE_STRING ntWin32NameString; // Win32 Name
“\DosDevices\SimpleSys”
DbgPrint(“DriverEntry point loaded”);
RtlInitUnicodeString(
&ntUnicodeString,
NT_DEVICE_NAME
);
status = IoCreateDevice(
driverObject,
0,
&ntUnicodeString,
FILE_DEVICE_NETWORK,
0,
FALSE,
&gDeviceObject
);
if (!NT_SUCCESS(status))
{
DbgPrint(“There was a problem creating the device”);
goto Exit;
}
else
{
DbgPrint(“Created device successfully”);
}
driverObject->DriverUnload = DriverUnload;
driverObject->MajorFunction[IRP_MJ_CREATE] = DriverCreateClose;
driverObject->MajorFunction[IRP_MJ_CLOSE] = DriverCreateClose;
RtlInitUnicodeString( &ntWin32NameString, DOS_DEVICE_NAME );
status = IoCreateSymbolicLink(
&ntWin32NameString, &ntUnicodeString );
if (!NT_SUCCESS(status))
{
DbgPrint(“There was a problem creating the device”);
goto Exit;
}
else
{
DbgPrint(“Created device successfully”);
return status;
}
Exit:
IoDeleteDevice(gDeviceObject);
return status;
}
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer