2008-08-10

25 new messages in 14 topics - digest

microsoft.public.development.device.drivers
http://groups.google.com/group/microsoft.public.development.device.drivers?hl=en

microsoft.public.development.device.drivers@googlegroups.com

Today's topics:

* NDIS marshalling pointers - 1 messages, 1 author
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/c6853918b66d8360?hl=en
* Hooking video driver functions / communicating between driver and user mode
application - 3 messages, 3 authors
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/346686024f971b4a?hl=en
* Question about video driver sample source code - mga - 3 messages, 3 authors
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/b2265218a700779e?hl=en
* Installation of DDK 2003 - 1 messages, 1 author
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/d3279a7407b7d0d5?hl=en
* Obtain user information from kernel mode. - 4 messages, 2 authors
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/ccea739d21881fd9?hl=en
* What is FileSystem's IRP When deleting file - 1 messages, 1 author
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/ae58b997930c3314?hl=en
* reinstalls device when installed in different USB port. - 1 messages, 1
author
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/ddf37e8a39ad20a5?hl=en
* NDISUIO - some basic questions - 4 messages, 2 authors
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/8b1f429004ff8750?hl=en
* Get List of INF-File and Drivers for Device,... - 1 messages, 1 author
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/db42a1a0dccd778d?hl=en
* Need simple C# USB driver example - communicating with slow device - 2
messages, 2 authors
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/cd405bbde11c6427?hl=en
* Requirements or Restrictions using "Imaging Device" in Windows Driver
Manager - 1 messages, 1 author
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/4c0a784155b7d547?hl=en
* Unknown Device,... - 1 messages, 1 author
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/c9be0a0124661aad?hl=en
* Windows PS printer driver - 1 messages, 1 author
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/7d5f6e0e1d16405c?hl=en
* How to USB Filter Driver ? - 1 messages, 1 author
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/fb8b034183f0ef85?hl=en

==============================================================================
TOPIC: NDIS marshalling pointers
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/c6853918b66d8360?hl=en
==============================================================================

== 1 of 1 ==
Date: Sat, Aug 9 2008 2:47 pm
From: "Pavel A."


you're welcome.
Try also microsoft.public.pocketpc.developer.networking
--PA


"Gammaraman" <Gammaraman@discussions.microsoft.com> wrote in message
news:BACD3F35-8CF1-408F-BCA2-67A312371EEE@microsoft.com...
> Thanks, Pavel.
>
> "Pavel A." wrote:
>
>> "Gammaraman" <Gammaraman@discussions.microsoft.com> wrote in message
>> news:29CBD99E-4822-4785-B6E8-390B1B0AB52A@microsoft.com...
>> > Thanks, Pavel.
>> >
>> > What about an application using NDISUIO to talk to the miniport?
>>
>> Gammaraman,
>>
>> As already answered, in WinXP NDISUIO does not provide documented
>> interfaces
>> for
>> our applications. Since your app is for WinCE, please ask in WinCE
>> newsgroups.
>>
>> > From the
>> > miniport's perspective, it is talking to an NDIS protocol driver
>> > however
>> > one
>> > of the end points of the OID interface is now in user-space. Someone
>> > has
>> > to
>> > marshall the pointer parameters, right?
>>
>> Yes, NDISUIO does the marshaling - hence, it takes responsibility
>> for all possible problems you've mentioned.
>>
>> Regards,
>> --PA
>>
>>
>> > "Pavel A." wrote:
>> >
>> >> "Gammaraman" <Gammaraman@discussions.microsoft.com> wrote in message
>> >> news:F211976D-E7FB-4E5D-BEFD-2FA76E560B45@microsoft.com...
>> >> > Hi,
>> >> >
>> >> > It appears to me that NDIS must be marshalling pointers being passed
>> >> > between
>> >> > the protocol drivers and the miniport drivers. For e.g. when a set
>> >> > or
>> >> > query
>> >> > OID is called by NDIS on behalf of a protocol driver, typically some
>> >> > pointer
>> >> > parameters are passed.
>> >> >
>> >> > I have not found any documentation saying that miniport drivers need
>> >> > to
>> >> > perform some type of marshalling before reading/writing to the
>> >> > pointer
>> >> > parameters. Yet without someone doing some marshalling, the miniport
>> >> > driver
>> >> > would not be able to read/write to the pointer params due to
>> >> > security/memory
>> >> > architecture, etc.
>> >> >
>> >> > Can someone please confirm this?
>> >>
>> >> ( note: my reply is in the context of NT based Windows. AFAIK it
>> >> does cover WinCE as well - but better ask in WinCE newsgroups )
>> >>
>> >> Both ends of NDIS OID interface (miniports and protocols/IMs) are in
>> >> the
>> >> kernel.
>> >>
>> >> NDIS miniports are not supposed to communicate directly with something
>> >> else
>> >> besides protocols or their hardware devices. All this occurs in kernel
>> >> mode.
>> >> Making a miniport communicate with user mode stretches it's contract
>> >> to
>> >> the
>> >> limit that leads to many
>> >> unwanted issues. Like you've mentioned, this raises the need in
>> >> marshaling, access rights, and there are more issues with
>> >> graceful handling of PnP & power events.
>> >>
>> >> NDIS gives you means to expose a miniport to user mode
>> >> (NdisMRegisterDevice or NdisRegisterDeviceEx)
>> >> but if you use this, you are beyond NDIS contracts and are
>> >> on your's own. So, no documentation.
>> >>
>> >> Regards,
>> >> --PA
>> >>
>> >>
>> >>
>>


==============================================================================
TOPIC: Hooking video driver functions / communicating between driver and user
mode application
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/346686024f971b4a?hl=en
==============================================================================

== 1 of 3 ==
Date: Sun, Aug 10 2008 2:02 am
From: "spujia"


Hello,

I am using the WDK mirror driver sample as a base. The driver is attached
to the desktop. My goal is to intercept basic graphics functions through
the use of the mirror driver and access them in a user-mode application. Is
there a way to directly hook the GDI functions that are implemented in the
driver (DrvTextOut , DrvBitBlit, etc) from my user-mode application? I
have seen a couple examples of other ways to communicate beween driver and
user-mode apps, one that uses shared memory and one that uses io and is
implemented as a simple comm driver
(DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL], etc). I tried to
splice the comm driver stuff into the video driver, but was unable to do so
because I could not include miniport.h and Ntddk.h in the same file. OK, I
quess I have two questions....

Any help is much appreciated.

Best regards,

Steve

== 2 of 3 ==
Date: Sun, Aug 10 2008 3:27 pm
From: Tim Roberts


"spujia" <steve_pujia@oculislabs.com> wrote:
>
>I am using the WDK mirror driver sample as a base. The driver is attached
>to the desktop. My goal is to intercept basic graphics functions through
>the use of the mirror driver and access them in a user-mode application. Is
>there a way to directly hook the GDI functions that are implemented in the
>driver (DrvTextOut , DrvBitBlit, etc) from my user-mode application?

"Hook" for what purpose? I don't really think that's what you meant.

>I have seen a couple examples of other ways to communicate beween driver and
>user-mode apps, one that uses shared memory and one that uses io and is
>implemented as a simple comm driver
>(DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL], etc). I tried to
>splice the comm driver stuff into the video driver, but was unable to do so
>because I could not include miniport.h and Ntddk.h in the same file. OK, I
>quess I have two questions....

Display drivers use a very different scheme -- they aren't WDM at all. You
can use the ExtEscape function to send arbitrary requests to the display
driver.
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

== 3 of 3 ==
Date: Sun, Aug 10 2008 6:06 pm
From: allenzhang


Tim Roberts is correct, display driver isn't WDM, But you can do it by a
filter driver, of course, It is different beteen display driver fiter and the
other fitlers.

I can't sure that it is okay or not in Vista, I have been write a drver to
direct hook the Drv... Function of the real display driver in several years
ago, It is working correct in XPDM(only test it in Win2K/WinXP),
I think you should hook dxg... module in WDDM.

B.R.
AllenZhang


"spujia" wrote:

> Hello,
>
> I am using the WDK mirror driver sample as a base. The driver is attached
> to the desktop. My goal is to intercept basic graphics functions through
> the use of the mirror driver and access them in a user-mode application. Is
> there a way to directly hook the GDI functions that are implemented in the
> driver (DrvTextOut , DrvBitBlit, etc) from my user-mode application? I
> have seen a couple examples of other ways to communicate beween driver and
> user-mode apps, one that uses shared memory and one that uses io and is
> implemented as a simple comm driver
> (DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL], etc). I tried to
> splice the comm driver stuff into the video driver, but was unable to do so
> because I could not include miniport.h and Ntddk.h in the same file. OK, I
> quess I have two questions....
>
> Any help is much appreciated.
>
> Best regards,
>
> Steve
>
>


==============================================================================
TOPIC: Question about video driver sample source code - mga
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/b2265218a700779e?hl=en
==============================================================================

== 1 of 3 ==
Date: Sun, Aug 10 2008 3:32 am
From: tom1000000


Hello

I was looking through the included source code in the NT4 DDK... yes its
old, but I guess it should be simpler to understand.

In the file ddk\src\video\displays\mga\ENABLE.C it refers to
IOCTL_VIDEO_MTZ_QUERY_HW_DATA.

Where is the source code for this IOCTL? The source code given in the DDK
doesn't even include the code that queries the video card? I would say the
provided source code is incomplete.

As a challenge for myself, I tried to find the code that determines the
amount of RAM on the video card. I couldn't find it.

Why did they only provide some of the source code. Why did they leave out
the code that queries / initializes the mga video card? Thats only like the
most important part of the driver? I am not impressed.

Thank you for your help.

if (EngDeviceIoControl(ppdev->hDriver,
IOCTL_VIDEO_MTX_QUERY_HW_DATA,
NULL, // Input
0,
&HwData, // Output
sizeof(HW_DATA),
&ReturnedDataLength))


== 2 of 3 ==
Date: Sun, Aug 10 2008 3:39 pm
From: Tim Roberts


tom1000000 <tom1000000@discussions.microsoft.com> wrote:
>
>I was looking through the included source code in the NT4 DDK... yes its
>old, but I guess it should be simpler to understand.

Maybe, but it's also buggier, and it doesn't include enhancements to the
driver interface since then.

>In the file ddk\src\video\displays\mga\ENABLE.C it refers to
>IOCTL_VIDEO_MTZ_QUERY_HW_DATA.
>
>Where is the source code for this IOCTL? The source code given in the DDK
>doesn't even include the code that queries the video card?

The hardware interface is implemented in the miniport, not in the display
driver. The display driver sends those ioctls to the miniport.

>I would say the provided source code is incomplete.

Matrox contributed the source code for their display driver. They did not
contribute the source code for their miniport. Apparently, they felt the
miniport contained the parts they deemed as proprietary.

>As a challenge for myself, I tried to find the code that determines the
>amount of RAM on the video card. I couldn't find it.

It would be in the miniport, not the display driver.

>Why did they only provide some of the source code. Why did they leave out
>the code that queries / initializes the mga video card? Thats only like the
>most important part of the driver?

Depends on your point of view, I guess. In terms of time spent in the
driver, the display driver is called MUCH more than the miniport. The
miniport controls initialization, and after that it gets out of the way.
The miniport tends to be very hardware specific.
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

== 3 of 3 ==
Date: Sun, Aug 10 2008 6:32 pm
From: allenzhang


Yes, You should see it in the miniport, But it is incomplete, Only the ddi is
provided in NT4.DDK,
It should be dispatched in HwStartIO.


Best regards,
Allen


"tom1000000" wrote:

> Hello
>
> I was looking through the included source code in the NT4 DDK... yes its
> old, but I guess it should be simpler to understand.
>
> In the file ddk\src\video\displays\mga\ENABLE.C it refers to
> IOCTL_VIDEO_MTZ_QUERY_HW_DATA.
>
> Where is the source code for this IOCTL? The source code given in the DDK
> doesn't even include the code that queries the video card? I would say the
> provided source code is incomplete.
>
> As a challenge for myself, I tried to find the code that determines the
> amount of RAM on the video card. I couldn't find it.
>
> Why did they only provide some of the source code. Why did they leave out
> the code that queries / initializes the mga video card? Thats only like the
> most important part of the driver? I am not impressed.
>
> Thank you for your help.
>
>
>
> if (EngDeviceIoControl(ppdev->hDriver,
> IOCTL_VIDEO_MTX_QUERY_HW_DATA,
> NULL, // Input
> 0,
> &HwData, // Output
> sizeof(HW_DATA),
> &ReturnedDataLength))
>
>
>
>


==============================================================================
TOPIC: Installation of DDK 2003
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/d3279a7407b7d0d5?hl=en
==============================================================================

== 1 of 1 ==
Date: Sun, Aug 10 2008 11:06 am
From: "Maxim S. Shatskih"


> Can ddk 2003 be installed in my xp machine. Is it compatible....

Yes, but it is better to use WDK, which also can be installed on XP.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com


==============================================================================
TOPIC: Obtain user information from kernel mode.
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/ccea739d21881fd9?hl=en
==============================================================================

== 1 of 4 ==
Date: Sun, Aug 10 2008 11:09 am
From: "Maxim S. Shatskih"


> Use ZwOpenProcessToken then ZwQueryInformationToken to get the
>information.

Or, in MJ_CREATE path, use ->Parameters.Create.SecurityContext

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com

== 2 of 4 ==
Date: Sun, Aug 10 2008 11:07 am
From: "Maxim S. Shatskih"


> I am trying to obtain the current user login name and write it to a file.

Use SIDs instead.

Resolving SID to name for the domain environment requires RPC query to the
domain controller, which is too hard to do in kernel mode.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com

== 3 of 4 ==
Date: Sun, Aug 10 2008 6:47 pm
From: allenzhang


You can get it by GINA and then send it to kernel driver


Best regards,
Allen


"Maxim S. Shatskih" wrote:

> > I am trying to obtain the current user login name and write it to a file.
>
> Use SIDs instead.
>
> Resolving SID to name for the domain environment requires RPC query to the
> domain controller, which is too hard to do in kernel mode.
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> maxim@storagecraft.com
> http://www.storagecraft.com
>
>

== 4 of 4 ==
Date: Sun, Aug 10 2008 7:32 pm
From: "Maxim S. Shatskih"


I would only use usernames on the UI layer, not below the UI.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com

"allenzhang" <allenzhang@discussions.microsoft.com> wrote in message
news:FEE4541C-607B-4F05-84BA-704B5FE2B1AE@microsoft.com...
> You can get it by GINA and then send it to kernel driver
>
>
> Best regards,
> Allen
>
>
> "Maxim S. Shatskih" wrote:
>
> > > I am trying to obtain the current user login name and write it to a file.
> >
> > Use SIDs instead.
> >
> > Resolving SID to name for the domain environment requires RPC query to the
> > domain controller, which is too hard to do in kernel mode.
> >
> > --
> > Maxim Shatskih, Windows DDK MVP
> > StorageCraft Corporation
> > maxim@storagecraft.com
> > http://www.storagecraft.com
> >
> >


==============================================================================
TOPIC: What is FileSystem's IRP When deleting file
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/ae58b997930c3314?hl=en
==============================================================================

== 1 of 1 ==
Date: Sun, Aug 10 2008 11:29 am
From: "Maxim S. Shatskih"


> When Filesystem delete file,what IRP is occured?

MJ_CREATE with FILE_DELETE_ON_CLOSE

OR

MJ_SET_INFORMATION/FileDispositionInformation/DeleteOnClose == TRUE

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com


==============================================================================
TOPIC: reinstalls device when installed in different USB port.
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/ddf37e8a39ad20a5?hl=en
==============================================================================

== 1 of 1 ==
Date: Sun, Aug 10 2008 11:32 am
From: "Maxim S. Shatskih"


> happens for all the ports, but only once. Is there a simple fix in the
> install of the drivers to stop this?

Fix the device firmware to maintain the serial number in the USB descriptors
properly.

For now, you have no serial number.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com


==============================================================================
TOPIC: NDISUIO - some basic questions
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/8b1f429004ff8750?hl=en
==============================================================================

== 1 of 4 ==
Date: Sun, Aug 10 2008 11:42 am
From: "Maxim S. Shatskih"


> How does the NDISUIO driver bind to the WLAN miniport driver? Is it the case
> that when the WLAN miniport driver registers with NDIS by calling
> NdisRegisterAdapter, NDIS will tell NDISUIO to create a binding to the
> miniport?

Yes, same ProtocolBindAdapter call.

> When the miniport driver gets a packet and it indicates it to NDIS, who will
> NDIS send the packet to if multiple protocol drivers (say a IP protocol
> driver and the NDISUIO driver) are bound to the same miniport? Is there a
> chance that presence of the NDISUIO will impact the other protocol drivers
> who care about the 802.3/802.11 frames?

No, the packet is delivered to all protocols sequentially.

> Lastly, is marshalling handled by NDIS? So if an application passes a
> pointer to a buffer in its address space with a query_oid, does the miniport
> not have to worry about marshalling and it can just write to that pointer?

No, NDISUIO does this.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com

== 2 of 4 ==
Date: Sun, Aug 10 2008 1:55 pm
From: Gammaraman


Thanks, Maxim. I appreciate your help.

How does NDIS know that it should call ProtocolBindAdapter to setup a
binding between NDISUIO and the miniport adapter when the miniport does a
NdisRegisterAdapter?

NDISUIO may not have registered with NDIS at the time the miniport driver
registers with NDIS. Isn't this possible?


"Maxim S. Shatskih" wrote:

> > How does the NDISUIO driver bind to the WLAN miniport driver? Is it the case
> > that when the WLAN miniport driver registers with NDIS by calling
> > NdisRegisterAdapter, NDIS will tell NDISUIO to create a binding to the
> > miniport?
>
> Yes, same ProtocolBindAdapter call.
>
> > When the miniport driver gets a packet and it indicates it to NDIS, who will
> > NDIS send the packet to if multiple protocol drivers (say a IP protocol
> > driver and the NDISUIO driver) are bound to the same miniport? Is there a
> > chance that presence of the NDISUIO will impact the other protocol drivers
> > who care about the 802.3/802.11 frames?
>
> No, the packet is delivered to all protocols sequentially.
>
> > Lastly, is marshalling handled by NDIS? So if an application passes a
> > pointer to a buffer in its address space with a query_oid, does the miniport
> > not have to worry about marshalling and it can just write to that pointer?
>
> No, NDISUIO does this.
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> maxim@storagecraft.com
> http://www.storagecraft.com
>
>

== 3 of 4 ==
Date: Sun, Aug 10 2008 2:13 pm
From: "Maxim S. Shatskih"


> How does NDIS know that it should call ProtocolBindAdapter to setup a
> binding between NDISUIO and the miniport adapter when the miniport does a
> NdisRegisterAdapter?

Due to registry structures mentioning NDISUIO.

> NDISUIO may not have registered with NDIS at the time the miniport driver
> registers with NDIS. Isn't this possible?

In CE? hardly I think. It is embedded to the image.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com

== 4 of 4 ==
Date: Sun, Aug 10 2008 5:16 pm
From: Gammaraman


Thanks, Maxim. I appreciate your help.

Can you please elaborate on "registry structures mentioning NDISUIO"?

I found this snippet on MSDN

"The NDISUIO driver is installed as an NDIS protocol that is bound to all
devices installed with an Interfaces value in the registry of either ndis4 or
ndis5. When NDISUIO is loaded, NDIS calls ProtocolBindAdapter for all devices
it is configured to bind to"

So in the snippet below can you please tell me what should be added/modified
to make NDIS call ProtocolBindAdapter in NDISUIO? I mean where do I add the
required entry?

"
HKEY_LOCAL_MACHINE\Comm\<MiniportDriverName>]
"Group"="NDIS"
"ImagePatch"="<driver>.dll"
[HKEY_LOCAL_MACHINE\Comm\<AdapterInstanceName>\Parms]
"BusNumber"=dword:<busnumber>
"BusType"=dword:<bustype>
"

I found this other snippet on MSDN which seems to imply that the binding
between NDISUIO and the adapter is created in response to
IOCTL_NDISUIO_OPEN_DEVICE. This seems to contradict what is said above OR am
I reading this wrong?

"
The following function call shows the use of IOCTL_NDISUIO_OPEN_DEVICE to
create a binding with an NE20001 network device using the handle obtained
from CreateFile.

DeviceIoControl(
hAdapter,
IOCTL_NDISUIO_OPEN_DEVICE,
TEXT("NE20001"),
wcslen(TEXT("NE20001")) * sizeof(TCHAR),
NULL,
0,
&dwReturnedBytes,
NULL);
"

"Maxim S. Shatskih" wrote:

> > How does NDIS know that it should call ProtocolBindAdapter to setup a
> > binding between NDISUIO and the miniport adapter when the miniport does a
> > NdisRegisterAdapter?
>
> Due to registry structures mentioning NDISUIO.
>
> > NDISUIO may not have registered with NDIS at the time the miniport driver
> > registers with NDIS. Isn't this possible?
>
> In CE? hardly I think. It is embedded to the image.
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> maxim@storagecraft.com
> http://www.storagecraft.com
>
>


==============================================================================
TOPIC: Get List of INF-File and Drivers for Device,...
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/db42a1a0dccd778d?hl=en
==============================================================================

== 1 of 1 ==
Date: Sun, Aug 10 2008 1:29 pm
From: Kerem Gümrükcü


Hi,

how can i get a list of Inf-Files and Drivers that a
installed device needs to run with the SetupDi* or CM_*
Calls,...?

I could not find it by my self, which call is responsible for that,...

TIA

Regards

Kerem

--
-----------------------
Beste Grüsse / Best regards / Votre bien devoue
Kerem Gümrükcü
Latest Project: http://www.codeplex.com/restarts
Latest Open-Source Projects: http://entwicklung.junetz.de
-----------------------
"This reply is provided as is, without warranty express or implied."


==============================================================================
TOPIC: Need simple C# USB driver example - communicating with slow device
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/cd405bbde11c6427?hl=en
==============================================================================

== 1 of 2 ==
Date: Sun, Aug 10 2008 1:44 pm
From: Neal Ray Pov


I am new to C# and .Net and driver development, could someone direct me to a
simple C# example for communicating with a slow device via the USB interface?
The device is a real time stage light controller. Should I try to make it
a HID USB device? Is there someother diriver that already exists and that
would be appropriate that I could piggyback off of? Thanks, Neal

== 2 of 2 ==
Date: Sun, Aug 10 2008 3:42 pm
From: Tim Roberts


Neal Ray Pov <Neal Ray Pov@discussions.microsoft.com> wrote:
>
>I am new to C# and .Net and driver development, could someone direct me to a
>simple C# example for communicating with a slow device via the USB interface?
> The device is a real time stage light controller. Should I try to make it
>a HID USB device? Is there someother diriver that already exists and that
>would be appropriate that I could piggyback off of?

Drivers are not written in managed code. At least, not yet.

For a simple device, a HID interface can be appropriate, in part because
you don't need to write a driver. Your user-mode app can use the HID
library functions to get and send HID reports.

Alternatively, you could write a simple driver using WinUSB (in C++), then
access it from your C# app using ioctls.
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.


==============================================================================
TOPIC: Requirements or Restrictions using "Imaging Device" in Windows Driver
Manager
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/4c0a784155b7d547?hl=en
==============================================================================

== 1 of 1 ==
Date: Sun, Aug 10 2008 2:32 pm
From: Tim Roberts


David.C.Reaves@fcimg.com wrote:
>
>> If you really don't want it to be exposed in Scanners and Cameras, you can
>> choose to put it in Media class instead of Image class:...
>
>Our customer specifically requires us to use the Image class.

Customers very often do not understand what they want. It's the job of a
professional consultant to guide them into adjusting their expectations.

>> Doesn't matter; Windows will provide automatic WIA and TWAIN support, and
>> will actually allow applications to grab snapshots from the stream.
>
>Our driver package (a user mode DLL and the generic Cypress kernel
>mode driver CyUsb.sys) has a proprietary API used only by the customer.
>There are is no TWAIN support (nor streams available to other applications).

If the device is not available for other applications to use, then why
would you put it in a standard device class at all? The purpose of
standard device classes is to say "this device works just like other
devices in this class." Why not just create your own device class?

>> Did you really mean WHQL testing?
>
>Well, our main goals are to be USB-IF certified and to get the driver
>package signed so that we
>can perform a "silent" installation without the annoying "not signed"
>or "not Windows Logo..." dialog
>boxes appearing. We DO NOT need to be Windows Logo compliant.

You have several interesting conflicts in that paragraph. USB-IF testing
has nothing to do with drivers or package signing. It's just another logo
you can put on the box.

And to perform a silent installation, you DO need to be Windows logo
compliant.

>However, it seems that to get the packaged signed we need WHQL
>certification as well as a certificate from
>an entity like Verisign (which we have). Correct me if I am wrong,
>but this may not be as onerous as it once was:
>1. We can perform the WHQL testing in-house using the Driver Test
>Manager (DTM).
>2. We then email the results to Microsoft (for ~$250.00 !!!!).
>3. If the tests pass, we will be emailed the proper certificates to
>allow our package to be signed.
>
>If this is incorrect, please let me know!

That's more or less correct, yes.

>In addition, there is something called an "unclassified signature".
>Will this allow us to use the Image class without needing to support
>WIA/STI?

No. If you expect to qualify your hardware as an Image class device, then
it must behave like an Image class device. Your hardware is NOT a standard
Image class device, so advertising it in the Image class is flat out wrong.

If your device will not support any standard imaging/streaming APIs, then
you should put your device in a custom device class and submit it as an
unclassified device. That's really what it is: a miscellaneous device.
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.


==============================================================================
TOPIC: Unknown Device,...
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/c9be0a0124661aad?hl=en
==============================================================================

== 1 of 1 ==
Date: Sun, Aug 10 2008 2:35 pm
From: Tim Roberts


"David Craig" <drivers@nowhere.us> wrote:
>
>How that works is fairly undocumented. There are little registry entries
>created hither and yon and I suspect some variations between different
>versions of Windows and maybe even service packs. Find devices or take one
>of your own and change the VID/PID that won't match anything Windows uses in
>the inbox drivers.

Yes, that's why I asked about what resources he had available. We have a
number of miscellaneous EZ-USB and FX2 devices hanging around. It's
trivial to write a new VID/PID into their EEPROMs, thereby creating an
"unknown device".

However, it would also be possible to take the toaster bus sample from the
WDK, and modify it to create a set of PnP IDs that no one every heard of.
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.


==============================================================================
TOPIC: Windows PS printer driver
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/7d5f6e0e1d16405c?hl=en
==============================================================================

== 1 of 1 ==
Date: Sun, Aug 10 2008 3:25 pm
From: Tim Roberts


CJacobs <CJacobs@discussions.microsoft.com> wrote:
>
>This should be easy, but documentation on Windows printer driver functions is
>hard to find. In the printer properties, General Tab, there is a group box
>labeled "Paper available". I'm guessing this is to support Bi-directional
>communication with the printer and is intended to show all paper currently
>loaded in the printer trays. It always seems to have only one entry,
>"Letter", which I'm also assuming is just the default value when the printer
>/driver does not support Bi-di comm. Are my assumptions correct? Is there
>a way to statically expand that list to include all the sizes a printer
>supports even if the driver is not bi-directional?
>Does anyone know of documentation which describes, completely, Windows
>printer drivers?

This is described in the printer description file -- the *.ppd file. If
you are using a generic PostScript driver without specific support, there's
no way to ask the printer for this information. The driver has to know it.
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.


==============================================================================
TOPIC: How to USB Filter Driver ?
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/fb8b034183f0ef85?hl=en
==============================================================================

== 1 of 1 ==
Date: Sun, Aug 10 2008 7:53 pm
From: Zec


How to Usb Filter Driver?

I must be develop a USB Filter Driver.

But, I have no idea about this programming.

If you known this programming, let me know.

Website about develop the USB Filter Driver ?

or Open source code?

thank you.

sorry my English is bad.

==============================================================================

You received this message because you are subscribed to the Google Groups "microsoft.public.development.device.drivers"
group.

To post to this group, visit http://groups.google.com/group/microsoft.public.development.device.drivers?hl=en

To unsubscribe from this group, send email to microsoft.public.development.device.drivers+unsubscribe@googlegroups.com

To change the way you get mail from this group, visit:
http://groups.google.com/group/microsoft.public.development.device.drivers/subscribe?hl=en

To report abuse, send email explaining the problem to abuse@googlegroups.com

==============================================================================
Google Groups: http://groups.google.com?hl=en

No comments: