How to unload the device driver
Hi, I have question about unloading the driver. I am
writing a virtual network driver. However, I often have
problem to undisable or unload the virtual network
device. Whenever the device is disabled or unloaded, I
expect Windows will run HaltHandler routine. It does not
seem to happen on WinDbg when I have problem to disable or
unload the device. Any idea? Thanks in advance. Tag: USB OTG vs USB 1.1 Tag: 37383
driver wizard locks on update
When updating my WDM driver in Win2k (never tried other OSs) to a newer
compilation, the driver wizard invariably locks. All I see in the top left
corner of the wizard is "inf". I actually have to reset the computer after
that. If I don't access the device before updating my driver (i.e., do it
right after reboot) then it does not lock up. The driver is for a PCI64/X
device. What resource am I not releasing that would cause the driver wizard
to lock? Or is it not a resource issue? Thanks for any help. Tag: USB OTG vs USB 1.1 Tag: 37379
PCI64 DMA (master) read vs. write speed
Inasmuch as the hardware for my PCI64 (66MHz) device is nearly identical for
both reads and writes, what possible driver/OS issue would cause my
write-to-device speed to be slower than the read-from-device? I'm currently
seeing apx 170MB/s for reads from the device and 70MB/s for writes to the
device. I'm using the bus commands 1110 and 1111 in the hardware with no
scatter/gather. Do these speeds look reasonable? Thanks. Tag: USB OTG vs USB 1.1 Tag: 37378
Shared printer driver and DrvConvertDevmode
I'm having a problem with my monolithic, user mode
printer driver. The problem is: The driver is installed
on windows 2000 server or windows 2003 server and shared.
An XP client connects to it. When the user on the client
attempts to change printer properties, the changes are
not saved.
I think it is caused by a problem I am having handling
DrvConvertDevmode's CMD_DRIVER_DEFAULT. In the driver, I
attempt to save the devmode by doing a SetPrinter with a
PRINTER_INFO_2 structure. As soon as I call it, Windows
calls my driver's DrvConvertDevmode, with *pcbNeeded=0
and pdmOut=NULL. I fill in *pcbNeeded with the size of
my devmode and return FALSE. Windows immediately calls
me back, with *pcbNeeded=0 and pdmOut=NULL again.
I expect that windows should call me back the second time
with *pcbNeeded=<size of my devmode> and pdmOut=<pointer
to a devmode-sized piece of memory>.
Is there something that I am misunderstanding?
Thanks,
ScottR
--
Scott Robins
ScottRobins@nospam.usa.xerox.com.nospam Tag: USB OTG vs USB 1.1 Tag: 37374
BDA beginner question
Hi!
I'm new to driver development and started playing around a little bit
to earn some experience in these things.
My preferred first "target" is a rather complex digital tv card
(DVB-C) with a lot of integrated circuits based on the well known
SAA7146 chip.
I haven't any problems in controlling and accessing the components on
the board. The only problem is that I'm unsure how to encapsulate
everything in a BDA-driver for Windows XP.
I have the Windows XP SP1 ddk and I've also studied the Mauitune
(philtune) example but it's too heavily based on specific hardware so
I gave it up and started with a very interesting DVB-T project found
at sourceforge (http://sourceforge.net/projects/bdadev)
My only remaining question is:
Where to find information about which properties or functions to
export in order to make my DVBC-Tuner connect to the Microsoft DVBC
Network-Provider?
Someone else in this group said that it is extremely important to
expose (only) the correct properties and pin-descriptions so that the
Network Provider successfully identificates my driver as a
"compatible" one. Reading the bda-headers didn't help (me)...
Can somebody give me some hints on where to start looking?
Greetings,
Christoph Bisping Tag: USB OTG vs USB 1.1 Tag: 37367
Work around StreamClassFilterReenumerateStreams
I am working on a driver for a USB2 camera with the following hardware
characteristics:
1) The field size is 774x245
2) The camera can be programmed to output either interlaced (frame is
774x490) or progressive (frame is 774x245).
3) Also, the field height is programmable 1->245, the x start and xsize
are also programmable. Most importantly, the image is always vertically
centered at the bottom of the field (note there is no ystart parameter).
4) The frame period and integration period are also completely
programmable with only the following constraint: the pixel rate must be
less than 25Mhz, and the bit rate must be less than the USB2 ISO maximum
(192Mb/s). Notice that the frame rate is completely dependent on the
current format size.
The driver characteristics thus far:
1) Based on USBCAMD
2) Has custom property set to permit setting all the above parameters.
3) Has a ksproxy plugin to permit setting all the above parameters in a
COM compatible fashion.
4) Has a custom property page to permit setting all the above parameters
from graphedit/amcap.
5) Working with a fixed 640x480 format.
Now I want to implement all the nifty programmability. My problem is:
how do I represent this with regard to the StreamFormatsArray of the
HW_STREAM_INFORMATION? My original plan had been to write into the
KS_DATARANGE_XXX structure the currently programmed width/height/frame
rate options with the KS_VIDEO_STREAM_CONFIG_CAPS set such that there
was no other format option besides the one format.
The user would use either the custom property page or the COM interface
to set, for example, a new height. I would then issue a request to
renegotiate the format for the pin connection and dynamically create a
new KS_DATARANGE_XXX with the new settings. However, since I have now
discovered that StreamClassFilterReenumerateStreams (which I what I
think is needed for this renegotiation) is broken, I am not sure I can
do this any more.
Was this even a good plan to start with?
I really want to be able to use amcap/grapedit as a test interface for
the camera (so I don't have to maintain more code than the camera driver
for simple testing). Due to the programmability of the camera, it seems
crazy to try and set up KS_VIDEO_STREAM_CONFIG_CAPS to permit all the
possible combinations (in fact, I am not sure how I can force the image
to be at the bottom of the frame or how to handle the differences
between interlaced and progressive or the frame rate dependencies).
Moreover, it is not clear to me that graphedit would even give me *all*
the possibilities in the "Pin Properties:Stream Format:Output Size"
dropdown if I could get the KS_VIDEO_STREAM_CONFIG_CAPS set up correctly
(nor would I want the user to have to negotiate that list).
It would be alot more intuitive for the user to simply type in the
desired xsize/xstart, or ysize, in my custom property page and have the
output jump to that format. That way I could do all the parameter
validation (such as making sure the new bit rate does not exceed the
bounds) and issue sensible messages before trying to send it to the
camera.
I had considered forcing the KS_DATARANGE_XXX structure to always look
like it was 774x490 and then, based on the current settings of
interlace/progressive, xsize, etc. draw the actual camera output in the
right place - completely going behind the back of the
KS_VIDEO_STREAM_CONFIG_CAPS/bitmapinfo path to actually set those
parameters - and painting the rest of the image black. I suppose I
could do something similar for the frame rates as well.
Would that work? Is there at least a way to at least crop to the right
size bitmap?
I guess part of the trouble is it is not clear to me how much
information set in the SRB_GET_STREAM_INFO phase can be renegotiated
later during the SRB_GET_DATA_INTERSECTION phase of things. It looks
like I cannot make suggestions in SRB_GET_DATA_INTERSECTION, only
validate what the client wants to do (and thus if they don't pick what I
want, the connection will fail). If I could make suggestions, then I
could competely refill the PKSDATARANGE passed in the
STREAM_DATA_INTERSECT_INFO. But it looks like that data is "read only".
Any suggestions on solving this problem?
Thanks for any help.
Regards,
Tom Tag: USB OTG vs USB 1.1 Tag: 37366
How to set Product , Manufacturer Name.etc...... in HID description?
as Title,
I already read "Device Class Definition for Human Interface Devices
(HID)" spec.
and use "HID Description Tool" (dt.exe) to edit my HID-Description,
but i don't know how to add string of my Manufacturer Name , Product
Name.... etc....
where's detail and example to show how to add it!!
help me, pls!, Thanks!
Fish~
goldfish@ms5.url.com.tw Tag: USB OTG vs USB 1.1 Tag: 37364
conflict with Winsock2.h
If i use #include <winsock2.h> in my project driver and I
Build it under the build environment ! I get conflict with the< winbase.h>
and a legion of redifinition or unknow errors !
Help needed !
Thanks ! Tag: USB OTG vs USB 1.1 Tag: 37360
Mythical FailReasonString in XP?
KB 310123 says that if driver fails with code 10 and
"If the device has a "FailReasonString" value in its hardware key, that string is displayed as the error message. The
driver or enumerator places this registry string value there. If there is no "FailReasonString" in the hardware key, the
following generic error message is displayed ..."
I tried to deliberately fail a driver so that dev. manager displays code 10,
and added string value FailReasonString into the hardware key of the device.
Then opened dev. manager - it still displays the default message.
So is it just documentation left over from WinMe?
Regards
-- PA Tag: USB OTG vs USB 1.1 Tag: 37357
Printer Drivers: Update Driver from Server Properties on W2K
Hi,
I have a question regarding clicking on the "Update
Driver" in the Server Properties dialog box from the
Printers Folder under Windows 2000.
I have made two versions of the printer driver.
The older version is currently installed on the system. I
would like to update to the newer version. However, the
newer version have different filenames. When I try
updating the drivers, Windows pops up a dialog box asking
the user where to find some missing files. It seems to be
assuming that the newer version should have the same file
name as the older one.
Is this a known issue with the Update Driver option?
Is there no workaround for this problem? are there some
directives I need to set in the .inf?
Thanks,
Will Tag: USB OTG vs USB 1.1 Tag: 37337
Does Windows XP build-in usb storage driver support USB selective suspend?
Our usb storage device would support USB selective suspend.
It seems to need driver support.
Does Windows XP build-in usb storage driver support
USB selective suspend?
Besides, do other Windows platforms support USB selective suspend?
Best Regards
Jackal Huang Tag: USB OTG vs USB 1.1 Tag: 37334
DMTT_BITMAP
I am developing a printer for Windows 2000 using Unidrv
Currently, TrueType Fonts printing is supported with Download as Soft Fonts and Device Font substitution options
These are represented in the DEVMODE as 0x2 (DMTT_DOWNLOAD) and 0x3 (DMTT_SUBDEV)
I want to add 0x1 (DMTT_BITMAP) support. How will I do it
Any information is really appreciated
Thanks
alvin Tag: USB OTG vs USB 1.1 Tag: 37332
WDM Streaming minidriver problem
Hi all
I've constructed a WDM streaming minidriver that reads packets from USB
hardware.
These packets contain video
The video packets get reassembled into video frame and appear on a capture
pin and a preview pin.
This works just fine, and I have clean video on my PC.
I've add an still pin(Major type video; dub type RGB24) for capturing better
quality sill image.
On GraphEdit,
when I render the still pin, it connect to the still pin on the Video
Renderer just as I'd expect.
But when I play it, my PC is halted with blue screen.
My driver gets the SRB_READ_DATA stream request via the
StrMiniReceiveStreamDataPacket() function.
According to the DDK documentation,
pSrb->CommandData.DataBufferArray is supposed to point an array of
KSSTREAM_HEADERs.
pSrb->NumberOfBuffers is supposed to indicate how many such headers there
are in the array
(in my case, NumberOfBuffers is 1).
So I look inside the KSSTREAM_HEADER supplied, but FrameExtent == 1, I
cann't believe that it is right.
Also according to the DDK documentation, FrameExtent specify the size of
Frame.
In Captue and Preview case, FrameExtent has suitable value for a frame.
But in Still case, It's wrong.
I cann't understand why that variable has 1.
Am I doing something wrong?
PLS, any comment or advices for me.
Thanks
-- Jeon, Seung-Chul Tag: USB OTG vs USB 1.1 Tag: 37331
WPA and ZWC
I have added all required OIDs to convince ZWC that my 802.11 adapter is
WPA-capable. Now ZWC allows me to select WPA and WPA-PSK as authentication
options, and WEP, TKIP, and AES as encryption.
Upon associating to a WPA AP, the access point sends EAPOL-Key packet, which
I indicate to NDIS. ZWC keeps querying OID_802_11_ASSOCIATION_INFORMATION,
but it doesn't set OID_802_11_ADD_KEY and no ethernet frames are being sent
from the NDIS to my miniport.
Where should I look? Unfortunately debug version of WPA ZWC is not
available, so I am stuck. Tag: USB OTG vs USB 1.1 Tag: 37330
device manager doesnot appear
My application(app1.exe)which talks to virtual COM port(USB virtual
COM driver by FTDI Ltd) has some problem. Driver works fine.
My application terminated abnormally.
I couldnot open the Device manager from then. When I try to open
device manager, a mmc.exe appears in Task manager, but I dont see it
in displayed.
What was the problem. I assume, application however corrupt it is,
cannot cause device manager to stop appearing. I didnot understand
what can stop device manager from appearing.
Thanks. Tag: USB OTG vs USB 1.1 Tag: 37329
A question on Passthru IM driver
Hi,
I was going through the code of Passthru sample IM driver. I am not
sure why the following has been done.
(e.g., in MPSendPackets. And Similarly for PRECV_RSVD)
-----------------------------
.
.
.
PSEND_RSVD SendRsvd;
SendRsvd = (PSEND_RSVD)(MyPacket->ProtocolReserved);
SendRsvd->OriginalPkt = Packet;
.
.
.
-----------------------------
They are trying to store a pointer value "Packet" (4 bytes) in an
array of UCHAR[1] "MyPacket->ProtocolReserved". This would work as
long as the size of NDIS_PACKET is 3 bytes short of a 4-byte boundary
(NDIS_PACKET comes out to be 57 bytes!).
I am wondering why it is being done this way at all?
Thanks,
Sav Tag: USB OTG vs USB 1.1 Tag: 37327
Audio Midi In
Hello,
This is an audio/midi driver related problem. I hope
somebody can help. I try to write a simple midi-in driver
where data is transfered from a device to some midi
software application. Therefore i took the DDK dmusUART
sample as a basis and modified it to my needs. Now the
driver is just for input. By orienting at the sample and
the DDK documentation all pin declarations and property
request handlers should be correct. The device shows up
correctly in the audio device listings and can be
selected as input. But when i try to connect the IMXF is
created, initialized and the output connects and
immediately disconnects. After that the IMFX is
destroyed. This happens about 28 times and no data is
transfered. After that the application beliefs it ist
connected but the driver shows no singns of life anymore
and does not react on any further connection attempts.
Can anyone help? Thanks.
Best regards,
Timo Tag: USB OTG vs USB 1.1 Tag: 37313
Longhorn QoS from kernel-mode?
Hi everyone,
does anyone know if it will be possible to do QoS-stuff for network-
connections from within kernel-mode?
Tobias Tag: USB OTG vs USB 1.1 Tag: 37312
Memory mapping on Windows Server 2003
Hi All,
I have a very strange problem that is showing up on Windows Server
2003. This problem can't be reproduced on NT4, 2000, or XP.
I have a small driver that maps an area of the paged pool into the
user address space of a process, as follows (error checking code
removed for clarity):
// Allocate the memory for the sharead buffer
pKernel = ExAllocatePool( PagedPool, dwMemSize );
// Next we allocate an MDL to describe the memory we will map
pMdl = IoAllocateMdl( pKernel, dwMemSize, FALSE, FALSE, NULL );
// This returns Void, but raises an exception, on error
MmProbeAndLockPages( pMdl, KernelMode, IoWriteAccess );
// Map the locked pages into User mode
pUser = MmMapLockedPagesSpecifyCache( pMdl, UserMode, MmCached,
NULL, FALSE,
NormalPagePriority );
And to free the shared buffer we have another function:
// Unmap the kernel buffer from User space
MmUnmapLockedPages( pUser, pMdl );
// Unlock the kernel buffer from memory
MmUnlockPages( pMdl );
// Free the MDL describing the memory
IoFreeMdl( pMdl );
Data gets written into the shared buffer in kernel mode, and is read
out in a user mode thread. Access to the buffer is protected by shared
synch. objects.
However, under high memory and disk loads, Windows 2003 is crashing in
very strange ways. Usually, it bugchecks in a system thread which is
trimming the working set of a process with:
PFN_LIST_CORRUPT (4e)
Typically caused by drivers passing bad memory descriptor lists (ie:
calling
MmUnlockPages twice with the same list, etc). If a kernel debugger is
available get the stack trace.
Arguments:
Arg1: 00000099, A PTE or PFN is corrupt
Arg2: 00000112, page frame number
Arg3: 00000000, current page state
Arg4: 00000000, 0
I can assure you that the unmap function is not being called before
the machine crashes.
I've also seem other strange crashes where whole pages of the kernel
virtual memory space seem to be being replaced with garbage. E.g. a
call to IoCallDriver was failing because the 4k page had been replaced
by 0x4141414141...
Another time the EPROCESS page was replaced with 0xcdcdcdcd...
Does anyone have any suggestions as to why this might be happening?
It's reproducable on several 2003 machines.
More importantly, how can I track down the source of the problem?
Driver verifier doesn't show up any problems...
Please help me!
Best Regards,
Otto Tag: USB OTG vs USB 1.1 Tag: 37309
MY HID Mouse, how to "write data" to my HID mouse form Win32 AP ?
Hello,
I write a driver (XP driver) for my HID mouse,
my HID mouse need some data to proccess some things,
=====================================================================
because my HID mouse have some LED and memory,
i hope i can control it and write data to the memory of my HID mouse,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
=====================================================================
when my user-mode win32 APPLICATION , CreateFile to open my HID mouse
device, got this message "Access Denied!"..
anyone know some way to solve it!?
please help me!.......
FISH
goldfish@ms5.url.com.tw Tag: USB OTG vs USB 1.1 Tag: 37308
NDIS Intermediate Driver (NDISPROT) extended with IOCTL_REBIND_ADAPTER
I'am developing an application which requires to dynamically update
the TCP/IP protocol settings for a WLAN card, such as DHCP
enabled/disabled, APIPA enabled/disabled, setting IP address, setting
Subnetmask, etc. The program shall run under XP SP1.
I came to the conclusion that I need to provide my own
IntermediateDriver, such as NDISUIO and extend it by my private IOCTL
to rebind an adapter. I've been using the NDISPROT DDK example as a
starting point. (NDISPROT and NDISUIO are basically the same, there is
only very little difference. NDISPROT comes with Server2003 DDK,
whereas NDISUIO comes with XP DDK). Anyway, the NDISPROT IM driver is
running on my XP/SP1 system already.
In nuiouser.h I have defined:
#define IOCTL_NDISPROT_REBIND_ADAPTER \
_NDISPROT_CTL_CODE(0x206,METHOD_BUFFERED,FILE_READ_ACCESS |
FILE_WRITE_ACCESS)
The plan is to call this IOCTL from the application, which also works
already. Now, I stuck a bit, as I dont know much enough about the
inner working of NDIS. My initial idea was, to invoke:
1) ProtocolUnbindAdapter, and
2) ProtocolBindAdapter
from within the 'NdisProtIoControl' function (equals
'NdisuioIoControl' in NDISUIO sample) in ntdisp.c file.
Unfortunatly, I dont know what paramters to use when calling them.
VOID ProtocolBindAdapter(
OUT PNDIS_STATUS Status,
IN NDIS_HANDLE BindContext, //what shall I use here???
IN PNDIS_STRING DeviceName, //what shall I use here???
IN PVOID SystemSpecific1, //what shall I use here???
IN PVOID SystemSpecific2
);
VOID ProtocolUnbindAdapter(
OUT PNDIS_STATUS Status,
IN NDIS_HANDLE ProtocolBindingContext, //what shall I use
here???
IN NDIS_HANDLE UnbindContext //what shall I use here???
);
Can anyone help me on my problem? Does anyone has some example, on how
they have done a similar solution? (PS: WINCE already does have a
REBIND IOCTL, but I doubt that it helps for XP system...)
I'm a still on the right track for dynamically re-initailising the IP,
DHCP stuff? Tag: USB OTG vs USB 1.1 Tag: 37303
Need help with I/O request for disk drivers
Can someone show me how to setup and use the DeviceIoControl
IOCTL_DISK_FORMAT_TRACKS_EX
Operation
This IOCTL is similar to IOCTL_DISK_FORMAT_TRACKS except that it allows the
caller to specify several more parameters. The additional extended
parameters are the format gap length, the number of sectors per track, and
an array whose element size is equal to the number of sectors per track.
This array represents the track layout.
I'm particularly interested in the additional extended parameters, format
gap length and the track layout array.
Any help will be appreciated.
John
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =----- Tag: USB OTG vs USB 1.1 Tag: 37301
Communicate with printer driver.
Hello!
I have a program that prints some documents and I want to add markups to
them. I don't have a source so I can't modify the document :(. Is it
possible to modify the printer driver or maybe try to communicate with it.
Any suggestions how to solve it?
Thanks!
adas Tag: USB OTG vs USB 1.1 Tag: 37300
Resources assignment
Hi!,
I have a couple of questions:
The device for which I'm writting a wdm driver has I/O
ports, memory ranges, DMA and IRQs. So I've been writing
a basic driver (just to read a port).
1. My first doubt is: If I only write in my start device
routine that I have I/O port resources, could be a
problem? I mean by just ignoring the other resorces, could
a problem arise?
2. When the PnP manager sends me a filter resource
requirements irp, does that mean that there is no
information about the resources "inside" my device? Or is
because of my driver??
Thanx Tag: USB OTG vs USB 1.1 Tag: 37294
USB SCard Reader Driver
Hello !
I need to write a USB SCard Reader driver.
DDK provides an example of USB generic device and an
example of PCMCIA SCard Reader.
Is it possible to somehow merge them ?
Or may be there is another way to build a USB SCard Reader
driver without developing it from the scratch ? (or bying
from MS programmers who sell such products independently
from MS)
Thank you ! Tag: USB OTG vs USB 1.1 Tag: 37286
How to get lower stack device object in miniport driver?
I am writing a miniport driver for audio.
I want to request to lower stack device object.
But, i have only PDO that come down in AddDevice().
How to get lower stack device object in miniport driver?
thanks,
Jogerse Tag: USB OTG vs USB 1.1 Tag: 37281
Createfile failed(access denied) when logged on as limited user
I have written a NDIS IM device driver and I used IOCTRL
to communicate between my user mode app and the device
driver. It works fine when logged on as Administrator but
createfile fails (access denied) when logged on as
limited user. Anyone know how to get around this?
I called create file with the following attributes.
CreateFile
(TEXT"\\\\.\\MyDriver"),
GENERIC_WRITE | GENERIC_READ, 0, 0,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL |FILE_FLAG_OVERLAPPED, 0);
Is this to do with how I installed the driver or the way
I called createfile? Tag: USB OTG vs USB 1.1 Tag: 37279
Print Optimization
Could anyone explain what is really the purpose of the Print Optimization feature in the Advanced tab of the printer property page?
What does Print Optimization feature do?
Thanks.
alvin Tag: USB OTG vs USB 1.1 Tag: 37278
802.1x - Setting the Dynamic WEP Keys
Hi,
I am writing an application that allows a user to connect to 802.1x
access points. I connect to the access point, and use EAPOL to get
both the broadcast and unicast keys. I try setting the keys using
OID_802_11_ADD_WEP, but I don't get a valid connection (i.e a valid
DHCP connection).
Here is some pseudocode of what I am doing:
if (!SetInfrastructureMode(Ndis802_11Infrastructure))
return FALSE;
if (!SetAuthenticationMode(Ndis802_11AuthModeOpen))
return FALSE;
if (!SetEncryptionStatus(Ndis802_11Encryption1Enabled))
return FALSE;
if(!SetSSID(strSSID))
return FALSE;
// do EAPOL code, to get WEP Keys
if (!SetWEPKey(broadcastkey, keyLength, keyIndex,bBroadCast /*= TRUE
*/))
return FALSE;
if (!SetWEPKey(unicastkey, keyLength, keyIndex,bBroadCast /*=
FALSE*/))
return FALSE;
The keys get set correctly, but I do not get a valid DHCP address. I
found some Microsoft documentation, that basically said that unicast
keys are not supported yet. Is this true? It also set that only one
key can be set. The last key set is the active one. So I have tried
only setting one of the keys, and it still does not work. Also below
is a sample of how I set the WEP key.
PNDIS_802_11_WEP pWEP;
UCHAR * pOidData = NULL;
int nLength;
nLength = keyLength + 12;
// D311 has a problem if the data is not at least 16 bytes long and
has a 4 byte boundary
if (nLength % 4)
nLength += (4 - (nLength % 4));
pOidData = new UCHAR[nLength];
memset(pOidData,0,nLength);
pWEP = (PNDIS_802_11_WEP) pOidData;
pWEP->Length = nLength; // sizeof NIDS_802_11_WEP structure, this
includes length of network key
if (bBroadcast)
pWEP->KeyIndex = keyIndex | 0x80000000; // we set bit 31 to specify
global key
else
pWEP->KeyIndex = keyIndex;
pWEP->KeyLength = keyLength;
memcpy(pWEP->KeyMaterial,pKey,keyLength);
If someone could tell me what I am missing or what I am doing wrong,
it would be greatly appreciated.
Thanks
Shane Tag: USB OTG vs USB 1.1 Tag: 37272
Crypto API calls from inside a filter driver
I have a client that would like me to write a serial device filter driver
and use the Crypto API calls to encrypt/decrypt the data stream. Is it
legal/safe to call those routines from inside a filter driver?
Dave Tag: USB OTG vs USB 1.1 Tag: 37261
bulkusb, isousb, selsusp
Hi All,
There is the Pending I/O queue called NewRequestsQueue,
and a procedure QueueRequest intended to enqueue requests while the Pending
I/O queue is in HoldRequests state, and a procedure ProcessQueuedRequests
intended to deplete the queue.
The ProcessQueuedRequests is called in appropriate places, but the
QueueRequest is never called, why?
TIA
Andrew Tag: USB OTG vs USB 1.1 Tag: 37260
Sending a WM_ message from WDM to app
Hi all!
How can I send a windows message to an application from a WDM driver?
Several years ago I wrote a VxD driver for an ISA device used in our
equipment. Through an IOCTL message, our application would pass its handle
and the VxD would store it. When the VxD had something ready for us it
would use the handle to send the app a windows message at which time we
might have to do some sort of IOCTL to the driver or more commonly read a
message in dualported memory. Good or bad programming practice it worked
quite well. We are migrating to XPe and I'm trying to translate this
possibly dubious practice from VxD to WDM. I have all the tools. XP DDK,
Walter Oneys book and Compuware Driverworks. I used VtoolsD for the last
driver.
Thanks in advance,
Dave
dskok@LOVELYSPAMlehighdim.com take out LOVELY and SPAM Tag: USB OTG vs USB 1.1 Tag: 37258
how to deal with packet in calling NdisMIndicateReceivePacket
I am trying to write a virtual network drive which the
incoming traffic is from DeviceIoControl routines instead
of a "real" NIC. Whenever the driver get any incoming
traffic, it should call NdisMIndicateReceivePacket() to
notify the protocol driver that a packet is ready.
However, one of the input is (PPNDIS_PACKET)
ReceivePackets. It turns out that there should be an
array of packets. Here are my questions:
1) How often should I call NdisMIndicateReceivePacket()?
2) How should I deal with the packet array allocation?
Should I allocate packet and associated buffer space in
initialization? or whenever I need?
Thanks!! Tag: USB OTG vs USB 1.1 Tag: 37252
IoQueueWorkItem on Win98 ?!?!?
Hi,
I'm used to use the same P&P driver on Win2k\Win XP, and
Win98. After adding the "IoQueueWorkItem" routine, the
driver cant be loaded on Win98. I read somewhere that it
doesn't supported on Win98.
Is it true ?
Is there any new/better routine that i can use for all
WDM OS's ?
I'm trying to avoid re-compiling the driver for each OS.
Thanks a lot
mich Tag: USB OTG vs USB 1.1 Tag: 37246
Virtual Printer Driver
Hi,
I have to develop a virtual printer driver which can do the following stuff:
- generating a bitmap( color/monochrome)
- generation a textfile, in which all DrvTextOut string are stored
- the complete strings should be parsed and replaced, if needed( special
sequences )
- the replaced string should be updated in the bitmap
I have tested both the msplotter sample in which I can easily acess the text
in DrvTextOut
and the oemdll sample in with which I can generate a bitmap.
But the parsing and manipulation of matched string in the bitmap makes me
headaches.
Can a unidriver plugin do all the things?
Any hints, tips are welcome.
Regards,
Harald Tag: USB OTG vs USB 1.1 Tag: 37245
How to tell GDI no glyph index support
Does anybody know of a GDIINFO cap or any other way to
tell GDI that a printer driver does *not* support glyph
indeces?
We would like to ensure that only character codes make
their way to DrvTextOut.
thx,
Andrei Tag: USB OTG vs USB 1.1 Tag: 37244
SetupDiGetDeviceRegistryProperty
The MSDN online suggests in "Driver Information in the
Registry"
http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/install/hh/install/install-over_6e3r.asp
That IoGetDeviceProperty() and
SetupDiGetDeviceRegistryProperty() be used instead of
accessing the registry directly. I'm interested in
getting the resources used by drivers. I realize that
Device Manager reports these resources and so they are
available.
I tried using IoGetDeviceProperty, but blue screens with
PNP_DETECTED_FATAL_ERROR 0x02 got in my way, thus I'm
looking at SetupDiGetDeviceRegistryProperty(). However,
the DevicePropertyBootConfigurationTranslated is not
apparently available from SetupDiGetDeviceRegistryProperty
(). The SPDRP_DEVICE_POWER_DATA doesn't provide the
resources, and I'm looking at SPDRP_DRIVER which provides
the Driver Key in the registry (Software Key). It also
refers back to "Driver Information in the Registry."
Can I get the resources for drivers without looking in the
registry? Do I have to read the ...\Control\AllocConfig
which is a REG_RESOURCE_LIST? And if so, what is the
format of that binary data, a CM_RESOURCE_LIST type of
thing?
Thanks,
John Muczynski
Bauer Controls
Ann Arbor, MI Tag: USB OTG vs USB 1.1 Tag: 37242
Audio Midi Driver
Hello,
This is an audio/midi driver related problem. I hope
somebody can help. I try to write a simple midi-in driver
where data is transfered from a device to some midi
software application. Therefore i took the DDK dmusUART
sample as a basis and modified it to my needs. Now the
driver is just for input. By orienting at the sample and
the DDK documentation all pin declarations and property
request handlers should be correct. The device shows up
correctly in the audio device listings and can be
selected as input. But when i try to connect the IMXF is
created, initialized and the output connects and
immediately disconnects. After that the IMFX is
destroyed. This happens about 28 times and no data is
transfered. After that the application beliefs it ist
connected but the driver shows no singns of life anymore
and does not react on any further connection attempts.
Can anyone help? Thanks.
Best regards,
Timo Tag: USB OTG vs USB 1.1 Tag: 37237
Printer Driver - Unidriver related
This GPD code given below is taken from the ddk sample -
hplj5.gpd
*PrintableArea: PAIR(9600, 12720)
*PrintableOrigin: PAIR(300, 220)
*CursorOrigin: PAIR(300, 220)
*Command: CmdSelect
{
*Order: DOC_SETUP.12
*Cmd: "<1B>&l2a8c1E<1B>*p0x0Y<1B>*c0t5760x7656Y"
}
my questions are:
1. What commands does *PrintableArea, *PrintableOrigin and
*CursorOrigin insert into the PCL stream ? What is this
used for ? I could not find much documentation about this
in the DDK help also.
2. The printable area length according to calculation
should have been 12760 (13200 - 220 - 220), but here it is
only 12720 , where did the 40 units go? I have seen this
difference in other In-box GPD's
3.I had created a GPD for my printer, letter paper size
portrait mode values are as follows,
*PrintableArea:PAIR(9800, 12800)
*PrintableOrigin: PAIR(200, 200)
*CursorOrigin: PAIR(200, 200)
*Command: CmdSelect
{
*Order: DOC_SETUP.21
*Cmd: "<1B>&l2a8c1E"
}
When tested with WHQL tool the rectangle did not have the
right side. When I changed the *PrintableArea to
*PrintableArea:PAIR(9799, 12800) it started working fine.
These measures are in terms of 1/1200 of an inch, how did
that 1 unit make the difference ?
-Thanks in advance Tag: USB OTG vs USB 1.1 Tag: 37236
When can I read registry(HKLM\SOFTWARE) at booting?
In driver, it always fails to read registry key of
SOFTWARE hive at booting, is there any way to determine
when to read it?
Thanks in advance!
-Polo Tag: USB OTG vs USB 1.1 Tag: 37234
About USB selective suspend support
I would support USB selective suspend feature for my usb
storage device. What component need to be modified to
support this feature? Can all Windows platforms support USB
selective suspend?
The usb storage device use the build-in driver on Windows XP.
Does the build-in usb storage driver support USB selective
suspend feature?
Best Regards
Jackal Huang Tag: USB OTG vs USB 1.1 Tag: 37233
FW: Only dmDuplex member(PS Driver) cannot be updated on reason of PROPSHEETUI_REASON_DESTROY
***FW from microsoft.public.ddk.win2000.printer.video
Hi All
I am developing a PostScript printer driver by modifying WindowsXP ddk
samples "Windows 2000 OEM UI Customization Sample (PS)", and encounterring
a problem on updating dmDuplex member of public DEVMODE.
It's very weird:
1. On original sample, system standard "Layout" and "Color" sheet is
hidden, if I don't hide the 2 sheets(directly return E_NOTIMPL in IOemUI2::HideStandardUI()),
then dmDuplex can be updated normally.
2. The problem is not reproduced on updating other public DEVMODE
members, such as dmOrientation, dmCopies, dmPaperSize and dmScale.
I was not using CPSUI to make my plugin property sheets, so I cannot use
DrvUpdateUISetting() to update user settings. Below is the testing code
I am using to update public and private DEVMODE under reason of
PROPSHEETUI_REASON_DESTROY on hrOEMDocumentPropertySheets(PPROPSHEETUI_INFO
pPSUIInfo, ...):
...
POEMUIPSPARAM pOEMUIParam;
PDEVMODE pTestDevmode;
pOEMUIParam = (POEMUIPSPARAM)pPSUIInfo->lParamInit;
pTestDevmode = (PDEVMODE) pOEMUIParam->pPublicDM;
//check value of pTestDevmode->dmDuplex at here: it is 1.
pTestDevmode->dmDuplex = 2;
pPSUIInfo->pfnComPropSheet(pPSUIInfo->hComPropSheet,
CPSFUNC_SET_RESULT,
(LPARAM)NULL,
(LPARAM)CPSUI_OK);
//check value of pTestDevmode->dmDuplex at here:
// it is 1 if Layout and Color sheet is hidden. <-- Problem!
// it is 2 if Layout and Color sheet is not hidden. <-- Expected
...
I will be appreciated if anyone can give me any advice on this. Tag: USB OTG vs USB 1.1 Tag: 37231
Using KeSetTimerEx
Hello All,
Basically my requirement is to perform some action after every fixed
time interval. I therefore create a "synchronization" type timer and
using KeSetTimerEx () i schedule the timer. But it looks like the
timer is not called at the time interval i need it to invoke the timer
callback routine. I check this using KeQuerySystemTime (). Following
are the steps:
1) KeInitializeTimerEx (&(pDevExt->myTimer), SynchronizationTimer);
KeInitializeDpc (&(pDevExt->myTimerDpc), myTimerRoutine, pKsDev);
2) timerDelay.QuadPart = -180000; // 18 ms
KeSetTimerEx (&(pDevExt->myTimer), timerDelay, 18,
&(pDevExt->myTimerDpc));
But what i observed to my dismay is that my myTimerRoutine () was
called at approximate intervals like:
15.625 ms
15.625 ms
15.625 ms
15.625 ms
31.250 ms
and so on as the pattern keeps repeating....
Any reason why this is happenning? Is it possible to make the timer
routine be called at the exact timer interval?
Also, i used KeSetTimerEx (&(pDevExt->myTimer), timerDelay,
&(pDevExt->myTimerDpc)); but the timer routine got invoked only once!
Is there something iam missing here? Can someone throw some light on
this?
Regards,
Hari. Tag: USB OTG vs USB 1.1 Tag: 37230
Help required on Surprise Removal in XP (NDIS5.1) when writing NDIS-WDM
Hello,
I am writing a NDIS-WDM (USB ) driver for NDIS5.1 (XP). I used the
sample from Eliyas.
I saw the mailing lists and set the NDIS_ATTRIBUTE_SURPRISE_REMOVAL_OK
bit in the call to NdisMSetAttributesEx from MiniportInitialize
function. And I implemented the additional MiniportPnPEventNotify
function also.
When I plug-in the cable, Windows loads my driver. But the "System Tray"
icon for "Safely Remove Hardware" appears. When I remove the cable, I
get a call to my PnPEventNotify function with SurpriseRemoved event set.
There is no pop-up error message as per XP standards.
But, I was under the understanding that if the SURPRISE_REMOVAL_OK bit
is set, even the "tray icon" does not appear.
Please help me in making sure that my understanding is right. If I am
wrong, what have I done wrong in the driver that this is not working?
Any pointers or any kind of help is greatly appreciated.
Thanks in advance for the great help.
Best Regards,
GNRaj Tag: USB OTG vs USB 1.1 Tag: 37226
Help required on Surprise Removal in XP (NDIS5.1) when writing NDIS-WDM
Hello,
I am writing a NDIS-WDM (USB ) driver for NDIS5.1 (XP). I used the
sample from Eliyas.
I saw the mailing lists and set the NDIS_ATTRIBUTE_SURPRISE_REMOVAL_OK
bit in the call to NdisMSetAttributesEx from MiniportInitialize
function. And I implemented the additional MiniportPnPEventNotify
function also.
When I plug-in the cable, Windows loads my driver. But the "System Tray"
icon for "Safely Remove Hardware" appears. When I remove the cable, I
get a call to my PnPEventNotify function with SurpriseRemoved event set.
There is no pop-up error message as per XP standards.
But, I was under the understanding that if the SURPRISE_REMOVAL_OK bit
is set, even the "tray icon" does not appear.
Please help me in making sure that my understanding is right. If I am
wrong, what have I done wrong in the driver that this is not working?
Any pointers or any kind of help is greatly appreciated.
Thanks in advance for the great help.
Best Regards,
GNRaj Tag: USB OTG vs USB 1.1 Tag: 37225
Aysnch events
Hi,
I am having problems in generating Asynchronous events from kernel mode to
user mode.I am sending a large data to the device driver from the user mode
application and i want the deviceiocontrol to return immediately as soon as
it places the request.At present what i am doing is once i get the request
in the dispatch routine the status is set to STATUS_PENDING and complete the
IRP in the DPC routine of the ISR.When i do this the deviceiocontrol is not
returning immediately.please help me out.
thanks
sai Tag: USB OTG vs USB 1.1 Tag: 37224
What's SetupDi equivalent to CM_Query_Remove_SubTree?
I would query whether the usb device can be safely removed.
CM_Query_Remove_SubTree should be able to do this.
DDK document suggests use SetupDi API instead.
What's SetupDi equivalent to CM_Query_Remove_SubTree?
DDK document notes that use SetupDi function for many CM
functions. I think it should tell us what's the SetupDi equivalent
to those CM functions.
Best Regards
Jackal Huang Tag: USB OTG vs USB 1.1 Tag: 37220
How to perform safe remove operation on Windows ME?
The user can safely remove the usb device via system tray icon
on Windows ME. I would write a program to perform the safely
remove operation.
CM_Request_Device_Eject can perform safe remove operation
on Windows 2000/XP. But it is not supported on Windows ME.
How does the program to do this on Wondows ME?
Best Regards
Jackal Huang Tag: USB OTG vs USB 1.1 Tag: 37216
dmTTOption
I have a printer driver for Windows 2000 using Unidrv.
I made an application to modify the values of the DEVMODE of the driver using SetPrinter and GetPrinter.
When I set the dmTTOption to DMTT_BITMAP, the driver cannot support Device Fonts anymore.
What I understand, dmTTOption specifies only how True Type Fonts will be printed.
Why this phenomenon occurs?
Could anyone give some explanation or some written materials explaning this behavior?
Thanks.
alvin Tag: USB OTG vs USB 1.1 Tag: 37214
I just started reading about USB On The Go.
It doesn't look like it will require a new driver but perhaps
the USB experts here know more?