a sequenced, singly linked list
Hi,
What's the point of the SLIST_HEADER.Sequence member? Treiber's non-blocking
stack algorithm does not use it
TIA
Andrew Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62368
Discovering NDIS miniport internals
Hi,
I am interested in one question. I read (and then even saw) that some NDIS
miniports have (e.g.) firmware image inside. How is it managed (and
accessed)? Is such "image file" part of its resources (*.rc)?
Thank for kindness
MF Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62364
scsi miniport dma data corruption
Dear all,
I have PCI controller that has DMA channel 0/1 for data transmission,
the flow of dma command issued by scsi miniport was just set
DMA control register, everything is ok, but sometimes the buffer content
of scsi miniport read from PCI memory was not the expected data,
it may lost 1 or 2 word byte, I have tried PCI controller function in
real mode (DOS), and the result was as expected.
After rescan DDK document, I found that DMA cache or cachebuffer
may cause this problem. Can somebody tell me that direction was right or
this situation comes from other source?
Any suggestions was appriciate!
Best Regards,
Tony Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62353
ZwCreateFile question
I know that files I'm interested in are open for write access of some sort.
I'd like to open those files but merely for read access prior to a write, so
I open it like so:
InitializeObjectAttributes(&ObjAttrs,InFile,OBJ_KERNEL_HANDLE|OBJ_CASE_INSENSITIVE,NULL,NULL);
//
Status = ZwCreateFile(&FileHandle,
GENERIC_READ|FILE_READ_ATTRIBUTES|FILE_READ_DATA,
&ObjAttrs,
&StatusBlock,
0, //allocation size
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ|FILE_SHARE_DELETE, //share access
FILE_OPEN, // disposition
FILE_NON_DIRECTORY_FILE|FILE_SYNCHRONOUS_IO_NONALERT,//CreateOptions,
0, // EaBuffer OPTIONAL,
0 );
Yet, I'm getting :
STATUS_SHARING_VIOLATION ((NTSTATUS)0xC0000043L) errors.
Must I open the file with precisely the same ACCESS_MASK as was originally
used?
On the other hand, I do have the FileObject for this guy based on it being
open for Write. Can I get a handle for reading with ObOpenObjectByPointer?
--
Gak -
Finecats Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62351
USB 2.0 High speed Isochronous
Hi,
I'm deveoping a driver using USBCAMD2 for an FX2 Cypress device.
In USB 2.0 Isochronous High-Speed mode I transfer a stream about at 7.8
MB/s. This is correct if you set 1024 byte per Microframe with 125us
interval.
My problem is that I want to transfer 3*1024 bytes every Microframe with
125us interval to reach about 23 MB/s. I know this is theoretically
possible with USB 2.0, but I don't know how to program my driver to
increase transfer rate.
My Endpoint descriptor is :
bmAttributes = 0x01 (Isochronous)
wMaxPacketSize = 0x1400 (3*1024)
bInterval = 0x01 (125 us)
How can I transfer about 23MB/s with USB in Isochronous mode ?
Thank a lot,
Blu. Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62349
DIFxApp 2.0 won't install my driver - it doesn't think it's signed
I thought I had this DIFxApp thing under control, but I just upgraded to
version 2.0 that was just released (I need the x64 support) and it seems to
have broken something. The install now aborts with the following log:
DIFXAPP: InstallDriverPackages
DIFXAPP: 'CustomActionData' property 'DIFxApp Version' is 2.0.
DIFXAPP: 'CustomActionData' property 'UI Level' is 5.
DIFXAPP: 'CustomActionData' property 'componentId' is
{33C87C1F-F8A4-4834-9F3D-A9026D067632}.
DIFXAPP: 'CustomActionData' property 'componentPath' is C:\Program
Files\company driver\Kernel_MF\.
DIFXAPP: 'CustomActionData' property 'flags' is 0x10.
DIFXAPP: 'CustomActionData' property 'installState' is 2.
DIFXAPP: 'CustomActionData' property 'ProductName' is driver.
DIFXAPP: 'CustomActionData' property 'ManufacturerName' is FBN Corporation.
DIFXAPP: INFO: ENTER: DriverPackageInstallW
DIFXAPP: INFO: Checking signature with catalog 'C:\Program Files\company
driver\Kernel_MF\driver.cat' ...
DIFXAPP: ERROR: Signature verification failed while checking integrity of
driver package 'driver.inf' ('C:\Program Files\company
driver\Kernel_MF\driver.inf'). (Error code 0xE0000244.)
DIFXAPP: INFO: Successfully removed {33C87C1F-F8A4-4834-9F3D-A9026D067632}
from reference list of driver store entry
DIFXAPP: INFO: RETURN: DriverPackageInstallW (0xE0000244)
DIFXAPP: ERROR encountered while installing driver package C:\Program
Files\company driver\Kernel_MF\driver.inf
DIFXAPP: InstallDriverPackages failed with error 0xE0000244
Action ended 7:46:31: InstallFinalize. Return value 3.
The driver is signed. If I use chktrust on the .cat file it reports that it
is properly signed. Is there any other utility that would be more
appropriate to use?
My only clue here is that maybe there is a file that is not included in the
signature that should be, or there is a file that is included that shouldn't
be.
How can I determine the problem?
My driver consists of a single .sys file. I also include a stripped .pdb
file. That means my .cdf file that creates the .cat file looks like:
[CatalogHeader]
name=driver.cat
[CatalogFiles]
driversys=driver.sys
driverinf=driver.inf
driverpdb=driver.pdb
I then sign the .cat file. The .inf file has an entry that points to the cat
file:
[Version]
Signature = "$Windows NT$"
Class = "Replication"
Provider = %Company%
DriverVer = 01/01/05,0.0.0.0
CatalogFile = driver.cat
DriverPackageType=FileSystemMinifilter
DriverPackageDisplayName=%DriverServiceDesc%
Any help or any idea on what to look for would be greatly appreciated!
This worked in DIFxApp 1.1!!!
Thanks!
Bob Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62347
Shell Namespace vs. Device Driver
Hi,
A short time ago, I asked a question in this newsgroup about
writing a device driver. It is:
--
Hi,
I would like to write a program:
In Windows Explorer, after drag&drop a file to
a pre-defined drive letter (for example F:) the file
should be sent through the COM port to an
external device(digital satellite receiver).
Where should I start?
Do I have to write a device driver?
--
I was told that writing a device driver
is not neccessary and a Shell Namespace Extension with a
drag&drop handler can do the job. I had a short look at MSDN about
Creating a Shell Namespace Extension.
Now, I'm asking my question more clearly.
My scenario is:
As soon as the user attaches the RS-232 cable to the computer (at the other
end it is attached to the RS-232 port present on the external device) a
drive
letter F: should appear in Windows Explorer automaticly(like in digital
cameras)
and when the user drag&drops a file to F: the file should be sent through
the
COM port to the external device.
So, can Shell Namespace Extension provide what I need? I'm going to execute
my program with Shell Namespace Extension only once, then restart the
computer.
Now, may I expect to see the drive letter F: in Windows Explorer if I attach
the
RS-232 cable to the computer? Will it disappear if I detach the cable?
About the other case (displaying the drive letter F: automaticly is not
necessary, it
may always be visible, it will not be influenced from attaching and
detaching the cable):
I'll execute my program with Shell Namespace Extension. I'll see the
drive letter F: in Windows Explorer, then I can transfer the file to the
external
device. What will happen if I restart the computer? Will the drive letter F:
remain
in Windows Explorer?
Thanks... Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62344
[Need info] Driver Signing
Hi,
What is the process to pass Windows Logo testing for a driver ?
What is this cost ?
How many time does it take ?
Thanks Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62334
"CreateCompatibleDC ()" may have a bug on XP x64
OS: Windows XP x64
Application: 32-bit application (i.e. Word)
Priner Driver: 64-bit printer driver
DDK version: 3790.1433
"CreateCompatibleDC (NULL);" returns NULL inside our 64-bit printer driver
when our driver is called by a 32-bit application. And "GetLastError()"
returns
0 after that.
Is that a known issue? If so, when can we expect to get the new OS or
DDK version with the fix?
Thanks,
SL Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62332
Device driver programmers in SLC ?
I am new to device drivers.
Are there any device driver developers in the Salt Lake City, Utah area that
I may be able to chatt with?
Thanks,
John Long
john@thelongs.us Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62330
SetPort (printer driver language monitor)
Hi all,
I wish the SDK explained the SetPort function better. I'm not really sure
what it does other than change the "Status" messages column in the "Printers
and Faxes" dialog box. Does it do anything else?
I've discovered if I use PORT_STATUS_TYPE_ERROR for dwSeverity that it does
seem to hang up the spooler, and I can't seem to clear it later. Thats ok,
because I found that PORT_STATUS_TYPE_WARNING is ok for my use.
My real question is that I would like to use the pszStatus member of
PORT_INFO_3 to display my own messages up there, but it doesn't seem to do
anything. The SDK says that if the predefined messages available for
dwStatus aren't enough that you can define your own with pszStatus. So, this
is what I do:
PORT_INFO_3 pi3;
pi3.dwStatus = 0; // set to zero because none of these messages apply.
pi3.pszStatus = TEXT("My Printer Message");
pi3.dwSeverity = PORT_STATUS_TYPE_WARNING;
SetPort(NULL,pPortName,3,LPBYTE(&pi3));
Does anybody have any ideas?
Thanks! Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62328
try/except does not catch all exceptions...?
I am trying to use __try/__except to catch crashes that may occur in my driver.
It works great for NULL pointer access, but not for a plain bad memory access.
If the driver accesses 0xfefefefe (just as a test!), I see a crash in
WinDbg, instead of my exception handler getting launched.
The crash is below. How do I catch it (and other exceptions) ?
PAGE_FAULT_IN_NONPAGED_AREA (50)
Invalid system memory was referenced. This cannot be protected by try-except,
it must be protected by a Probe. Typically the address is just plain bad or
it
is pointing at freed memory.
Arguments:
Arg1: fefefefe, memory referenced.
Arg2: 00000000, value 0 = read operation, 1 = write operation.
Arg3: b94ca75d, If non-zero, the instruction address which referenced the
bad memory
address.
Arg4: 00000000, (reserved)
/ Hannes. Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62321
INF model section decoration 64-bit Windows2003 AMD64
Hi,
I am trying to install 64bit printer driver thru. HW1st on beta version
of 64-bit Windows2003 build 3790 v.1433 installed on AMD64 machine.
Getting an error "can not Install hardware unable to detect device ID".
In printer INF file, I have described the decorated model section for
windows2003 in following way.
[MANUFACTURER]
%ABC%=Models,NTamd64.5.2 // Here 5 is MajorOSversion
and 2 is MinorOSVersion
[Models.NTamd64.5.2]
I have also tried with following model section
[Models.NTamd64]
Still giving the same error "can not Install hardware" on 64-bit
Windows2003.
Same model decoration is working fine on 64-bit WindowsXP.
When I turnoff the undecorated models check by setting registry
variable DisableDecoratedModelsRequirement to 1 then
64-bit printer driver gets installed on 64-bit windows 2003.
So, I think problem is with model decoratation for 64-bit windows2003.
Can anyone tell me what should be the model decoration for 64-bit
Windows2003.
thanks in advance
regards
manoj Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62315
Ndis - DHCP
Hi All,
I am making use of netvmini sample(Virtual miniport driver). I
have modified the code in such a way that i can change the cable status using
control codes which will trigger a NDIS_MEDIA_STATUS_CONNECT and
NDIS_MEDIA_STATUS_DISCONNECT in driver. It is working fine.
But sometimes though adapter is configured to use static
IP, on receiving CONNECT control code which will trigger
NDIS_MEDIA_STATUS_CONNECT, the status in the network connections window says
"Acquiring network address" . The ip address displayed is 0.0.0.0 but soon
after the status becomes connected and it chages back to static IP which i
configured .
What i observed is this happens with LAN as well as WLAN in my machine when
they are configured with static IP. When i unplug and plug network cable of
LAN adapter, the same event happens sometimes which results in erratic
behavior of sockets.
Could anyone let me know how can i fix this?Would be of great help if u
could let me know what all are the events happens at "Acquiring network
address".
Thanks,
Senthil Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62309
Disk class filter driver for back-up mechanism
Hi All,
I am trying to develop a backup tool. To give the maximum performance,
my plan is to write only modified blocks/sectors of source disk into
target disk since it was last backed up.
How I can collect block/sector information from data write request
packet. Can a disk class upper filter solve this problem. Your ideas
are welcome
regards
John Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62308
Will XP/2k load my driver(oemxx.inf) prior to system-supplied keyboard.inf (HID_DEVICE)?
I have a HID DEVICE with 2 function on it - keyboard and mouse
compisited chip.
I only use the keyboard function and my driver is simply a keyboard
filter.
When I plug DEVICE into system without my filter driver, system treat
it as a HID_KEYBOARD and HID_MOUSE.
the question is:
1. If I have a valid .cat file, after perform SetupCopyOEMInf, will
XP/2000 load my driver(oemxx.inf) prior to
system-supplied keyboard.inf (HID_DEVICE)? ( as I know before have
.cat file - won't!)
I am very worry about the 'Rank' (to match an best .inf) will larger
than keyboard.inf, that's mean my filter driver will never been chosen.
Here 's my attachment information, thanks for your comments.
Assume the pid/vid is:
vid = 1234
pid = 5678
The HardwareId (retrieve from actual devnode):
HID\Vid_1234&Pid_5678&Rev_0100&MI_00
HID\Vid_1234&Pid_5678&MI_00
HID_DEVICE_SYSTEM_KEYBOARD (I think it's create by HIDClass)
HID_DEVICE_UP:0001_U:0006
HID_DEVICE
The .Inf file (simply kbfiltr version):
//--------------------------------------------------------------------------------------------
; Hid device filtr.inf
;
; Installation inf for the Device that needs filtering adapter.
;
[Version]
Signature="$Windows NT$"
Provider=%DDK_Ex%
ClassGUID={4D36E96B-E325-11CE-BFC1-08002BE10318}
Class=Keyboard
;CatalogFile=Flagfiltr.cat - I am trying to obtain one from WHQL...
DriverVer=01/01/2005, 1.0.0.0
[DestinationDirs]
DefaultDestDir = 12
[ControlFlags]
ExcludeFromSelect = HID\Vid_1234&Pid_5678&Rev_0100&MI_00
ExcludeFromSelect = HID\Vid_1234&Pid_5678&MI_00
; Driver information
;
[Manufacturer]
%DDK_Ex% = DDK_Ex.Mfg
[DDK_Ex.Mfg]
"TEST_1" = Flagfiltr, HID\Vid_1234&Pid_5678&Rev_0100&MI_00
"TEST_2" = Flagfiltr, HID\Vid_1234&Pid_5678&MI_00
;
; General installation section
;
[Flagfiltr.NT]
; perform port related actions from keyboard.inf
Include=keyboard.inf
Needs=
; Copy the driver over
CopyFiles=Flagfiltr.CopyFiles.NT
;
; File sections
;
[Flagfiltr.CopyFiles.NT]
Flagfiltr.sys
;
; Service Installation
;
[Flagfiltr.NT.Services]
AddService = Flagfiltr, , Flagfiltr_Service_Inst
; Install the port driver and mouclass from keyboard.inf
Include=keyboard.inf
Needs=
[Flagfiltr_Service_Inst]
DisplayName = %Flagfiltr.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 0 ; SERVICE_ERROR_IGNORE
LoadOrderGroup = Keyboard Port
ServiceBinary = %12%\Flagfiltr.sys
[Flagfiltr.NT.HW]
; Add the device upper filter
AddReg = Flagfiltr.NT.HW.AddReg
; run the directives need by the port driver
Include=keyboard.inf
Needs=
[Flagfiltr.NT.HW.AddReg]
HKR,,"UpperFilters",0x00010000,"Flagfiltr"
;
; Source file information
;
; use [SourceDisksNames.x86] for x86 only installs
; use [SourceDisksNames.alpha] for alpha only installs
[SourceDisksNames]
1 = %DiskId1%,,,
[SourceDisksFiles]
Flagfiltr.sys = 1,,
[Strings]
;
; Non-Localizable Strings
;
REG_SZ = 0x00000000
REG_MULTI_SZ = 0x00010000
REG_EXPAND_SZ = 0x00020000
REG_BINARY = 0x00000001
REG_DWORD = 0x00010001
SERVICEROOT = "System\CurrentControlSet\Services"
;
; Localizable Strings
;
DiskId1 = "TEST"
DDK_Ex = "TEST"
Flagfiltr.SvcDesc= "TEST" Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62306
Link between setup classes and interface classes.
Dear All,
I would like to communicate directly with USB and parallel local
printers using CreateFile, WriteFile and ReadFile functions from the
Windows API.
To retrieve local printers connected to a PC, I used the setupapi with
the printer setup class as follow :
SetupDiGetClassDevs(&GUID_DEVCLASS_PRINTER, 0, 0, DIGCF_PRESENT);
Then I could enumerate the printers using SetupDiEnumDeviceInfo ().
To communicate with the printers using CreateFile, WriteFile and
ReadFile functions, I figured out I had to retrieve the "symbolic name"
of the printers using SetupDiGetDeviceInterfaceDetail ().
How can I get the device interfaces of the printers I retrieved using
SetupDiEnumDeviceInfo () ? What is the link between setup class and
interface class ?
Best regards,
Guillaume. Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62304
How to completely remove AVSSAMP from windows ?
first, i run script to see avssamp device in device manager applet
set devmgr_show_nonpresent_devices=1
cd\%SystemRoot%\System32
start devmgmt.msc
then i success use uninstall. now it'is removed. but after the few minutes,
window find again this device and asks me about how to install in, like:
Found new MEDIA...
Why it asks me again and again ? Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62302
Get service pack name from a driver?
Hi,
From within a driver, I want to get the string name of the service pack, e.g.
"Service Pack 1, v.1247"
The function PsGetVersion() is supposed to do the trick, but I can't get a
string out of it, neither from within DriverEntry, nor any other point in my
driver. (I do get other version info from PsGetVersion() though, but not the
SP name.)
Is there any other way to get the service pack name string from within a
driver?
Thanks,
/ Hannes. Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62291
Application can't be killed while on a synchronous read
I wrote a driver that is not allowing a console application which is blocked
on a synchronous ReadFile() to be killed
(ctrl-C or taskmanager). Nor can I remove the driver with out rebooting the
system. What am I doing wrong -- details below.
I have created a pure software driver that reads and writes from an internal
buffer. If data is available the read IRP
it will complete immedately, else it will PEND. A Device I/O Control is used
to indicate that data is available, and
if a read IRP is pending will complete it.
I have tested with a TestRead.exe that syncrhonously reads the device and a
TestRelease program that writes
and sends the IOCTL_RELEASE_READ. Things work fine with the test program
interaction, immediately reading or blocking until data is availalbe.
HOWEVER, when I run the TestRead and it blocks I can not Ctrl-C the program
or use the TaskManager to kill the program. Why is this? I understood that
the I/O Manager was support to clean all the synchronous calls/Reads and
allow exit of the program, but this is not happening. What am I missing?
Below are what I believe to be the critical pieces:
NTSTATUS DispatchRead (IN PDEVICE_OBJECT pDevObj, IN PIRP pIrp)
{
NTSTATUS status = STATUS_SUCCESS;
[ declarations ...]
PDEVICE_EXTENSION pDevExt = (PDEVICE_EXTENSION)
pDevObj->DeviceExtension;
if (pDevExt->bDataReady) {
[fill read buffer ...]
// Now complete the IRP
pIrp->IoStatus.Status = status;
pIrp->IoStatus.Information = nBytes; // bytes xfered
IoCompleteRequest( pIrp, IO_NO_INCREMENT );
return status;
} else {
pDevExt->pIrpPendingRead = pIrp; // save pointer to IRP
status = STATUS_PENDING;
IoMarkIrpPending(pIrp);
pIrp->IoStatus.Status = status;
pIrp->IoStatus.Information = 0; // bytes xfered
return status;
}
}
NTSTATUS DispatchIoControl(IN PDEVICE_OBJECT pDevObj, IN PIRP pIrp ) {
PIO_STACK_LOCATION pIrpStack = IoGetCurrentIrpStackLocation( pIrp );
PDEVICE_EXTENSION pDevExt = (PDEVICE_EXTENSION)
pDevObj->DeviceExtension;
// Release read is send when data is available
if (pIrpStack->Parameters.DeviceIoControl.IoControlCode
== IOCTL_RELEASE_READ ) {
if (pDevExt->pIrpPendingRead == NULL) {
pDevExt->bDataReady = TRUE
} else {
// The stack location contains the user buffer info
PIO_STACK_LOCATION pPendingIrpStack =
IoGetCurrentIrpStackLocation( pDevExt->pIrpPendingRead );
[decls and read Irp buffer copy stuff ...]
// Complete Pending Read IRP
pDevExt->pIrpPendingRead->IoStatus.Information = nBytes;
pDevExt->pIrpPendingRead->IoStatus.Status = STATUS_SUCCESS;
IoCompleteRequest( pDevExt->pIrpPendingRead, IO_NO_INCREMENT );
pDevExt->pIrpPendingRead = NULL; // "remove from queue of one"
}
// Complete Device IO Irp
pIrp->IoStatus.Information = pDevExt->bSetPendingRead;
pIrp->IoStatus.Status = STATUS_SUCCESS;
IoCompleteRequest( pIrp, IO_NO_INCREMENT );
return STATUS_SUCCESS;
} else {
[ not implemented completion of IRP ...]
return status;
}
} Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62284
question on USB pipe flags
Hello. My device is USB composite (1.1), and the interface I am working on
is for ASIO (audio) streaming.
I have two questions for USB pipe flags:
a) What do USBD_PF_ENABLE_RT_THREAD_ACCESS and USBD_PF_MAP_ADD_TRANSFERS
actually do? The DDK says that the former is enables optimization for
streaming transfers while the latter enables "fast isochronous mode". Can
anyone shed light on what these actually do?
b) Since I have a composite device, I use URB_FUNCTION_SELECT_INTERFACE
instead of URB_FUNCTION_SELECT_CONFIGURATION to allocate bandwidth and
receive my pipes. However, the DDK implies that the aforementioned flags
(see above) work for URB_FUNCTION_SELECT_CONFIGURATION. Does this mean that
they are inaccessible to me, as I am forced to use these flags in my
URB_FUNCTION_SELECT_INTERFACE request?
thanks,
Philip Lukidis Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62281
*InputDataConsumed always = 0 (moufiltr)
Hi everyone,
I found that in MouFilter_ServiceCallback the input data always contain one
packet (InputDataStart + 1 = InputDataEnd) but *InputDataConsumed always = 0
(I don't know if this parameter is used by any other driver, eg. mouclass).
Can anyone explain this?
Thanks in advance.
Liang Fu Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62280
DrvTextOut Font Outlines
Hi,
I am trying to write a printer driver that saves the output data in
vector format in a file. When dealing with TrueType fonts the gdi calls
the DrvTextOut function but with bitmap glyphs. I want to get outlines
of the characters instead. I have set the following for the various
related paramters:
DrvDeviceCapabilities: DC_TRUETYPE - returns 0
DEVMODE: dmTTOption = DMTT_DOWNLOAD_OUTLINE
DEVINFO: flGraphicsCaps = GCAPS_ALTERNATEFILL |
GCAPS_HORIZSTRIKE |
GCAPS_VERTSTRIKE |
GCAPS_VECTORFONT |
GCAPS_FONT_RASTERIZER |
GCAPS_GEOMETRICWIDE |
GCAPS_HALFTONE |
GCAPS_OPAQUERECT
GCAPS_GRAY16;
GDIINFO: ulTechnology = DT_RASPRINTER;
Is there some specific setting that forces the GDI to always send font
outlines or is it just not possible in some cases? Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62278
Audio Delay From Audio Capture Source Filter
Dear All:
I designed a AVstream driver with video and audio streams.
Then, using the graphedit to play and capture it.
The audio stream is offered from Audio Capture Source (qcap.dll).
The video stream is offered from Video Capture Source filter's capture pin.
However, the audio sound has a serious dealy (about 1 ~ 2 sec) to video in
previewing.
But, its captured avi file is AV-Sync well.
This is my driver's bug?
I had tried other video devices (USB2.0 Video Grabber).
Their preview and capture are AV-Sync both.
The USB device is a standard USB Audio Class device.
It uses Microsoft's USBAUDIO.sys driver.
Why cannot MS's driver cause the preview delay?
Best Regards,
H.P. Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62277
Does WinDBG follow into SEH finally{}?
Hello,
when I debug my driver and something went wrong, I can't see (with
WinDBG) that the code inside finally{} is executed.
AFAIK the code inside finally is _always_ executed, so I assume that
WinDBG isn't following. Is this true?
Thank you for your efforts!
--
phren Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62268
Audio formats supported by UsbAudio.sys?
Is there a listing somewhere with the formats supported by UsbAudio.sys in
Windows 2000 and XP?
Leo Havmøller. Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62267
MUX driver Virtual Interfaces appear as Network Cable Unplugged
hi all,
I was creating Virtual Adapters following the MUX Sample.
I am using INetCfg interfaces to Install (INetCfgClass->Install)
function using my own application instead of using the notify objects
as in sample.
The problem is that network interfaces do appear in the Network
Connection Interfaces but they all appear as Unplugged, but with the
sample when i create the new virtual adapter they all are normal and
are connected.
I am not able to understand the problem.
Is the binding to the lower adapter not happening properly ??
Can somebody explain ?
Thanks in advance.
Regards
Tarun Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62265
How to use DbgPrompt in drivers?
Dear All,
Recently I read the article "Try This -- Interactive Driver Testing" (The NT
Inside, Vol 11). It introduces a minimal driver skeleton. I tried to build
the code, but encountered a compiler error.
The code uses the function "DbgPrompt". But there is no declaration of
DbgPrompt in any *.h files in Win DDK (2600). And there is no information
about this function in DDK's help.
I have noted that the function is exported by ntoskrnl.lib. So I added
"TARGETLIBS=$(DDK_LIB_PATH)\ntoskrnl.lib" in "source" file. But I still need
to know the declaration of the function "DbgPrompt".
Can anyone tell me about this or how to use "DbgPrompt" in drivers.
Thanks in advance. Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62264
STATUS_REPARSE across network share
Hello Everybody,
I have a filter driver that uses STATUS_REPARSE to redirect file opens in
its IRP_MJ_CREATE routine as documented in this list and many other places
(http://support.microsoft.com/default.aspx?scid=kb;en-us;319447). The
actual files reside on a network share (e.g. reparsed to
\device\mup\server\share). This technique works well for IO requests
originating from the local system however if the request comes across the
network (e.g. via SRV) it fails with 'access denied'. This is obviuosly
becasue the access request is in the context of the system. My question is
this: is it possible to make this work using impersonation or delegation,
or do I need an etirely different approach to the problem?
Thanks in advance for any help or advice,
zengfeng. Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62260
Get temperature values from the cpu/motherboard
How can I get temperature values from the CPU and motherboard of a machine?
I've try querying WMI (using IWbem_ methods with win32_temperatureprobe),
which hasn't worked - it says the temperature sensors don't exist. Is there
some other way I can get this data?
Note: project also requires getting CPU usage info, which I've already done
through WMI, so a WMI solution to getting the temperature values is
preferable, but not necessary.
Thanks! Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62254
WDM capture driver and MPEG-2 video.
I am trying to configure the capture Pin format on the WDM capture driver to
support MPEG2_Video. We already have the stuff working for a Program stream,
but we want to try out something using Mpeg2_Video for testing purposes.
I have tried something as I have shown below, but somehow the capture spin
of the driver doesnt connect to any downstream decoder filter when I set for
MPEG2_Video format. Is there something that I could be doing wrong ?
Here is the way I am configuring the KS_DATARANGE_MPEG2_VIDEO required in
this case.
Any help is appreciated.
static KS_DATARANGE_MPEG2_VIDEO Mpeg2Stream =
{
//KSDATARANGE
{
sizeof(KS_DATARANGE_MPEG2_VIDEO) + sizeof(SequenceHeader) - 1,
0,
0,
0,
STATIC_KSDATAFORMAT_TYPE_VIDEO,
STATIC_KSDATAFORMAT_SUBTYPE_MPEG2_VIDEO,
STATIC_KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO
},
TRUE,
0,
0,
0,
// _KS_VIDEO_STREAM_CONFIG_CAPS
{
STATIC_KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO, // GUID
KS_AnalogVideo_None, // AnalogVideoStandard
720,480, // InputSize, (the inherent size of the incoming
signal
// with every digitized pixel unique)
160,120, // MinCroppingSize, smallest rcSrc cropping rect
allowed
720,480, // MaxCroppingSize, largest rcSrc cropping rect
allowed
8, // CropGranularityX, granularity of cropping size
1, // CropGranularityY
8, // CropAlignX, alignment of cropping rect
1, // CropAlignY;
160, 120, // MinOutputSize, smallest bitmap stream can produce
720, 480, // MaxOutputSize, largest bitmap stream can produce
8, // OutputGranularityX, granularity of output bitmap
size
1, // OutputGranularityY;
0, // StretchTapsX (0 no stretch, 1 pix dup, 2
interp...)
0, // StretchTapsY
0, // ShrinkTapsX
0, // ShrinkTapsY
333667, // MinFrameInterval, 100 nS units
640000000, // MaxFrameInterval, 100 nS units
8 * 3 * 30 * 160 * 120, // MinBitsPerSecond;
8 * 3 * 30 * 720 * 480 // MaxBitsPerSecond;
},
//KS_MPEGVIDEOINFO2
{
//KS_VIDEOINFOHEADER2
{
0, 0, 720, 480,
0, 0, 0, 0,
0x003d0900,
0,
0x0000000000051763,
0,
0,
4,
3,
0,
0,
{
sizeof (KS_BITMAPINFOHEADER), // DWORD biSize;
0x000002d0,
0x000001e0,
0,
0,
0,
0,
0x000007d0,
0x0000cf27,
0,
0
}
},
0x0006f498,
1,
KS_MPEG2Profile_Main,
KS_MPEG2Level_Main,
0,
(DWORD)SequenceHeader
}
};
the SequenceHeader is the sequence Header array that is supposed to be passed.
Thanks. Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62242
If a file system filter driver is installed using DIFxAPP, does it show up in Device Manager?
Previously, with our manual method of installing a file system filter
driver, I could go into Device Manager, right click on the top tree entry,
select "Show Hidden Devices" and a "Non Plug and Play Devices" entry would
magically appear. Our device driver would be there. From that I can
stop/start and set the start type.
I've just gotten a device install working with DIFxApp, and it doesn't seem
to be available there. Is this the way it is supposed to be? How do I change
the start type to manual (for instance), without going into regedit?
Thanks,
Bob Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62239
Uninstalling a file system filter driver with DIFxApp
When uninstalling a filter driver with DIFxApp, I notice that it doesn't
remove the actual .sys file from c:\windows\system32\drivers. This is a
violation of the Certified for Windows test. In looking through the
DIFxApp.doc supplied by MS, there is a section that describes the uninstall
steps, and by George, it doesn't mention deleting the installed files.
From the DIFxApp.doc whitepaper:
· Removes the driver package from the Driver Store. (Bob: I'm assuming
this doesn't mean remove the actual driver file. This has to do with the
.inf and .cat, right?)
· Updates the association between the service, the driver, and
applications. For more information, see "Associating Services, Driver
Packages, and Applications" later in this paper.
· Deletes the corresponding entry for the driver package in Add or Remove
Programs. (Bob: actually no add/remove entry was created)
Is it okay to leave these files there, or is there a way to get them
deleted?
Thanks!
Bob Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62238
DIFxApp available for amd64 CPU?
The version 1.1 SDK I found contains only ia64 and x86 code. For AMD64, can
I use the x86 DLL's?
Thanks,
Bob Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62237
DIFxApp is failing - saying drivers are unsigned when they are!
I've gone through hell to get this far:
Using Installshield X, ran their "Device Driver Wizard"
hand-fiddled the tables so they compile correctly
got a valid code signing Certificate from Verisign
created a catalog pointing to the .inf and .sys files
SIGNED the damn catalog file
when I run setup, I get the following:
DIFXAPP: InstallDriverPackages
DIFXAPP: 'CustomActionData' property 'DIFxApp Version' is 1.1.
DIFXAPP: 'CustomActionData' property 'UI Level' is 5.
DIFXAPP: 'CustomActionData' property 'componentId' is
{33C87C1F-F8A4-4834-9F3D-A9026D067632}.
DIFXAPP: 'CustomActionData' property 'componentPath' is C:\Program Files\FBN
product\driver\.
DIFXAPP: 'CustomActionData' property 'flags' is 0x3.
DIFXAPP: 'CustomActionData' property 'installState' is 2.
DIFXAPP: 'CustomActionData' property 'ProductName' is Product.
DIFXAPP: 'CustomActionData' property 'ManufacturerName' is FBN Industries.
DIFXAPP: Analyzing driver package "C:\Program Files\FBN
product\driver\driver.inf".
DIFXAPP: Driver package 'C:\Program Files\FBN product\driver\driver.inf' is
unsigned. Error code 0x800B0100.
DIFXAPP: ERROR 0x800B0100 encountered while adding driver package C:\Program
Files\FBN product\driver\driver.inf to the driver store
DIFXAPP: InstallDriverPackages failed with error 0x800B0100
Action ended 14:26:21: InstallFinalize. Return value 3.
As far as I can tell, the thing is signed (using 'signcode.exe'). If I use
chktrust:
> chktrust -v driver.cat
It displays the certificate.
Any ideas????
Thanks for any guidance.
Bob Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62235
create a opentype or truetype "file" from FONTOBJ
Hi
I have to send the font related to a FONTOBJ to an other computer. So I have
to get the whole "font file" ... but, since it doesn't have to be a file
always (embedded fonts etc.), I don't want to use the functions that return
the filenames to find the data. So I'd like to build the file using
functions like FONTOBJ_pjOpenTypeTablePointer and
FONTOBJ_cGetAllGlyphHandles and FONTOBJ_cGetGlyphs ... I think this should
be possible (at least for truetype and opentype)... but my problem is, that
I don't understand how to handle those tables. What tables are required? How
is a opentype/truetype font structured? ... can someone explain me this? ...
and could this work, what I'd like to do?
thanks
MR Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62232
Use of RtlCheckRegistryKey in WDM driver?
My WDM driver needs to know if a particular registry key exists
The following code fails with a 3C status even when the reg path exists
UNICODE_STRING uszTemp;
OBJECT_ATTRIBUTES ObjAttrs;
KEY_VALUE_PARTIAL_INFORMATION valueInfo;
UNICODE_STRING uszName;
RtlInitUnicodeString(&uszTemp,"\\Registry\\Machine\\SOFTWARE\\xxx");
InitializeObjectAttributes(&ObjAttrs, &uszTemp,
OBJ_KERNEL_HANDLE|OBJ_CASE_INSENSITIVE, NULL, NULL);
RtlFillMemory(&valueInfo, sizeof(KEY_VALUE_PARTIAL_INFORMATION), 0x0);
RtlInitUnicodeString(&uszName, L"yyy");
status = ZwOpenKey(&KeyHandle, KEY_READ, &ObjAttrs);
By contrast,
RtlCheckRegistryKey(RTL_REGISTRY_ABSOLUTE,L"\\Registry\\Machine\\SOFTWARE\\xxx\\yyy")
returns STATUS_SUCCESS
However RtlCheckRegistryKey only exists in ntddk.h. and does not exists
in wdm.h
This strongly hints that RtlCheckRegistryKey should NOT be used in a wdm
driver. What do other people do? Is there a wdm.h compatible alternative
to RtlCheckRegistryKey or a way of making ZwOpenKey work? Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62221
Please : Need help about Port monitor
Hello,
Sorry, because I have already ask this question but I really need help on
this topic.
I made my own port monitor, and all works fine except at the starting of the
spooler :
all my printers which are connected to the ports managed by my port monitor,
stay offline in the printer folder. I'm obliged to click manually on the menu
"Use printer online" to start printing.
Why does the print spooler indicates this state ?
Do I forget anything in my port monitor ?
I see that the print spooler can call SetPort or GetPort to retrieve
information from Ports. Is there a relationship between this function and the
behaviour that I can see.
Thanks in advance for your replies. Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62218
AttachedToDeviceObject unloaded?
Hi All.
I'm making my first steps in the File System Drivers programming world,
so this question might not be very intelligent or challenging.
I've followed the SFilter sample from IFS Kit in order to build my
driver.
In the sample, I've noticed the use of IoAttachDeviceToDeviceStack (or
IoAttachDeviceToDeviceStackSafe).
This function, if I understand correctly, is supposed to return the
actual device that is directly "below" mine in the device stack. This
device can be different from the device I was initially trying to hook,
if other devices were already layered on top of it.
Let's say I initialize the AttachedToDeviceObject member of my device's
extension with the value returned from IoAttachDeviceToDeviceStack,
like I understood I should. I Later pass my AttachedToDeviceObject
value to IoCreateFileSpecifyDeviceObjectHint .
What I couldn't figure out, is what happens if the device pointed to by
AttachedToDeviceObject, which is the one that was between me and my
target device when I hooked, gets unloaded.
Does my AttachedToDeviceObject value reference uninitialized memory,
and is therefore likely to cause a blue screen?
As I have failed to find a way to discover the next device in stack
dynamically, how can I overcome this hazard?
Someone on osronline explained to me that the filter driver that is
under mine should take care of that if it's unloaded, but I couldn't
understand how is it supposed to change the pointer in my extension
(AttachedToDeviceObject)?
any help would be greatly appreciated.
thanks. Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62210
BulkUSB driver unstable on Laptop w/XP
Hello,
I am still a relative noob in the world of device drivers. I have had
some success in the past but recently I have developed a problem that I
can't find my way through.
When I started I followed the Oney recommendations and selected a sample
driver to start from. In this case I started with the sample BulkUSB
driver source from the DDK. I adjusted the necessary block/buffer sizes
to meet my device requirements and added IOCTL ID macros until I was
able to do everything I needed. I compiled it and installed on Win2k.
[and the crowd went wild]
More recently I have replaced my development machine (the win2k laptop)
with a new a new XP laptop. I am now paying for the relative ease with
which I acquired my working DD. When I plug my device in to this laptop
I frequently but not always get the BSOD! Before I enabled legacy
support in the laptop firmware I got the BSOD whenever the device was
attached...even on reboot.
I am more prone to distrust my driver's completeness than any sort of
odd hardware incompatibilities but really I don't have a basis for that
either. I am at a loss where to go from here. I am certain that before
too long someone who has one of our devices will hit this situation. I
want to solve it before that.
I have rebuilt the driver in the XP build environment of the DDK. That
initially appeared to help but then the BSOD started re-appearing.
I can provide much more information but I don't know what is relevant
and what is not. This is a simple bulkUSB device. It has 2 endpoints
(1 out, 1 in). When I don't get the BSOD everything works pretty much
the way I want it to.
Hopefully someone here has a tip that might nudge me in the right
direction.
TIA,
Kevin Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62205
problem with virtual audio driver
Hi everybody,
I built the DDK samples related to virtual audio drivers (MSVAD). When I
install it and use it, the virtual audio driver is supposed to write to wave
files (and store them in C:\ by default) what we would normally hear (all
the played sounds).
But it only works the first time. The first played sound is well recorded
(until the end of the buffer) but then, only empty ("corrupted" according to
winamp...) wave files (44 bytes) are generated.
Any idea to solve this problem ?
Best regards,
Giuseppe Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62203
Enumerating drivers
Hi,
how can I programmatically (in any .net language) receive a list of all
network drivers bound to a network adapter?
(I need to check if some specific driver is bound to the adapter - and then
possibly (de)activate this one).
is this possible?
Thanks
Peter Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62193
About capture stream data in bda
Hi,
I wrote two bda filters (tuner/demod, and capture), but now, I puzzled
where could I capture the stream from device.
First, I thought that it should be in tuner/demod filter. So I
reviewed the generictuner, the sample with ddk, but I failed to find
any usefull information whithin it.
And I reviewed the capturesample too, it seemed that the routine
Process dealt with the stream data, but I don't know where the stream
came from.
Could you give me some instructions?
Any comments are welcome!
Advance thanks!
William Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62189
About using IoCompleteRequest and iostatus block's Status Field.
Respected sir,
I want to know as to, when I use the IoCompleteRequest
Function in the DispatchPnp Routine/Function, and that, when I also set the
IoStatus block's Status Field to STATUS_ PENDING (pending because I want to
make use of pending irp in the driver's system thread to process pnp
irp_mn_xxx minor codes), my driver don't seem to work ? I want to set the IRP
Pending Status in the Status Field of IoStatus Block, in order to make
further use of the IRP, which I already been marked as STATUS_PENDING, in my
driver's System Thread to further process IRP_MJ_XXX AND ITS MINOR CODES like
irp_mn_start_xxx etc. At the same time, I may also like to know as to, how
can I allocate IRP, when my driver is running the system thread ? Which
Function should I use (minor pnp codes like irp_mn_xxx ) to pass down the
io_resource_requirements_list to make sure that pnp manager and OS must know
the resources available thereof. How can I set the IRP in pending state and
also how can I make use of this PENDING IRP in the driver's system thread in
order to process IRP_MJ_XXX AND IRP_MN_XXX both, major and minor codes
respectively ? How can I make sure that, the default resource descriptors,
which are already been setted up by the driver will not overwritten i.e. to
protect already stored default resource information and at the same time to
store additional resource descriptors to IO_RESOURCE_REQUIREMENTS_LIST, so
that, PNP MANAGER AND OS will know about the additional resource info., that
I provided with. As it is also crucially needed in my case.
regards,
sudhanshu Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62158
Memory Mapped Files Reading and Cache Problem
Hello Gurus
I am writing a File System filter driver having Encrypt/Decrypt. I am using
filemon as an example code.
In order to solve the memory mapped file issue i have created a new
structure of FCB.
In that FCB i had specified the structure of FSRTL_COMMON_FCB_HEADER ,
SECTION_OBJECT_POINTERS and ERESOURCE for
MainResource and PagingResource.
After creating this I initialize the FSRTL_COMMON_FCB_HEADER to my
fileobject->FsContext and fileobject->SectionObjectPointer to my new
SectionObjectPointer. My new SectionObjectPOinter has all the 2 members
namely the Data,Image set to NULL. I also initialize the MainResource and
PagingResource using ExInitializeResourceLite.
I do this in my IRP_MJ_CREATE and when i recv a IRP_MJ_CLEANUP i traverse my
list for my SectionObjectPOinter and then delete the corresponding
FSRTL_COMMON_FCB_HEADER that i had allocated. Actually i keep both the
sectionobjectpointer and COmmonFCBHeader in a Link list from which i
traverse and delete it.
I actually got this by referring some of the posts in this forum. But i know
i am missing something because it does not work yet. If i create a rich text
document and then edit it and type in some new contents and then open it
again i get the garbled text i mean the encyrpted text. the same thing
happens for bmp files as well. When i click it again i get the IRP_MJ_READ
with CACHE set.Hence my ReadWrite Handler does not decyrpt it as its from
the Cache. But still it displays as Encrypted.
Any Hints on where i can be going wrong is greatly appreciated.
Thanks and Best Regards
Shal. Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62157
Errors with USB Bulk requests
When our USB function driver is used in a loop or for a long transfer of data
(MBs) on a Bulk endpoint, after a short period of time the I/O status (IRP)
returns a failure but the URB status is successful. This is after hundreds of
successful requests. The IRP errors have been STATUS_IO_DEVICE_ERROR or
STATUS_IO_TIMEOUT. The URB status is USBD_STATUS_SUCCESS in either case. In
what conditions would the Windows USB stack return these errors and the URB
be successful?
Second question, when testing for IRP error codes from a
IOCTL_INTERNAL_USB_SUBMIT_URB request, which I/O status should be tested?
IO_STATUS_BLOCK ioStatus = { 0, 0 };
PIRP irp = IoBuildDeviceIoControlRequest(...., &ioStatus);
// Boilerplate code...
ntStatus = IoCallDriver(pdx->lowerDeviceObject, irp);
if (ntStatus == STATUS_PENDING)
// Wait on event
At this point is io.Status.Status == irp->IoStatus.Status ???? If not,
which is the proper method??
Thanks,
SteveB, MCSD
Welch Allyn, Inc. Tag: FSCTL_REQUEST_BATCH_OPLOCK Tag: 62147
What is the function of this command ?
When and How to use it?