USBD_STATUS_XACT_ERROR
I have a peripheral device that has 2 Bulk endpoints (IN, OUT). The
device appears to work fine for a while but the driver will get this
error intermittently. The device state appears OK and I do not see any
packet problems. This problem generally happens during a write from
the host on the OUT endpoint.
What can cause this? How can/should I recover from this?
Thanks in advance for any help.
Jim Tag: Has anybody solved this? Tag: 101166
How to force re-enumeration of all devices
How can I get XP to re-enumerate all hardware devices, similar to what would
happen when installing the O/S, yet without requiring a re-install? Scanning
for hardware changes from Device Manager does not pick up (bind) all devices.
Thanks,
Michael Tag: Has anybody solved this? Tag: 101163
Direct connection problem in WinCE
Hi,
I am trying to establish direct connection from our COM port in WinCE
to the host which is a XP pc. I made the necessary setup on XP and on
WinCE when I make a new instance of Direct Connection for my COM port
to operate with XP with the same settings like baud rate flow control
etc... given for XP, it says " Connecting to HOST " and then "You have
been disconnected from the Remote Computer...Please verify the baud
rate setting and retry the connection".
Here I am not settingup any active sync connection.
Can any one tell me how to fix this...
Thanks in advance
Srinivas Tag: Has anybody solved this? Tag: 101156
Windows Update driver available ?
Hi,
we have succesfully passed WHQL test for a video capture device. From ou
r submission, it is indicated that Windows Update driver is available.
However, when I plug camera on a computer where camera has not been
plugged before, Vista system searchs on Windows Update but cannot find
the driver.
What must be perform to allow installation from Windows Update after the
submission processed is Ok?
Damien Tag: Has anybody solved this? Tag: 101154
Issues about USB composite device driver
I want to develop an USB composite device driver. The device has one
configuration and 6 interfaces in it.
According desription of DDK(2003 sp1, 3790.1830) documents, Windows
system(XP and later) had supplied an USB common class generic parent driver,
that is usbccgp.sys. This driver can be loaded when our device pluged in and
create 6 PDO for each interface. So we can install driver for each
interface.
But I have found some problems about this description.
1. OS can't find the usbccgp.sys driver and install it automatically for our
device. I had searched the c: partition(my system disk) but can't find the
usbccgp.sys file. My Windows system is XP sp2. Why and where can I get the
usbccgp.sys file?
2. I write a inf file and reference usbhub.sys to install driver for our
device. Yes! usbhub.sys can work! It enumrates 6 devices from our device for
each interface. Then I install drivers for each device. I can install driver
for interface number 0(matched ID is USB\VID_xxxx&PID_xxxx&MI_00) and the
driver work well. But when I try to install driver for other interface, it
failed! The failed position is when I try to select configuration for USB
device with USBD_CreateConfigurationRequestEx and submit it to host driver.
Laterly, I found some useful information from DDK document. It said that
host driver can't support selecting configuration in composite USB device.
But the problem is that where can I get the interface information and pipe
information(ep address and pipe handle etc.) if I can't get those
information from selecting configuration?
Please help me, thank you very much!
Abei.liu
12/05/2007 Tag: Has anybody solved this? Tag: 101153
WHQL certification of laptop - USB issue
Hello
I'm stuck with strange behaviour of the USB subsystem preventing
requirements for WHQL certification of a laptop with an embedded USB
device.
First things first. Here's an interesting test:
I'm experiencing a strange phenomenon with USB devices that are
surprise-removed during standby. I've seen it happening with USB hubs,
USB sticks, USB hard drives and USB 3G devices. It happens in Win2000
and WinXP. These are the steps taken:
1. Plug in one of the mentioned USB devices.
2. In Bootvis, initiate standby test.
3. During standby, unplug the USB device -> surprise-removal.
4. Resume.
5. Wait for Bootvis to finish.
In Bootvis you can see that the device driver of the unplugged USB
device eats an extra +/- 3 seconds of resume time (compared with the
resume time in a situation where you do not unplug the device). The
exact device driver depends on the USB device; I've noticed the 3
extra seconds with usbhub.sys, usbcgpp.sys, usbstor.sys, and
gt72ubus.sys (3th party 3G driver).
When you unplug multiple USB device during standby, the system eats 3
seconds for each unplugged device.
I found out that during resume from standby, the USB subsystem eats 3
seconds for each unplugged device during standby. Technically: When a
USB function driver sends down the set D0 power request for an
unplugged device, some lower-level code happily sleeps for 3 seconds
and completes the request. At this point, the USB function driver
doesn't know of the surprise-removal yet; that event happens later.
Can anyone tell me why Win2000/XP behaves like this?
So in my case:
The laptop has a built-in embedded USB function, a MiniPCIe card. The
laptop de-powers the card during standby, hence a surprise-removal
happens and resume from standby takes an extra 3 seconds. As a result,
the total resume time for this laptop takes more than 5 seconds.
The laptop needs to be WHQL-certified (logo) for WinXP. Because of the
long resume time, the laptop doesn't meet the requirements. Pretty
annoying. Any suggestions? Tag: Has anybody solved this? Tag: 101152
STATUS_UNSUCCESSFUL after calling WdfDeviceStopIdle
Hi experts,
I'm facing a problem with my KMDF USB driver when coming back from
idle (D2 power state)
My USB driver receives no IRPs (or WDFREQUESTS for that matter). Data
passes through it only via direct function calls from an NDIS miniport
on a different stack.
I've set the idle timeout to be 1 millisecond and the idle setting are
by default "off", i.e. I call WdfDeviceStopIdle as soon as the
miniport connects to USB driver
Whenever I want to go to low power state, the driver calls
WdfDeviceResumeIdle and the driver goes to D2.
All work fine until this point.
Whenever I want to restore my communication with the device I call
WdfDeviceStopIdle. In the context of the EvtDeviceSelfManagedIoRestart
(after we're in D0) I send the request.
The problem is that the requrest fails with status 0xC0000001. The
USBD status of the failure is 0x0.
Same failure occurs for both read and write request.
Same failure occurs even if the request is sent not from the context
of the EvtDeviceSelfManagedIoRestart context but rather from the
context of a dedicated workitem which is spawned from the
EvtDeviceSelfManagedIoRestart context.
I used a USB sniffer to sense what is going on when the error occurs;
I see that there are no Start of Frames (SOFs) at all!
When I increase the idle timeout to about 250 milliseconds the problem
disappears. I have no explanation for this.
I can supply the KMDF log of the failure if anyone wishes to see. I've
looked at it but saw no explanation for the failure.
What could be the reasons for this error status?
My guess is that the USB host controller hasn't resumed from the
selective suspend state although the framework has already sent me an
IoRestart event.
Please help.
Thanks,
Yoav. Tag: Has anybody solved this? Tag: 101147
USB 2.0 ISO Allways at Beginning of SOF?
Using a high-bandwidth ISO endpoint ( 3- 1024 packets), and only one USB ISO
device in system.
Question: Since the system allocates a maximum of 80% bandwidth the ISO
endpoint, is it
guaranteed that the ISO xfer (IN token) will ALWAYS occur at
the beginning of
the microframe(SOF)? So if there is a control xfer or
something else in the same microframe, at SOF the
ISO xfer is serviced first, then the remaining 20% at the
end of the microframe for the control
transfer?
I didn't see anything in the USB 2.0 spec.
Thanks
-decoder Tag: Has anybody solved this? Tag: 101139
IoCompletion and free the driver-allocated IRP
By attaching buffers for isochronous transfer with 1394 kmdf driver:
the t1394_IsochAttachBuffers function passes the IRP to next-lower driver
with
IoSetCompletionRoutine( newIrp, t1394_IsochAttachCompletionRoutine,
IsochDetachData, TRUE, TRUE, TRUE );
IoCallDriver(deviceExtension->StackDeviceObject, newIrp);
Then the driver calls t1394_IsochAttachCompletionRoutine. The
IoCompletionRoutine checks with
'if (!NT_SUCCESS(Irp->IoStatus.Status))', ;
----------------------------------------------------------------------------------------------------------------------------------
Irp->IoStatus.Status is 0x0, I think, it means STATUS_SUCCESS, so
!NT_SUCCESS(Irp->IoStatus.Status) == FALSE.
----------------------------------------------------------------------------------------------------------------------------------
jumps to end of this IoCompletionRoutine and returns
'STATUS_MORE_PROCESSING_REQUIRED'.
The t1394_IsochAttachBuffers function returns STATUS_PENDING.
So the nStatus will be stay by STATUS_PENDING forever and the application
freezes by calling GetOverlappedResult(hDevice, &overLapped, &dwBytesRet,
TRUE) function. So far I have understood...
In the msdn article about 'IoCompletion', I saw these line :
If an IoCompletion routine returns STATUS_MORE_PROCESSING_REQUIRED, the
lower driver's call to IoCompleteRequest immediately returns. In this case,
a higher-level driver will have to call IoCompleteRequest to complete the
IRP.
I found the WdfRequestCompleteWithInformation function in my source code,
but this will be call just for the case
!NT_SUCCESS(Irp->IoStatus.Status) == TRUE (I think, this is the case for
invalid parameters).
So, shouldn't be there also a WdfRequestComplete function for
!NT_SUCCESS(Irp->IoStatus.Status) == FALSE ?
thanks in advance
min Tag: Has anybody solved this? Tag: 101137
symbol path problems
1) I have symbols on network drive like u:\localsym. I can access the path
using windows explorer(win explorer first asks password and validates
password). After windows explorer access the network drive, I open windbg and
windbg gives warniong "inaccessible symbol path u:\localsym". Spelling is
correct. I dont know what is going wrong here.
2) If one of the symbol path is wrong, will windbg try to check for symbols
from other paths in symbol path or will it abondon all together? Tag: Has anybody solved this? Tag: 101132
ReadEX
Can someone explain to me how ReadEX with overlap works on wdf type driver if
works? On the wdm was simply the read function of driver return PENDING
status then process IO. On the wdf there is not return status from EvtIoRead
function and WdfRequestMarkCancelable does not causing system to return
PENDING status to ReadEX. Tag: Has anybody solved this? Tag: 101129
A simple file access monitor
hello,
I need to write a application that can monitor file/share access and
the users who did the operation. I know they are things out there
that get close to it like the FileSystemWatcher() funcion in .Net that
almost fits my needs except that it doesn't know who did the changes.
Also I don't want to user syslog because it is not designed for this
and also not really fast.
Right now all I could find on the net that could help me along was to
implement a minifilter myself.
Is it possible to find out the user who performed an operation on a
file or a share with a minifilter driver?
Best Regard and thank you for any help.
V. Tag: Has anybody solved this? Tag: 101118
Occasional performance issue with EngModifySurface
We have an application that draw an animation into a layered window as
fast as possible.
I post here because the problem is related to win32k and
EngModifySurface. Please tell me if another group is a better place
for this post.
On some hardware the animation is always fast.
On others hardware, sometimes the animation is slow, sometimes the
animation is fast. This occur immediately after the window is created.
When the window is closed and reopened (without closing the process ),
it can again be slow or fast, but this never switch after the
initialisation of the window.
I profiled the application in the two cases using Kernrate.
The logs tell us that there is more time spend in the function
EngModifySurface in win32k when the application is slow and that
something is slowing down EngModifySurface around the address
0xbf8be470 and 0xbf8be4c0. Does anyone know what happen at this
address, or a way to know it and how this could be fixed so that the
animation is always fast ?
Here is the simplified log of Kernrate in the slow case first and in
the fast case in second. All the measures were done on the same
computer.
Thank you very much for attention.
Emmanuel Caradec
* KERNRATE LOG : SLOW CASE
Time 7343 hits, 25000 events per hit --------
Module Hits msec %Total Events/Sec
intelppm 4099 10000 55 %
10247500
win32k 2649 10000 36 %
6622500 <--- This is very high
ntkrnlpa 344 10000 4 %
860000
hal 138 10000 1 %
345000
ialmdev5 64 10000 0 %
160000
===> Processing Zoomed Module win32k.sys...
----- Zoomed module win32k.sys (Bucket size = 16 bytes, Rounding Down)
--------
Percentage in the following table is based on the Total Hits for this
Zoom Module
Time 2649 hits, 25000 events per hit --------
Module Hits msec %Total Events/Sec
EngModifySurface 2568 10000 97 %
6420000 <--- This is very high
EngStretchBlt 24 10000 0 %
60000
EngDeleteSurface 9 10000 0 %
22500
EngCreateBitmap 7 10000 0 %
17500
EngModifySurface+0x8cc[0xbf8be470] , 48711, 1212 <
Disasm (-16 bytes | bucket content | +16 bytes): <--- many hits at
0xbf8be470
EngModifySurface+0x8dc[0xbf8be480] , 48712, 40 <
Disasm (-16 bytes | bucket content | +16 bytes):
EngModifySurface+0x8ec[0xbf8be490] , 48713, 20 <
Disasm (-16 bytes | bucket content | +16 bytes):
EngModifySurface+0x8fc[0xbf8be4a0] , 48714, 22 <
Disasm (-16 bytes | bucket content | +16 bytes):
EngModifySurface+0x90c[0xbf8be4b0] , 48715, 24 <
Disasm (-16 bytes | bucket content | +16 bytes):
EngModifySurface+0x91c[0xbf8be4c0] , 48716, 1270 <
Disasm (-16 bytes | bucket content | +16 bytes): <--- many hits at
0xbf8be4c0
* KERNRATE LOG : FAST CASE
OutputResults: KernelModuleCount = 133
Percentage in the following table is based on the Total Hits for the
Kernel
Time 5846 hits, 25000 events per hit --------
Module Hits msec %Total Events/Sec
intelppm 3379 10000 57 %
8447500
ntkrnlpa 803 10000 13 %
2007500
ialmdev5 789 10000 13 %
1972500
win32k 443 10000 7 %
1107500 <--- This is normal
hal 342 10000 5 %
855000
USBPORT 17 10000 0 %
42500
===> Processing Zoomed Module win32k.sys...
----- Zoomed module win32k.sys (Bucket size = 16 bytes, Rounding Down)
-------
Percentage in the following table is based on the Total Hits for this
Zoom Mode
Time 443 hits, 25000 events per hit --------
Module Hits msec %Total Events/Sec
EngModifySurface 174 10000 46 %
435000 <--- This is normal
EngStretchBlt 100 10000 26 %
250000
EngDeleteSurface 31 10000 8 %
77500
FONTOBJ_pxoGetXform 11 10000 2 %
27500
EngSetLastError 10 10000 2 %
25000
EngUnmapFontFileFD 8 10000 2 %
20000
EngFreeUserMem 8 10000 2 %
20000
EngModifySurface+0x8cc[0xbf8be470] , 48711, 14 <
Disasm (-16 bytes | bucket content | +16 bytes): <--- few hits at
0xbf8be470
EngModifySurface+0x8dc[0xbf8be480] , 48712, 7 <
Disasm (-16 bytes | bucket content | +16 bytes):
EngModifySurface+0x8ec[0xbf8be490] , 48713, 12 <
Disasm (-16 bytes | bucket content | +16 bytes):
EngModifySurface+0x8fc[0xbf8be4a0] , 48714, 19 <
Disasm (-16 bytes | bucket content | +16 bytes):
EngModifySurface+0x90c[0xbf8be4b0] , 48715, 41 <
Disasm (-16 bytes | bucket content | +16 bytes):
EngModifySurface+0x91c[0xbf8be4c0] , 48716, 17 <
Disasm (-16 bytes | bucket content | +16 bytes): <--- few hits at
0xbf8be4c0 Tag: Has anybody solved this? Tag: 101114
KMDF: Use of KeSetImportanceDpc()?
I'm writing a KMDF driver for a network device with very small paket
buffers. I transfer data from the device in DPC. Latency between
interrupt and DPC call is critical, because the DPC has to be called
within typical 250-500 microseconds after the device raises its
interrupt, else pakets are lost.
To solve this, I'd like to experiment with "KeSetImportanceDpc()".
Questions:
- I think I need to use WdfDpcWdmGetDpc(), but how do I access the
WDFDPC-handle of a DPC, which was declared indirectly with
....
WDF_INTERRUPT_CONFIG_INIT(&interruptConfig, MY_ISR, MY_DPC);
status = WdfInterruptCreate(pDeviceContext->Device,
&interruptConfig, WDF_NO_OBJECT_ATTRIBUTES,
&pDeviceContext->Interrupt);
....
?
- Where should I call KeSetImportanceDpc() ? In the ISR directly before
WdfInterruptQueueDpcForIsr()?
Thanks,
J. Hoppe, PEAK System Technik Tag: Has anybody solved this? Tag: 101113
How to record audio is playing on my app with virtual audio device ?
Hello everyone, i want to recording audio is playing on my app.
I get virtual audio driver from WDM and i installed Microsoft Virtual Audio
Device (Simple) WDM .
1. I want to copy sound from my app to this virtual audio device.
2. I want to copy sound from this device to real recording device.
Anyone can help me how i can do step1 and/or 2 with Microsoft Virtual Audio
Device (Simple) WDM ?
Must i implement copyfrom and copyto in BaseDMA.cpp ?
Many thank for any suggest. Tag: Has anybody solved this? Tag: 101112
video child device in Windows Vista
Hi !!
I want to create a video child device using video miniport in
Windows vista, so I 'm writting non pnp kernel mode driver which
creates a FDO and attaches the fdo to PDO (e.g \\Device\\Video3)
using IoAttachDeviceToDeviceStack.
Now How can i create child device for this video device ?
Thanks in Advance
Mangesh Tag: Has anybody solved this? Tag: 101111
msvcr80.dll and msvcp80.dll used in in print driver
I am developing a print driver which contains a dll which depends on
msvcp80.dll and msvcr80.dll. How do I add these dependents to my INF such
that they are managed properly? Do I need to include the manifest file
somehow? For the heck of it, I tried treating them like any other file in my
INF and was able to install the driver, but the printer failed to install,
and I received a "Resolve Partial Assembly failed for Microsoft.VC80.CRT.
Reference error message: The referenced assembly is not installed on your
system." in the event viewer. The dependency walker looks fine when examining
files in the destination user mode directory. I've had no luck finding an
answer in the MSDN or WDK docs. Tag: Has anybody solved this? Tag: 101107
slow boot windows xp
Hello,
For a couple of mounts, I'v a slow boot of windows xp on my acer
laptop 9412.
First, I thought a virus or rootkit but the tools I tried don't find
anything of important (S&D, AVG, Bitdefender, SDoctor). Starting in
save mode works better but also slow. Bootvis isn't helping me very
well. It only shows often 100% disk use during boot which I knew
already by the HD led.
Watching processes with process explorer from sysinternals, I see a
lot of interrupts during boot; around 45% CPU use during boot.
Using process monitor, I see a long file time in the file summary for
c:\$ConvertToNonresident (around 45% of total file time). I suppose
there is an NTFS problem but defragmentation doesn't help. I hope
this newsgroup has the knowledge what is the problem or what causes
it.
What is happening ? How do I solve this slow boot problem ?
In the stack summary, I see some <unknown>. I suppose that's normal ? Tag: Has anybody solved this? Tag: 101102
NtShutdownSystem Vista compatibility
Hello everyone,
I am using NtShutdowSystem in my native application which is working
great with Windows Xp and in case of Vista, it restarts system
properly but afterwards gives a "Windows Recovery Screen" (hope this
is familiar) of which if we choose "Start Windows Normally",
everything works fine.
The problem is why I am getting such a screen in Vista and not in Xp?
How can this be fixed?
Adding to above, autochk.exe in Vista does a restart without any
problem at all, so there must be some way for sure.
Thanks in advance. Tag: Has anybody solved this? Tag: 101100
Win32 API for Tape Backup
Hello all,
I am looking at creating a tape backup routing using Win32 API (CreateFile,
CreateTapePartition,WriteFile,ReadFile,...). And those function descriptions
just confuse me. One particular function: 'PrepareTape'. I just don't know
when I need to call this function. And how does I know the tape is at '
\\.\Tape0'?
regards,
Peggy Tag: Has anybody solved this? Tag: 101098
CreateFile fail to open device
I am working on a mouse filter driver which has two device objects.
One is the conventional device object shown in DDK, the other one is a
named device object transfering some data out. The question is I can
find two objects in namespace viewer but createfile() can not open the
secound named object.
Code in driver
.h
#define NT_DEVICE_NAME_STRING L"\\Device\\MIOCTL"
#define DOS_DEVICE_NAME_STRING L"\\DosDevices\\MTest" //
==Symbolic_name_string
.c
RtlInitUnicodeString(&ntDeviceName,
NT_DEVICE_NAME_STRING);
RtlInitUnicodeString(&symbolicLinkName,
DOS_DEVICE_NAME_STRING);
status = IoCreateDevice(DeviceObject->DriverObject,
sizeof(CONTROL_DEVICE_EXTENSION),
&ntDeviceName,
FILE_DEVICE_UNKNOWN,
FILE_DEVICE_SECURE_OPEN,
FALSE,
&ControlDeviceObject);
status = IoCreateSymbolicLink( &symbolicLinkName, &ntDeviceName );
Code in app
(hDevice = CreateFile( "\\\\.\\MTest",
GENERIC_READ | GENERIC_WRITE,
0,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
NULL)
The test application returns system error code #2 "can not find
file" .
Who can tell me how to open this device in filter driver? Is there
some utilities I can view the dos devices?
Thanks in advance, Tag: Has anybody solved this? Tag: 101097
Driver Problem with Canon LBP2900 Printer
Hi Folks,
Unfortunately, I encounter a problem with my brand new laser printer
Canon LBP2900. It is connected to my computer (Windows Vista) via an
USB cable and works properly as long as I am offline.
But once I go online, data transfer from the computer to the printer
will take several minutes. This phenomenon seems not to depend on the
size of the file to be printed. Pages are not printed stepwise (with
time interruptions between different pages) but in one single go once
printing is initiated. I suspected the firewall (Norton) to be
responsible for this delay. But even if I turned it off, delayed
printing did persist. I have already uninstalled the printer driver
and reinstalled when I was online with no effect on the slowed data
transfer to the printer. During data transfer, the program I want to
print from (Word, Adobe Acrobat etc.) seems to be pretty busy (task
manager will temporarily show 'Not Responding'). When I want to print
a PDF, the green status bar will rest at zero percent for ages. Then
(after several minutes) it will abruptly turn to 100%.
I would be very pleased if somebody could give me some advice here.
Thank you so much.
Regards
Ulf Tag: Has anybody solved this? Tag: 101094
some help please
Hi,
I am a newbie in the driver development and i am planning to do some
research about a project. What i need to do is to create a virtual printer.
When i print to that printer i need to show a form for some settings, after i
hit print on this form i need to save the printjob in some kind of filetype.
That's all i need to do. Can someone point me in the right direction what is
the best way to do this?
Many Thanks!
FC Tag: Has anybody solved this? Tag: 101091
SpinLock in DPC and IOCTL
Hi,
I use a spin lock to synch my IOCTLs (which can be called from several user
mode clients), and my DPC. How will the system behave in the next scenario:
IOCTL xxx has been called, and starts to run in PASSIVE_LEVEL and aquires
spin lock MyLock.
During its excecution, an interrupt has been triggered by the hardware, and
a DPC starts to run in DISPATCH_LEVEL, aquiring MyLock.
Will it waits to MyLock to be released (which means that DPC waits for IOCTL
to be completed) or will it run ignoring the lock (because its in higher
IRQL)?
Thanks,
Avi. Tag: Has anybody solved this? Tag: 101089
how can I kernel debug NDIS IM driver "passthru" example in VMWare?!
After I install the "passthru" in vmware succesfully, then connect to
vmware using windbg, and set some breakpoint on "PtReceivePacket" or
MP* functions, it simply doesn't stop there.
I use bridged mode in vmware for the NIC.
I can surf the internet in the vmware machine, does this mean that the
packet doesn't go through "passthru"??
Thanks for any reply. Tag: Has anybody solved this? Tag: 101081
Running DTM in VMWare
I tried to run the NDISTest for my CoNDIS WAN virtual virtual adapter. Since
the current NDISTest is boundaled with DTM, I need to install the DTM
controller and studio in a server in oder to run the NDISTest. What I did is
as follows.
1. Install DTM controller and studio in a server runnning a VM.
2. Install my CoNDIS Virtul WAN and DTM client in Windows XP running in
a another VM.
In the above configuration, I can create the machine pool to monitor the job
without any problem. But when I tried to create a submission, it always fail
in a few steps after running the Wizzard.
Does anybody have any experiece to run the DTM on a Vmware?
If I cannot run the DTM in the VMware, can I just run the NDISTest in the
VMWare? then how? Tag: Has anybody solved this? Tag: 101079
EvtWmiInstanceExecuteMethod OutBufferSize problem
Hello,
I wrote a driver which supports a WMI ExecuteMethod. I wrote a Vbscript
program
to test the method but the OutBufferSize in the EvtWmiInstanceExecuteMethod
is aways 5 which is not big enough for the return data. The method takes
inputs and returns parameters including and array of data.
Why is the OutBufferSize always 5 ? Is there away to tell the Swbemobject
what size I
want the Output buffer to be ? Usually the input buffer is the output buffer
from the
EvtWmiInstanceExecuteMethod point of view but I don't know how SWBemojbect
come up with a OutBuffersSize of 5. What am I doing wrong ?
vbscript and mof below
thanks in advance
--- vbscript
On Error Resume Next
Dim Locator
Dim Service
Dim Collection
Dim InstancePaths()
Dim InstanceCount
Dim CurrentInstanceIndex
Set S = CreateObject("WbemScripting.SWbemNamedValueSet")
Set Locator = CreateObject("WbemScripting.SWbemLocator")
Set Service = Locator.ConnectServer(, "root\wmi")
Service.Security_.ImpersonationLevel=3
Set Collection = Service.InstancesOf ("Microsoft_IPMI")
InstanceCount = 0
Err.Clear
for each Instance in Collection
if Err.Number = 0 Then
InstanceCount = InstanceCount + 1
ReDim Preserve InstancePaths(InstanceCount)
Set ObjectPath = Instance.Path_
InstancePaths(InstanceCount) = ObjectPath.Path
'MsgBox Instance.Path_
Else
MsgBox Err.Description
End If
next 'Instance
Err.Clear
if InstanceCount = 0 Then
MsgBox "No instances available for this class"
Else
CurrentInstanceIndex = 1
Set Instance = Service.Get(InstancePaths(InstanceCount ))
Call RequestResponse
End if
Sub RequestResponse
' Obtain an InParameters object specific to
' the IpmiInterface.RequestResponse method.
Set objInParam = Instance.Methods_("RequestResponse").inParameters
'Wscript.Echo objInParam.Properties_.Count
'Wscript.Echo objInParam.Properties_.item("RequestData").CIMType
'Wscript.Echo objInParam.Properties_.item("RequestData").Name
' Add the input parameters.
' ipmi get device id
objInParam.Properties_.item("NetworkFunction") = 6
objInParam.Properties_.item("Lun") = 0
objInParam.Properties_.item("ResponderAddress") = 32
objInParam.Properties_.item("Command") = 1
objInParam.Properties_.item("RequestDataSize") = 0
objInParam.Properties_.item("RequestData") = Array
' Call RequestResponse
Set objOutParams = Instance.ExecMethod_("RequestResponse", objInParam)
Wscript.Echo objOutParams.ReturnValue
If Error = 0 Then
Wscript.Echo "RequestResponse.Ccode =" _
& objOutParams.CompletionCode
Else
Wscript.Echo "RequestResponse error "
End If
End Sub
--- mof sniplet of method RequestResponse
[Implemented, WmiMethodId(1), Description ("" ) : amended ]
void RequestResponse(
[in,
Description("Network Function for this IPMI request.")
: amended
] uint8 NetworkFunction,
[in,
Description("Logical Unit number to send IPMI request
to") : amended
] uint8 Lun,
[in,
Description("Responder address to send IPMI request
to") : amended
] uint8 ResponderAddress,
[in,
Description("IPMI request command") : amended
] uint8 Command,
[in,
Description("Bytes for IPMI request data") : amended
] uint32 RequestDataSize,
[in,
WmiSizeIs("RequestDataSize"),
Description("IPMI request data") : amended
] uint8 RequestData[],
[out,
Description("Completion code for status of request
response") : amended,
ValueMap { "0","192","193","194","195",
"196","197","198","199","200",
"201","202","203","204","205",
"206","207","208","209","210",
"211","212","213","255",
"1..126","128..190",".." },
Values { "Command Completed Normally",
"Node Busy",
"Invalid Command",
"Command invalid for given LUN",
"Timeout while processing command",
"Out of space",
"Reservation Canceled or Invalid Reservation ID",
"Request data truncated",
"Request data length invalid",
"Request data field length limit exceeded",
"Parameter out of range",
"Cannot return number of requested data bytes",
"Requested Sensor, data, or record not present",
"Invalid data field in Request",
"Command illegal for specified sensor or record type",
"Command response could not be provided",
"Cannot execute duplicated request",
"Command response could not be provided. SDR
Repository in update mode",
"Command response could not be provided. Device in
firmware update mode",
"Command response could not be provided. BMC
initialization or initialization agent in progress",
"Destination unavailable",
"Cannot execute command. Insufficient privilege level",
"Cannot execute command. Command, or request
parameter(s), not supported in present state",
"Unspecified error",
"Device specific (OEM) completion codes",
"Standard command-specific codes",
"reserved" }
] uint8 CompletionCode,
[out,
Description("Bytes for IPMI response data. Completion
code is present in response data size.") : amended
] uint32 ResponseDataSize,
[out,
WmiSizeIs("ResponseDataSize"),
Description("IPMI response data. Completion code is
present in response data.") : amended
] uint8 ResponseData[]
);
-------------------------------- Tag: Has anybody solved this? Tag: 101078
Writing a USB device driver for a trackball
I have a mouse and a trackball on my pc. I would like the mouse to
act as normal mouse that controls the cursor. I would like the
trackball to act as a separate device which does not act like a
mouse. Right now, when I plug both in, I get two mice.
The trackball uses HID-compliant mouse driver in the device manager.
I was hoping to write a new driver and install it instead of the HID-
compliant driver. I could then use the new driver in my application
to simply read delta x and y from the trackball.
Could anyone give me some ideas on this? Is there any similar source
code that I could modify?
I open to other methods too. I examined using Raw input but ran into
so roadblocks. Tag: Has anybody solved this? Tag: 101075
no audio device
hi everybody,
I had to format a pc,"hp compaq dx2000 mt", I've downloaded all the drivers
from the hp's website for this pc's model, but the audio doesn't work.
I've the Operative System Win Xp pro, and when I go in "managment device" ,
it says "the device works properly". Instead when I go in "Sounds and Audio
Devices" in "control panel" it says "No audio device".
I've already tried to find alternative drivers in "Windows update"
uninstalling previously the hp's audio driver, but it was unable to find
anything.
Can someone help me?
Thank you very much
Alex Tag: Has anybody solved this? Tag: 101071
Printer UI Plugin
Hi,
after reading a lot of documentation about UI and rendering plug in , I
would like to know if I well understand.
with rendering plug in, I can intercept the data flow sent to te printer
through the print job , for example.
and with UI plug in, I can add property page to the print document or print
device, and store setting data into the registry.
Now, I think that I can only communicate with the printer through the
rendering plug in, and so , I wonder how to send data directly to my printer
from my UI plug in without to execute a print job.
I think I don't understand all the process of the printing.
If anyone can help me, I really appreciate.
and sorry for my poor english.
thank you Tag: Has anybody solved this? Tag: 101068
Commtimeout values
Hi all,
I need to set timeout values for readfile and writefile, the
timeout for readfile is 300milliseconds and for writefile is
20seconds.
I read the MSDN documentation, but I m not clear to specify the
timeout valuesCan any one help on this.
COMMTIMEOUTS cto;
cto.ReadIntervalTimeout = ?;
cto.ReadTotalTimeoutMultiplier=?
cto.ReadTotalTimeoutConstant =?;
cto. WriteTotalTimeoutMultiplier=?;
cto. WriteTotalTimeoutConstant =?;
Regards,
Hari Tag: Has anybody solved this? Tag: 101061
PrintMonitor GPD File
I am working on a virtual image print driver using a print monitor.
Once installed of the orientation is set in the control panel
(CP->printing preferences) it is honored just fine, however if the
orientation is set by the application at print time, it's not working.
I believe this might be something I need to change in the gpd file, but
I'm not sure, any pointers on where to start looking?
Peter Tag: Has anybody solved this? Tag: 101053
vista & 1394 virtual driver
I got 1394 virtual driver working on Windows XP SP2. I tried to use same
binary on Windows Vista. I tried to create virtual 1394 driver by sending a
request to \\.\\1394BUS0 device. Strangely I get an error "Access denied"
when I try to do CreateFile(). I dont understand what happened here. I am
using admin account.
hDevice = OpenDevice(NULL, pCurrentBusName, FALSE);
HANDLE
OpenDevice(
HANDLE hWnd,
PSTR szDeviceName,
BOOL bOverLapped
)
{
HANDLE hDevice;
DWORD dwError = SFB_SUCCESS;
if (bOverLapped)
{
hDevice = CreateFile( szDeviceName,
GENERIC_WRITE | GENERIC_READ,
FILE_SHARE_WRITE | FILE_SHARE_READ,
NULL,
OPEN_EXISTING,
FILE_FLAG_OVERLAPPED,
NULL
);
}
else
{
hDevice = CreateFile( szDeviceName,
GENERIC_WRITE | GENERIC_READ,
FILE_SHARE_WRITE | FILE_SHARE_READ,
NULL,
OPEN_EXISTING,
0,
NULL
);
}
if (hDevice == INVALID_HANDLE_VALUE)
{
dwError = GetLastError();
SFB_Print(" Failed to open device %s, error %ld \r\n", szDeviceName,
dwError);
}
return(hDevice);
} // OpenDevice
Thanks,
Raj Tag: Has anybody solved this? Tag: 101051
What does it take to get PCI bus master privileges in Vista?
I have a pair of NDIS drivers that sit on top of a bus driver that controls a PCI device.
In Vista32 one NDIS driver that sits on top of our bus driver calls
NdisMSetMiniportAttributes with the attributes flag set to
NDIS_MINIPORT_ATTRIBUTES_BUS_MASTER. I can allocate
shared memory.
In Vista64, the same driver, the same source code, the same call to NdisMSetMiniportAttributes,
with the same attributes flag set to NDIS_MINIPORT_ATTRIBUTES_BUS_MASTER,
and I CAN NOT allocate shared memory.
What other things does this NDIS driver have to do to join the 64 bit bus master club?
Thanks
-Ron- Tag: Has anybody solved this? Tag: 101043
IoCompletion
The IoCompletion function is defined :
NTSTATUS IoCompletion( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp,
IN PVOID Context );
What does IoCompletion do with the third parameter 'IN PVOID Context' ?
In MSDN, I see 'Caller-supplied pointer to driver-specific context
information, Context information must be stored in nonpaged memory', but I
couldn't find out more detail...
Can somebody explain it?
Thanks in advance,
min Tag: Has anybody solved this? Tag: 101032
Problem With Device Class GUID
Hi All,
I have developed a USB-Serial driver which installs two driver. One
under USB Controller and other under ports. I have GUID explorer
application which lists all the hardware devices. I could see my USB
device under the USB device class guid in the lists. But i could not
see the COM device under Port device class GUID (GUID_DEVCLASS_PORTS).
Can any one let me know if i am missing any initialization settings in
serial port installation?
Any help is appreciated.
Thanks and Regards,
Sushma. Tag: Has anybody solved this? Tag: 101030
Vitsa driver load reload problem
I know I've seen commants on this before but Google is just swamped with
stuff relating to 'Vista' and 'driver'.
I have a little test utility to exercise a driver I'm working on. As a
convienence, it contains buttons to spawn devcon commands to
install/update/restart my driver. The update button (via the .inf) causes
the latest build of my driver to be copied to system32\drivers and then
fires up the new code.
All this works great on XP.
On Vista, either the copy takes place and it gets overwritten by the
previous version or the copy never takes place. The automatic driver restore
monster seems to be in the game.
Is there any magic that can be applied from the command line (i.e. devcon)
to make Vista behave?
The driver is in a system defined class and is signed using a test
certificate (pending receipt of real certificate)
Thanks,
Mickey. Tag: Has anybody solved this? Tag: 101028
NdisAllocateBuffer help???
Hi,
I would like to ask a questiobn about NdisAllocateBuffer.
Whenever VirtualAddress and length are passed to this method.
Is Address's containt copied to buffer or just address is mapped to
buffer(which is returned by api).
Please sovle this small query.
--
With regards
thanks
Anand Choubey Tag: Has anybody solved this? Tag: 101025
Send User Handle to Driver
Hello
I want to send a user handle to my driver.
Try to use METHOD_BUFFERED io_ctl, but seems that the IoDeviceControl
callback function is not called, when init nInBufferSize ( DeviceIoControl
4th parameter).
What is the correct way to do that?
Thanks
Tamar Tag: Has anybody solved this? Tag: 101023
NDIS5 wrapper BSOD
I have a filter driver, which works well until a legacy driver (USB-
based network card) gets initialized. The system crashes right after
my filter driver initiates packet sending (not realy, the packet
belongs to my driver). This is my stack:
nt!DbgBreakPointWithStatus+0x4
nt!KeBugCheckEx+0xc01
nt!Kei386EoiHelper+0x28ec
usbhub+0x1d53
ndis!NdisFreeNetBufferListContext+0x460
ndis!NdisMWanSendComplete+0x1ce
ndis!NdisMSendComplete+0x4d3
FA101ND5+0x768
ndis!NdisMSendComplete+0x1833
ndis!NdisMSendComplete+0x16d8
ndis!NdisMFreeNetBufferSGList+0xfb
ndis!NdisFSendNetBufferLists+0x18
filter_driver!OriginalNdisSend+0x89
filter_driver!SendPacket+0x292
.....
Is there anything specific I should do with the packet in Vista
filter
driver before submitting it to NdisFSendNetBufferLists? If packets
are
simply relayed or if there is no legacy drivers installed, my driver
works flawlessly.
Thanks in advance,
Gene Tag: Has anybody solved this? Tag: 101022
how to use pvOut in DOCUMENTEVENT_CREATEDCPRE
Hi,
The documentation given in MSDN for pvOut variable for function
IPrintOemUI2:DocumentEvent with iEsc DOCUMENTEVENT_CREATEDCPRE is as
follows:
Pointer to a driver-supplied DEVMODE structure, which GDI uses instead
of the one supplied by the CreateDC caller. (If NULL, GDI uses the
caller-supplied structure.)
I am implementing my own ui plug in. In this plug in i am trying to
change the values of some of the public devmode member variables. I
tried assigning the new values to members variables of pvOut. Even
though the change is reflected in iEsc DOCUMENTEVENT_CREATEDCPOST, the
change is not reflected in the print job. ie if I change pvOut-
>dmDuplex to DMUP_HORIZONTAL from DMUP_SIMPLEX, the print job is still
simplex.
The above problem is observed in MSWORD and other office applications.
It works fine for notepad, adobe reader etc.
Can I any one point out the right way to store the devmode settings? Tag: Has anybody solved this? Tag: 101021
x64 driver not working with 32bit apps
I have ported a 32 bit driver to XP x64 and it works with x64 applications
like IExplorer x64. It also prints a test page successfully.
However, it will not work with any 32bit applications.
When I run Windbg with a 32bit app and envoke print, I don't see any calls
to my x64 driver like DrvEnableDriver or DrvEnablePDEV.
Any ideas as to what would cause this?
Don L. Tag: Has anybody solved this? Tag: 101010
Trust webcam wb 5400
Hi All,
I am trying to download the Vista drivers for my webcam but the download
from Trust site fails always, the file is named 15007_03.exe. Do
somebody knows where I can find it, I have found some sites but they
aren't Trust sites. Those drivers are right ? Sometimes these sites want
to be paid....
Thank you in advance. Tag: Has anybody solved this? Tag: 101009
StorPortInitializeDpc & PASSIVE_LEVEL
WDK claims:
"The StorPortInitializeDpc routine must be called during HBA initialization
from within the miniport driver's HwStorPassiveInitializeRoutine routine."
Whatâ??s the point to call StorPortInitializeDpc this way?
StorPortInitializeDpc is a wrapper over KeInitializeDpc, that can be called
at any IRQL
TIA
Andrew Tag: Has anybody solved this? Tag: 101006
upgrading DTM
We are currently running DTM from WLK 1.0a and are trying to upgrade to WLK
1.0c. The tests have to be unistalled before DTM can be uninstalled. Add /
remove tests generates the error "This action is only valid for products that
are currently installed."
Any ideas what is going on? Tag: Has anybody solved this? Tag: 100998
How to detect programmatically whether someone is using the computer
Suppose there is a Windows XP open and running some software and
somebody sits in front of PC and begin to use/interact with this
software (so creating process is not a clue). Any good idea?
I guess the only way to do it is monitorizing keyboard or GUI events.
But... is it possible to "read" the queue of events (or something like
that) from a kernelmode driver?
Keyboard aproximation seems too similar to keylogger and I would
prefer other "no so intrusive" solution.
Any suggestions are welcome
Regards,
Juli=E1n Tag: Has anybody solved this? Tag: 100994
Switching from USB to Bluetooth host
I'm trying to write a driver for a bluetooth device that is not recognized
as such by windows. However, it is recognized when it's connected to
USB. Maybe it would be possible to use Windows DDK
to connect to the device and then change the address so that the
reports get received via the bluetooth hub. I have the driver up and
running for USB and I only consider bluetooth an option if it doesn't
require a rewrite of the driver. Has someone done something similar
to this before or can anyone give me some pointers?
Best regards,
Niels Keetels Tag: Has anybody solved this? Tag: 100991
A question about I/O operation.
When I call ReadFile in user mode and it's a blocked operation, so
when the I/O completes, the ISR will schedule a DPC to signal the
completion of I/O to the I/O manager, and the I/O manager then will
copy the buffer from the driver to the user mode buffer, but how the
thread calling ReadFile become awaken?!
Will the I/O manager schedule a APC to the thread to wake up it??
If I said wrong, please feel free to correct me and give the answer
here. Thanks really!!!
Regards
Tom Tag: Has anybody solved this? Tag: 100989
DTM Testing and DriverStudio
Hello All,
We have a driver which is based on WDM model, this driver has been compiled
using driverstudio. Now we are planning to get logo for vista under
unclasssified cateogry (DTM Test).
Is it possible to get logo from driverstudio based compiled driver ? (I
asked this question as somewhere it has been mentioned that to get logo
testing, driver should be compiled using WDK)
--
Tahnks,
Nash Tag: Has anybody solved this? Tag: 100988
Using Event Object in overlapped I/O operation : GetOverlappedResult is blocked...
In 1394api.dll source code (:\WinDDK\6000\src\1394\dll\1394api\isochapi.c)
for 1394 WDM driver, there is an overlapped I/O operation for 'Isochronous
Attch Buffers'.
It creates a manual-reset event object :
------------------------------------------------------------------------
overLapped.hEvent = CreateEvent( NULL, TRUE, FALSE, NULL );
------------------------------------------------------------------------
with a ResetEvent function :
------------------------------------------------------------------------
ResetEvent(overLapped.hEvent);
------------------------------------------------------------------------
After that, it calls DeviceIoControl function with &overlapped :
------------------------------------------------------------------------
dwRet = DeviceIoControl( hDevice,
IOCTL_ISOCH_ATTACH_BUFFERS,
pIsochAttachBuffers,
ulBufferSize,
pIsochAttachBuffers,
ulBufferSize,
&dwBytesRet,
&overLapped);
------------------------------------------------------------------------
It waits for pending operation by calling GetOverlappedResult function with
:
--------------------------------------------------------------------------------------------------
if (!GetOverlappedResult(hDevice, &overLapped, &dwBytesRet, TRUE)) {
//getoverlappedresult failed, lets find out why...
dwRet = GetLastError();
TRACE(TL_ERROR, (hWnd, "IsochAttachBuffers:
GetOverlappedResult Failed!
dwRet = %d\r\n", dwRet));
}
---------------------------------------------------------------------------------------------------
Unfortunately the sample application freezes by calling GetOverlappedResult
function.
As far as I understood, GetOverlappedResult function with 'bWait = TRUE'
does not return untill the pending operation has completed.
But I can't find the 'SetEvent function' for our manual-reset event object.
Shouldn't there a SetEvent function to set the manual-reset event object
explicitly to the signaled state? Could these be the cause of application
freezing? Or did I miss something?
Can somebody explain this?
Thanks in advance,
min
p.s On DebugView, it seems that the pending operation has completed... Tag: Has anybody solved this? Tag: 100986
I have the same problem. Has anybody solved this issue?