pcmcia in xp
I've got a custom pcmcia R2 16bit card that has been used
in 95/98 previously. It is PCMCIA 2.1 compliant and looks
mostly like a flash card. Its tuples are incomplete with
respect to its required resource but everything else is
there (CISTPL_DEVICE, CISTPL_JEDEC_C, CISTPL_DEVICE_GEO,
CISTPL_VERS_1, CISTPL_FUNCID, CISTPL_CONFIG (.
Now, our customer wants to upgrade to xp. The driver
itself is not my problem. When I insert the card into my
xp machine, the machine hangs ... hard. CTRL-ALT-DEL
doesn't work, I can't break into Soft-Ice ... nothing,
dead as a door nail. Unfortunately, my hardware guy is on
vacation for another week and a half, and I'd rather not
wait until he gets back. Has anyone seen anything like
this with ANY pcmcia card? Tag: Apply this package from MS Tag: 33344
alid@microsoft.com
Hi!
Did you received my last two letters in m.p.d.drivers? Its about
NdisMIndicateStatus filtering in IM drivers - I did tests with Mux and
had posted the result.
---
P.s. remove PI number from "reply-to" while answering... Tag: Apply this package from MS Tag: 33342
OS Initial Memory Allocation
I have two identical machines. One is running W2K and the
other is running 2003.
On the W2K machine, there is 512MB of memory; of that
60632 KB is allocated to Kernel Memory. On the 2003
machine, there is 512MB, only 17,884KB gets allocated to
kernel memory.
Why is this and is there a way to change the allocation? Tag: Apply this package from MS Tag: 33340
Accessing hardware from user-mode ?
Hi all,
Is it safe to access the hardware device registers from a user-mode
application ?
Is it the good way to develop a device driver and to avoid the complexity of
a kernel implementation ?
Thanks,
Ronan. Tag: Apply this package from MS Tag: 33338
accessing hardware in user-mode
Hi all,
Is it safe to access the hardware device registers from a user-mode
application ?
Is it the good way to develop a device driver and to avoid the complexity of
a kernel implementation ?
Thanks,
Ronan. Tag: Apply this package from MS Tag: 33336
How to make custom printer driver UI property pages
Hi,
i am a newbee in printer driver devolopment.
I need custom UI property sheets, but documentation in the DDK is very rare
and there
are no examples.
Where can i find examples or good docu?
Thanks
Stefan
Please mail answers also to Stefan.Wanger@cib.de Tag: Apply this package from MS Tag: 33330
co-installer and/or installing a service / WHQL HCT requirements
Is it allowable to have a co-installer in place and/or a Service installed
along with an NDIS driver and still meet WHQL / HCT requirements for Network
devices ?
I recall in the past some discussion about certificatino for NDIS drivers
that the miniport driver could be the only thing required for operation. No
co-installer, no additional DLLs or Services could be part of the package.
If I had a DLL, service, other software of any sort, can I install these
through a co-installer or through simple copyfiles, install sections in the
INF file and certify the drivers ?
Thanks in advance for any pointers to info on this.
--
---
Larry Cawley
CreativeMedia Software Solutions, Inc.
lcawley@CreativeMediaSoftware.com
www.CreativeMediaSoftware.com
636 458 1462 Tag: Apply this package from MS Tag: 33309
Where can I get help for the VxD driver development
Hi,
Plz let me know where I can get the help regarding the
VxD driver development for windows98.
I have posted three time a query about the pending issue
in VxDas follows ,but i didn't get any response for that.
I am developing a VSD driver for Storage Area
Network kind of application.This VSD is in DRP_VSD_9 IOS
Layer.In this I am filtering the IOP's and get the data
from IOS and send it to the remote entity.For this I
implemented a kernel level socket using TDI (TDI client).
Now the issue is I have to synchornise the two
asynchronise events (TDI and the Disk).To synch the async
event I need to pend the IOP.
Query:
1. How I can pend the IOP in VxD like in NT
IoMarkIrpPending()to pend the IRP.
2. How I can change the loading order of the VSD.
Thanks in Advance.
Regards,
Subburaj.R Tag: Apply this package from MS Tag: 33306
Vitrual Medium Changer not recognised by RSM
I am creating a virtual medium changer for XP. This will control the media
in some (already working) virtual tape drives (these talk to real tapes on a
different system over the network).
I am sucessfully creating a deviceObject, registering a device interface
etc..etc.. and the driver loads, starts and stays resident just fine. It's
just that the RSM never picks up the fact that it's there and never queries
it or displays it's presence or anything.
I have had to hack around with the class code quite extensively to create
this device.... a mini-driver would not work as the class code assumes that
any medium changer MUST be a SCSI device and tries to send it SRBs to query
various aspects of the device. I have replaced all the SCSI calls, and have
even created a new SCSI bus entry in the DEVICEMAP registry area, so as to
give the driver a MediumChangerPeripheral Identifier.
What am I not doing to get this Virtual Medium Changer recognised by the RSM
system??? I know that the system certainly wants to believe that all medium
changers are SCSI devices....but it can't be the case that a non-SCSI device
simply can't be a changer can it? I would hate to have to create a virtual
SCSI bus driver to get round this.
Adrian.
CodeMechanics Ltd
www.codemechanics.co.uk Tag: Apply this package from MS Tag: 33303
Finding Job Info for an IPP printer using Win32 API Printer Driver
We have written a user mode plug-in for an Adobe
PostScript Printer driver for Win2K and XP which attempts
to add some information to the printer data stream.
Specifically it adds the JobID and the pDocument string
from the jobInfo structure returned by EnumJobs for the
printer in question. This works fine for directly
connected printers but for our network printer (which uses
IPP) the jobInfo structure returned by EnumJobs is set to
all zeros. Is there any way to get this information in
this environment? Tag: Apply this package from MS Tag: 33296
InintializeListHead filing on a 64 bit Win2003
Hi I am debuggin my driver blue screen on Win2003 64 bit
OS. Analyzing the crash dump file gave the result below
SYSTEM_THREAD_EXCEPTION_NOT_HANDLED (7e)
This is a very common bugcheck. Usually the exception
address pinpoints the driver/function that caused the
problem. Always note this address as well as the link
date of the driver/image that contains this address.
Arguments:
Arg1: ffffffff80000002, The exception code that was not
handled
Arg2: e0000165dac51880, The address that the exception
occurred at
Arg3: e0000165e3163b38, Exception Record Address
Arg4: e0000165e3162ba0, Context Record Address
Debugging Details:
------------------
EXCEPTION_CODE: (HRESULT) 0x80000002 (2147483650) - Ran
out of memory
FAULTING_IP:
tesr64!InitializeListHead+40
e0000165`dac51880 st8 [r28]=r26
Can any one explain what does Ran out of memory
indicate... The system has 1 GB of physical memory.
I am not sure why calling InitializeListHead is crashing
the OS. as the same code compiled for a 32 bit version of
Win2003 works just fine.
Thx,
Abhay Tag: Apply this package from MS Tag: 33294
Multi-functional USB drivers
Hi,
I'm currently working on a device that contains a union of two
interfaces, one is a Communication Class interface and the other is a
Data Class Interface. Together, these are emulating a modem (that uses
usbser.sys for a driver)
A single INF file is used to install the Windows driver to this
device. The INF uses the USB\VID_vvvv&PID_pppp device identifier to
identify my device.
I will need to add vendor-specific functionality to this device. I
would like to be able to do so simply by adding a third interface
(with the interface class set to 0xFF, of course) in the same
configuration as the one where the two interfaces mentioned above are,
without having to use the same driver to this interface as the one
used by the two modem interfaces.
To do so, I wanted to use a first INF (for USB\VID_vvvv&PID_pppp)
which would install the device as a composite device, and then split
up the first functionality to the second (vendor-specific)
functionality. Some of you probably see the problem already, as I have
3 interfaces which will cause 3 separate PDOs to be created, and thus
which will split the 2 first interfaces.
Is there a way I could, under the same configuration, have the 2 first
interfaces load up one driver, and the third one load up my
vendor-specific driver? Or do I absolutely need to separate the
functionality on two separate configurations?
Thanks in advance...
... regards! Tag: Apply this package from MS Tag: 33293
Q: about ZwLoadDriver()
Hello!
Can somebody confirm or contradict these three statements:
1) ZwLoadDriver() interface remains unchanged from Win2000 to a latest
Win2003 (or to which version as you know?)
2) It's prototype is
NTSYSAPI NTSTATUS NTAPI ZwLoadDriver( IN PUNICODE_STRING
DriverServiceName );
where DriverServiceName is the name of driver under "Services" key in
registry. For example,
L"Registry\\Machine\\System\\CurrentControlSet\\Services\\Tcpip".
3) DriverEntry() routine of the driver to be loaded is always execute in
system thread context, no matter, where was the ZwLoadDriver() executed.
Any info would be very appreciated.
Thanks, Aleksey. Tag: Apply this package from MS Tag: 33281
#pragma INITCODE
I see '#pragma INITCODE' used in example drivers.
I can not find a Microsoft source for information on it,
or on '#pragma PAGEDCODE'
Can someone briefly explain, or better yet point me to a
Microsoft source for documentation on these?
Thanks. Tag: Apply this package from MS Tag: 33280
HidD_GetAttributes PROBLEM
I am trying to get the vendor ID of the USB HID devices currently
attached to the computer. I have the code I found in every place to do
this :
....
HidD_GetHidGuid(&GUID);
...
SetupDiGetClassDevs(&GUID, NULL, NULL,
DIGCF_PRESENT|DIGCF_INTERFACEDEVICE);
....
SetupDiEnumDeviceInterfaces(PnPHandle, NULL,
&GUID,Device,&DeviceInterfaceData);
....
SetupDiGetDeviceInterfaceDetail(PnPHandle, &DeviceInterfaceData, ...
....
HIDHandle = CreateFile(FunctionClassDeviceData.DevicePath,GENERIC_READ|GENERIC_WRITE,
FILE_SHARE_READ|FILE_SHARE_WRITE, &SecurityAttributes, OPEN_EXISTING,
0, NULL);
.....
Success = HidD_GetAttributes(HIDHandle, &HIDAttributes);
The first problem was SetupDiGetClassDevs with the GUID generated, I
solved this problem with
GUID = GUID_CLASS_USB_DEVICE;
But now my problem is with HidD_GetAttributes, this funtion never is
successful, always return 0
My OS is win 2000, the USB device I have connected is a USB flash
drive and I can see his vendor ID in the USBview.exe
Any idea?
Thanks Tag: Apply this package from MS Tag: 33273
MS PS/2 Mouse Driver Questions
(WinXPpro SP1)
I'm getting a lot of Event ID 256 warnings from the PlugPlay Manager.
The message is: Timed out sending notification of device interface
change to window of "MyTest". The consensus of what I've read is that
these warnings are caused by a device driver. The only clue in Device
Manager is a "device not responding" warning for a MS PS/2 Mouse --
because there is no MS mouse connected to the system. Instead, there is
a Logitech optical mouse (which also appears in DM) which works just
fine. I have searched the system for a file named "mytest.exe" but none
exists. There is no reference to "MyTest" in the registry. With that
background:
1. Can anyone confirm that the Microsoft PS/2 mouse driver for XP runs
a task called "MyTest"? If so, can this be prevented/turned off?
2. Alternatively, how can I uninstall this driver so I can see if the
warnings go away? When I try to uninstall from Device Manager, the
system automatically reinstalls the driver when I re-boot. Tag: Apply this package from MS Tag: 33272
WDM: Allow multiple instances of the "videocap" DDK sample
Hi, All,
Please advise what changes must be made to the "videocap" virtual
driver found in DDK samples to allow several applications to use the
virtual camera presented by this driver at the same time.
I couldn't find any info about multiple device instances so any help
would be highly appreciated.
Thanks a lot,
Anatoly Smelkov
------------------
anatoly@smelkov.com Tag: Apply this package from MS Tag: 33271
HID USB Monitor
Hello,
I"m new to device driver development. I"ve gone through
DDK docs. I have an USB touch panel device which is HID
compliant, for which I want to write a driver. I"m
confused whether to write an USB driver along with HID
minidriver that talks with hidclass.sys OR to write a
mapper driver which map HID report and dispatch events to
mouseclass. My driver should also take care of pnp and
power. Any help in this regard will be really appreciated.
If you can direct me to any particular example DDK source
code in case to write a mapper driver.
Thanks in Advance!!
With Regards
Rajesh Tag: Apply this package from MS Tag: 33268
assthru spinlock
I have compared the passthru example in WinXP SP1 DDK and
the Windows Server 2003 DDK. One major difference that I
have found is the use of a spinlock that was not present
in the previous sample. The lock is a member of the ADAPT
structure. I did not quite understand the purpose of the
spinlock, what data is it protecting, and what are the
race conditions it prevents?
I have 2 other related questions:
1. ADAPT_DECR_PENDING_SENDS also uses the spinlock. Won't
NdisInterlockedDecrement be more efficient?
2. In miniport.c I have seen the following code:
//
// If the miniport below is unbinding, just fail any
request
//
NdisAcquireSpinLock(&pAdapt->Lock);
if (pAdapt->UnbindingInProcess == TRUE)
{
NdisReleaseSpinLock(&pAdapt->Lock);
Status = NDIS_STATUS_FAILURE;
break;
}
NdisReleaseSpinLock(&pAdapt->Lock);
Why is there a spinlock here? No data is changed, only
compared.
Thank you. Tag: Apply this package from MS Tag: 33266
MiniportReset and connection status (NDIS test)
The MiniportReset test checks that connection state is restored after reset, and gives the driver
500 ms to restore connection ( script : 1c_reset.wsf, line 195 in ndistest 4.3.30).
What if this is not enough?
For wireless LAN, the same test suite allows up to 2 sec to connect
(script : 1c_wlan_associatetime.wsf ).
Does NDIS or any protocol actually expect the link up in 0.5 sec after reset?
Since MiniportReset does hardware reset, you can not expect reset time shorter than normal
connection (that is typically ~ 1 sec).
How do you cope with this issue? just skip hardware reset?
Any advice will be greatly appreciated. Thanks in advance.
-- Pavel Tag: Apply this package from MS Tag: 33264
Registry
Hi
I need to read and write a Registry key in my Intermediate driver.
How should i go about it iam new at it
Would RLT routines server the purpose ?????
is there any fixed sequence in which they should be called
any help is welcomed
pooja Tag: Apply this package from MS Tag: 33262
WDM: Multiple instances of a device
Hello,
While writing a WDM video capture driver for a virtual non existing device
(based on the "testcap" sample in the DDK) I encountered a problem which I
can't crack. The driver is working ok but only one instance of the virtual
device can be used in the system. Which means that only one application can
use the virtual camera at any given time. If I want another application to
use the same driver I have to add one more virtual camera device, etc.
Please someone point me in the right direction where to dig to enable
multiple instances of the device driver.
Thanks a lot,
Anatoly Smelkov,
---------------------------------
ABC Software Company
anatoly@smelkov.com Tag: Apply this package from MS Tag: 33261
USBVIEW2.exe WHAT TO USE FOR USB HS DEVICES
We use USBView2.exe to view the connectivity and gather
USB string descriptor data for LS & FS USB devices.
What tool do you use to do the same thing as USBView for
USB HS devices?
Regards Tag: Apply this package from MS Tag: 33260
Zoom feature in Universal Printer Driver
Hi,
I have Unidrv mini-driver. How can I provide zoom option
in the UI? Is there any GPD feature available? Do I have
to write unidrv UI plug-in to get Zoom?
Thanks&Regards
Kiran Tag: Apply this package from MS Tag: 33258
how can i filtering the sector operation?
how can i filtering the sector operation in NT?
how can i obtain sector read/write information from IRP?
please help me......... Tag: Apply this package from MS Tag: 33257
iSight 1394 camera crashes Win2K
Hello!
If an Apple iSight camera is connected onto a computer running
Windows 2000, the computer immediately crashes.
It seems that this is caused by a bug in the 1394 bus driver reading
the ConfigROM of the camera.
Is there a fix for this?
-Arne Tag: Apply this package from MS Tag: 33256
lists and hash maps
Hello,
I am doing first steps with kernel mode programming and want to ask if there
is some library like STL for using in kernel mode? I need to use lists and
hash maps in my trial driver and I belive that it's already implemented by
someone.
Thanks Tag: Apply this package from MS Tag: 33254
KesynchronizeExecution????
hello sir,
i have written a driver for my pci device,in my ISR am
reading control register which gives me the status bits
(indicating which ports caused the interruts)& i store
this value in device extension.
when i call a IOCTL_GET_STATUS i copy this status value to
irp systemBuffer & Reset the dx->IntStatus to zero.
problems am facing on multiple interrupts the first
interrupt stores the right value & next it stores 0.
in IOCTL_GET_STATUS i tried with KeSynchronizeExecution
tested for the values, still problem remained the same.
i require to know what is the right way of solving this
problem?
thanks
James Tag: Apply this package from MS Tag: 33252
IOP Pending in (VSD) VxD driver
Hi,
I am developing a VSD driver for Storage Area Network
kind of application.This VSD is in DRP_VSD_9 IOS Layer.
In this I am filtering the IOP's and get the data from IOS
and send it to the remote entity.For this I implemented a
kernel level socket using TDI (TDI client).
Now the issue is I have to synchornise the two
asynchronise events (TDI and the Disk).To synch the async
event I need to pend the IOP.
Query:
1. How I can pend the IOP in VxD like in NT
IoMarkIrpPending()to pend the IRP.
2. How I can change the loading order of the VSD.
Thanks in Advance.
with Regards,
Subburaj.R Tag: Apply this package from MS Tag: 33251
installing mux programmatically
hi,
we can install mux as protocol manually...
the same kind of installation of IM is possible through
some setup program??
It is require modification in notify object?? or it will
be separate program which will do job of installtion of IM
driver ??
Thanks in Advance,
nimeesh Tag: Apply this package from MS Tag: 33250
how to enable classpnp debug trace.
Hi,
I was debugging a problem of our storage product and
wanted to enable the debug trace of driver classpnp.sys.
With the checked build, there used to be a variable
ClassDebug, you can change the value of it to change the
debug leve. But for W2k SP4 checked build, I couldn't find
this variable, but my problem only happens with SP4, so I
have to debug it with SP4.
Is there anyone knowing this issue?
Thanks. Tag: Apply this package from MS Tag: 33246
Determining if PCI device is physically present...
OS: Windows 2K/XP
How does one programmatically determine if a PCI device (with a given device
and vendor ID) physically exists in a Windows 2K or XP system without
relying on a driver being installed?
I realize the PCI bus driver does the device enumeration and then drivers
are eventually loaded accordingly. In my case, I have to assume that a
driver may not yet be installed for a particular device. I obviously do not
wish to interact with it (until the driver is installed), but is there a way
to "ask" the bus driver if it has seen the PCI vendor/device ID on the last
PCI scan?
Most of what I have found in Windows programming documentation assumes that
a driver already exists, a device interface has been registered, etc.
I would be interested in either a user-mode or kernel-mode solution to this
problem. Preferably a user-mode solution. But I do have a kernel driver
(that is guaranteed to exist) that I can communicate with and modify if
necessary.
Thanks in advance.
Matt Tag: Apply this package from MS Tag: 33242
Driver Seminar fee
Hi,
I'm considering going to the South to take a driver seminar, preferably near
the east coast.
My boss doesn't believe it will help developing our driver, so I might have
to crank my penny jar opened.
I want to know if the seminar fee is tax deductable in Ontario Canada? Has
anyone from Ontario tried this before?
T.I.A
Calvin
========== WE SURVIVE TORONTO =======
1. SARS 2 West Nile Virus 3. Mad Cow Disease
4. 2003 Blackout 5. SARS Again Tag: Apply this package from MS Tag: 33240
Paral Port Mode in BIOS vs parport driver.
Hello,
I am trying to use Windows' standard parallel port
driver( parport ) API from within my driver for
test purposes.
This is what I do:
1) using the name "\Device\ParallelPort0" and
IoGetDeviceObjectPointer(), I get Device Object
of the parport.
2) Then I build a device io req using
IOCTL_INTERNAL_GET_PARALLEL_PNP_INFO and
IoBuildDeviceIoControlRequest API.
3) Then I call IoCallDriver().
I get success and the returned PARALLEL_PNP_INFORMATION
struct's "HardwareCapabilities" field describes the
capabilities of the Parallel Port H/W.
My PC's BIOS Offers: AT, PS/2, EPP and ECP as options
for the parallel port. But when I check
the "HardwareCapabilities" field which is a bit mask of
various possible modes, I only see ECP capability, This
field never shows EPP capability in this field of
PARALLEL_PNP_INFORMATION structure.
Why does paport show fewer capabilities? Can someone help?
Thanks. Tag: Apply this package from MS Tag: 33238
Intercepting IRP_MJ_READ/WRITE
Hi all,
Still playing with the FILESPY sample from IFS kit. What I am trying to
do now is access the buffers associated with each IRP_MJ_READ/WRITE.
Obviously the filespy sample shows how to intercept every filesystem IRP,
but
not how to access the buffers.
What I need to do is copy the contents of every buffer into an area of
non-paged-pool, each time one of these IRPs completes. So my question is,
what is the safest way to do this?
My concerns are:
what type of I/O is being performed (buffered/direct/neither)
what IRQL the IRPs complete at (presumably dispatch-level)
are the buffers still valid at this time etc.
The filespy sample demonstrates how to "synchronise" the completion
of IRP_MJ_CREATE (plus a couple of others) back to PASSIVE_LEVEL,
it does this by waiting on an event in the dispatch routine which is
signalled
by the completion routine. Should I use this mechanism to ensure that
IRP_MJ_READ/WRITE have completed at passive_level before accessing their
buffers?
What do I do when I have done this - do I need to lock pages into memory
etc??
I need some pointers I'm afraid, still struggling to understand this stuff..
Cheers,
James Tag: Apply this package from MS Tag: 33232
64-bit PCI mem xfer resolved
For those of you who remember my 64-bit delima ...
I't looks like my PCI bridge chip, Intel's P64H2, has a
FIFO with a high-water mark. When I hit this mark with a
quadword alligned address, the bridge makes the decision
to assert REQ64#.
I blasted this FIFO in a loop. After enough transfers,
the bridge asserted REQ64# and my PCI card responded with
ACK64#.
It looks like a single 64-bit PCI memory transfer is not a
function of software (Bridge is master).
If you want 64-bit, your PCI card needs to perform the bus
mastering. Tag: Apply this package from MS Tag: 33226
Install Printer Driver with my print processor in NT
Hi,
I have my own print processor. I am installing it using
AddPrintProcessor.
Now I am using UNIDRV.DLL, UNIDRVUI.DLL for AddPrinterDriver. These
files are not installed in some version of NT by default.
So what should I do? I can copy this files to PrinterDriverDirectory.
But for all OS with various service pack these files may be different.
So this is not good approach, that I am thinking. Also in groups I
also got the help that it is not recommended.
So I am trying to use rundll32 printui.dll,PrintUIEntry... But there
is no option to select PrinterProcessor. So how can I change the
PrinterProcessor to my own automatically.
My Printer Processor is testpr, testpr.dll.
Can you suggest me what should I do for automatically installation?
Thanks,
Dhaivat Shah Tag: Apply this package from MS Tag: 33213
Installable driver problem
Hallo,
I'm writing an installable driver for recording purposes, and I have
some strange problems: I've written a dummy version, thinking to add
functionalities in a second time, but I cannot install it: the 'new
hardware wizard' fails with the message 'incorrect parameter'.
The only message reaching my driver is DRV_LOAD, and I only return 1,
with no other operations.
After the failed installation every application using sound fails to
initialize with exception 0xC0000005, so I'm thinking of some access
violation, but I really cannot figure where I'm doing wrong.
Does somebody have any idea ?
Thank you,
Marco
PS here is the OEMSETUP.INF and the driver code:
//////////////////////////////////////////////////////////
OEMSETUP
/////////////////////////////////////////////////////////
[Source Media Descriptions]
1 = "RecorderTest sound driver" , TAGFILE = RecorderTest_disk
[Installable.Drivers]
RecorderTest = 1:RecorderTest.dll, "wave,mixer", "RecorderTest sound
driver" ,,,
[RecorderTest ]
1:RecorderTest.dll
//////////////////////////////////////////////////////////////////
// RecorderTest
//////////////////////////////////////////////////////////////////
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved)
{
return TRUE;
}
LRESULT DriverProc(DWORD dwDriverId, HDRVR hdrvr, UINT msg,
LONG lParam1, LONG lParam2)
{
DWORD dwRes = 0L;
switch (msg) {
case DRV_LOAD:
// Sent when the driver is loaded. This is always
// the first message received by a driver.
dwRes = 1L; // returns 0L to fail
break;
case DRV_FREE:
// Sent when the driver is about to be discarded.
// This is the last message a driver receives
// before it is freed.
dwRes = 1L; // return value ignored
break;
case DRV_OPEN:
// Sent when the driver is opened.
dwRes = 1L; // returns 0L to fail
break; // value subsequently used
// for dwDriverId.
case DRV_CLOSE:
// Sent when the driver is closed. Drivers are
// unloaded when the open count reaches zero.
dwRes = 1L; // returns 0L to fail
break;
case DRV_ENABLE:
// Sent when the driver is loaded or reloaded and
// when Windows is enabled. Install interrupt
// handlers and initialize hardware. Expect the
// driver to be in memory only between the enable
// and disable messages.
dwRes = 1L; // return value ignored
break;
case DRV_DISABLE:
// Sent before the driver is freed or when Windows
// is disabled. Remove interrupt handlers and place
// hardware in an inactive state.
dwRes = 1L; // return value ignored
break;
case DRV_INSTALL:
// Sent when the driver is installed.
dwRes = DRVCNF_OK; // Can also return
break; // DRVCNF_CANCEL
// and DRV_RESTART
case DRV_REMOVE:
// Sent when the driver is removed.
dwRes = 1L; // return value ignored
break;
case DRV_QUERYCONFIGURE:
// Sent to determine if the driver can be
// configured.
dwRes = 0L; // Zero indicates configuration
break; // NOT supported
case DRV_CONFIGURE:
// Sent to display the configuration
// dialog box for the driver.
dwRes = DRVCNF_OK; // Can also return
break; // DRVCNF_CANCEL
// and DRVCNF_RESTART
default:
// Process any other messages.
return DefDriverProc (dwDriverId, hdrvr,
msg, lParam1, lParam2);
}
return dwRes;
} Tag: Apply this package from MS Tag: 33208
How to associate an Ndis Protocol Handle with a Binding Handle?
What I'd like to do is have several instances of a protocol driver
registered with NDIS. The problem I am having is associating the
NdisProtocolHandle (returned from NdisRegisterProtocol()) with the
BindingContext given to ProtocolBindAdapter(). Since NdisRegisterProtocol()
does not take a user context as a parameter and there is no user context
passed into Prot