Hi all,
Has anyone run into an error message (GetLastError()) of “Incorrect
Function” when doing a CreateFile using a GUID?
i.e. the code looks like this:
hDevice = CreateFile (
detail->DevicePath,
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
NULL);
where:
PSP_DEVICE_INTERFACE_DETAIL_DATA detail;
The path data sent back looked good:
\?\pci#ven_10ee&dev_8382&subsys_838210ee&rev_01#5&1c178e18&0&28f810#{86490f
eb-e578-4a67-8723-674d07363ec2}
The error message doesn’t make sense to my. Anyone have any ideas?
Thanks,
Howard Keller
Never mind, I found my error.
Thanks,
Howard
“hkeller” wrote in message
news:xxxxx@ntdev…
> Hi all,
>
> Has anyone run into an error message (GetLastError()) of “Incorrect
> Function” when doing a CreateFile using a GUID?
>
> i.e. the code looks like this:
>
> hDevice = CreateFile (
> detail->DevicePath,
> GENERIC_READ | GENERIC_WRITE,
> FILE_SHARE_READ | FILE_SHARE_WRITE,
> NULL,
> OPEN_EXISTING,
> FILE_ATTRIBUTE_NORMAL,
> NULL);
>
> where:
> PSP_DEVICE_INTERFACE_DETAIL_DATA detail;
>
> The path data sent back looked good:
>
>
>
\?\pci#ven_10ee&dev_8382&subsys_838210ee&rev_01#5&1c178e18&0&28f810#{86490f
> eb-e578-4a67-8723-674d07363ec2}
>
> The error message doesn’t make sense to my. Anyone have any ideas?
>
> Thanks,
>
> Howard Keller
>
>
>