Hi all,
I am actually developing a driver for Win98SE and Win2K.
This driver seems to work fine on Win2K but not on Win98SE.
I have a strange issue : the call to the function IoCreateSymbolicLink(…)
always fails with the error status 0xC000003A
(STATUS_OBJECT_PATH_NOT_FOUND).
I can’t figure out why (nor when) this call fails under Win98SE!
Has anyone any clues?
Thanks for any answers,
Serge DE LUCA
PS.: Here is the code I use :
PDEVICE_OBJECT
Drv_CreateFDO ( PDRIVER_OBJECT aDriverObjectPt )
{
UNICODE_STRING lDevNameUS;
UNICODE_STRING lLinkNameUS;
NTSTATUS lNTStatus;
PDEVICE_OBJECT lFuncDOPt;
/*
* Initialize the device’s names
*/
RtlInitUnicodeString(&lDevNameUS,L"\Device\MyDriver");
RtlInitUnicodeString(&lLinkNameUS,L"\??\MyDriver");
/*
* Create the device object
*/
lFuncDOPt = NULL;
lNTStatus = IoCreateDevice( aDriverObjectPt,
sizeof(DeviceExtension),
&lDevNameUS,
FILE_DEVICE_UNKNOWN,
0,
FALSE,
&lFuncDOPt);
if (NT_SUCCESS(lNTStatus))
{
/*
* Create the Symbolic Link
*/
lNTStatus =
IoCreateSymbolicLink(&lLinkNameUS,&lDevNameUS);
if (NT_ERROR(lNTStatus))
{
IoDeleteDevice(lFuncDOPt);
DbgPrint(“Drv : Error [0x%lX] on
IoCreateSymbolicLink(…)\n”,lNTStatus);
lFuncDOPt = NULL;
}
}
else
DbgPrint(“Drv : Error [0x%lX] on
IoCreateDevice(…)\n”,lNTStatus);
return lFuncDOPt;
}