Hi everyone,
I am doing an intermediate driver on win98. On win2k I use
NdisMRegisterDevice to register DosDevice.But it is not surrported on
win98.
I use IoCreateDevice and IoCreateSymbolicLink to replace it. My file is
.sys file
.When I use CreateFile ,the return value is not valid.GetLastError returns
2.
My code like this:
#define NT_DEVICE_NAME L"\Device\MYDRIVER"
#define DOS_DEVICE_NAME L"\DosDevices\MYDRIVER"
RtlInitUnicodeString(&DeviceName,NT_DEVICE_NAME);
RtlInitUnicodeString(&SymbolicName,DOS_DEVICE_NAME);
Status=IoCreateDevice (DriverObject,
0,
//sizeof (DEVICE_EXTENSION),
&DeviceName,
FILE_DEVICE_UNKNOWN,
0,
FALSE,
&deviceObject);
Äú¿ÉÒÔÔÚ MSN Hotmail Õ¾µã http://www.hotmail.com/cn Ãâ·ÑÊÕ·¢µç×ÓÓʼþ
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com