From: panyul on
hello,everybody!

I'm try to create a virtual COM driver.
when i applying the function COM_IOControl:
DWORD COM_IOControl(DWORD hOpenContext,DWORD dwCode,PBYTE pBufIn,DWORD
dwLenIn,PBYTE pBufOut,DWORD dwLenOut,PDWORD pdwActualOut)

i've received some values of dwCode parameter,like
0x1B0050 1769552
0x1B0054 1769556
0x1B003C 1769532
0x1B0048 1769544
0x1B0028 1769512
0x1B0044 1769540
but i don't know what these mean.

Can you help me ?
Thanks!


From: chris.aseltine on
On May 5, 12:31 am, "panyul" <pan_...(a)21cn.com> wrote:

> 0x1B0050 1769552
> 0x1B0054 1769556
> 0x1B003C 1769532
> 0x1B0048 1769544
> 0x1B0028 1769512
> 0x1B0044 1769540

Open ntddser.h. Take the last byte of each code (0x50, 0x54, 0x3C,
etc.) and convert to decimal, then divide by four. Then match it
against the list of serial IOCTLs in the file.
From: Maxim S. Shatskih on
I think this is about WinCE, and WinCE can have another IOCTL codes.

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

<chris.aseltine(a)gmail.com> wrote in message
news:fb843c94-86b4-47c7-96f2-90a6ae3ffab9(a)x35g2000hsb.googlegroups.com...
> On May 5, 12:31 am, "panyul" <pan_...(a)21cn.com> wrote:
>
> > 0x1B0050 1769552
> > 0x1B0054 1769556
> > 0x1B003C 1769532
> > 0x1B0048 1769544
> > 0x1B0028 1769512
> > 0x1B0044 1769540
>
> Open ntddser.h. Take the last byte of each code (0x50, 0x54, 0x3C,
> etc.) and convert to decimal, then divide by four. Then match it
> against the list of serial IOCTLs in the file.

From: panyul on
Thanks! I 've got it.
function = (dwCode & 0x3FFC) / 4; Then the value of function is defined in
serial IOCTLs

now i have another question, when ioctl code is IOCTL_SERIAL_SET_WAIT_MASK,
what should i do?

next is the steps in my opinion, are they right ? my driver is running in
WinCE.
1. save the event mask value;
2. use a thread to check the event completed or not;
3. if the event completed,then set the event to resume application. (how can
i set the event to resume application?)

Thanks for your answer!


"Maxim S. Shatskih" <maxim(a)storagecraft.com> ????
news:exk4tttrIHA.5068(a)TK2MSFTNGP02.phx.gbl...
> I think this is about WinCE, and WinCE can have another IOCTL codes.
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> maxim(a)storagecraft.com
> http://www.storagecraft.com
>
> <chris.aseltine(a)gmail.com> wrote in message
> news:fb843c94-86b4-47c7-96f2-90a6ae3ffab9(a)x35g2000hsb.googlegroups.com...
>> On May 5, 12:31 am, "panyul" <pan_...(a)21cn.com> wrote:
>>
>> > 0x1B0050 1769552
>> > 0x1B0054 1769556
>> > 0x1B003C 1769532
>> > 0x1B0048 1769544
>> > 0x1B0028 1769512
>> > 0x1B0044 1769540
>>
>> Open ntddser.h. Take the last byte of each code (0x50, 0x54, 0x3C,
>> etc.) and convert to decimal, then divide by four. Then match it
>> against the list of serial IOCTLs in the file.
>


From: chris.aseltine on
On May 8, 10:48 pm, "panyul" <pan_...(a)21cn.com> wrote:

> now i have another question, when ioctl code is IOCTL_SERIAL_SET_WAIT_MASK,
> what should i do?

Look at the serial sample in the WDK for an example. But basically,
there's only two things you need to do:

1) Set the wait mask that's given.

2) If there was an existing IOCTL_SERIAL_WAIT_ON_MASK pending in your
driver, complete it.

You don't do any other work here to handle this IOCTL. Later on,
you'll potentially complete IOCTL_SERIAL_WAIT_ON_MASK in a variety of
places and situations in your driver. When you complete the wait-on-
mask IOCTL later on, the application will "resume".