janemba
Mon Jul 09 15:51:16 CDT 2007
On Sun, 08 Jul 2007 08:06:25 -0700, Eliyas Yakub [MSFT] wrote:
>
http://www.microsoft.com/whdc/driver/tips/DevInit.mspx
>
> -Eliyas
>
> "janemba" <janemba@wanadoo.fr> wrote in message
> news:pan.2007.07.08.14.40.10.191463@wanadoo.fr...
>> On Sun, 08 Jul 2007 04:12:03 -0700, Anton Bassov wrote:
>>
>>> It is hard to say anything without actually seeing your code....
>>>
>>
>> - In the first driver I only create a device like this :
>> ---
>> RtlInitUnicodeString(&uName, L"\\Device\\MyDevice");
>> IoCreateDevice(pDriveObject,
>> sizeof(DEVICE_EXTENSION),
>> &uName,
>> FILE_DEVICE_UNKNOWN,
>> 0,
>> TRUE,
>> &pDeviceObject);
>> ---
>>
>> - In the second driver I only try to handle the device object pointer
>> from the first driver.
>> ---
>> RtlInitUnicodeString(&deviceName, L"\\Device\\MyDevice");
>> IoGetDeviceObjectPointer(&deviceName,
>> FILE_ANY_ACCESS,
>> &fileObject,
>> &deviceObject);
>> ---
>>
>>
>>
>>> Anton Bassov
>>>
>>> "janemba" wrote:
>>>
>>>> Hello,
>>>>
>>>> - I have two drivers, with one I create a device with IoCreateDevice
>>>> and I can see my device created in devicetree and in WinObj
>>>> applications.
>>>>
>>>> - With the other driver I used IoGetDeviceObjectPointer to handle the
>>>> device object pointer from the first driver.
>>>>
>>>> When I call IoGetDeviceObjectPointer I have an error. It returning
>>>> STATUS_INVALID_DEVICE_REQUEST all the time.
>>>>
>>>> I check and re-check with devicetree, my device exist. But with WinObj
>>>> I can see my device but when I double-click on it I have an error, I
>>>> can't
>>>> access to the properties. Maybe it is a right access problem.
>>>>
>>>> Do you have an idea to resolve this problem ?
>>>>
>>>>
>>>>
>>>>
THANKS guy !!!!
Regards,