Forcing scan codes to specific character codes
I have a device with a specialized keyboard. I would like to write a filter
driver that intercepts the scan codes from some of the keys and force them to
specific character codes. The reason for this is because I don't want
localized keyboard layouts, num lock, etc to have any affect on these
specialized keys. Is this possible to do in a keyboard filter driver? If
not, how can this be done?
Thanks,
Michael Tag: MSI support Tag: 103901
Replacing DPF with WPP - what's the trick?
The toaster sample has a very nice demo that shows how one can switch
from WPP based tracing to KdPrint base tracing, just by defining/
udefining EVENT_TRACING.
The "trick" is done in the 'sources' file by defining:
RUN_WPP=$(SOURCES)\
-km\
-func:ToasterDebugPrint(LEVEL,MSG,...)
So that specially made function, ToasterDebugPrint exists even when
WPP is enabled and serves *both* KdPrint and WPP.
But so far I based my driver's tracing on the DPF, which is a *macro*,
not a func (it is basically defining _DbgPrintF).
I could have mimicked the toaster sample by defining my own driver's
ToasterDebugPrint() function, replacing each and every DPF with it,
but it seems too tedious and somewhat dumb. Surely there is a shortcut
to reuse my DPF macro, right?
How do I let WPP know about the syntax and format of the macro DPF?
A tip regarding how to go about this would be highly appreciated.
Thanks,
Don Tag: MSI support Tag: 103895
Problem: How Can I dump kernel memory never BSOD ?
Hi,
I have this problem with my device driver.
My application enumerate all kernel module, and after try to dump for
analysis.
My code seem work fine, but in a Windows 2000 Server with terminal server
and when is running an application,
my device driver crash with BSOD when try to dump the kernel module
RDPDD.dll of terminal server.
Sorry, the computer where crash don't create the minidump !!!
This is the list of device driver:
1 - (80400000) ntoskrnl.exe
2 - (80062000) hal.dll
3 - (eb410000) BOOTVID.dll (C:\WINNT\system32\BOOTVID.dll)
4 - (bffd8000) ACPI.sys
5 - (eb5c8000) WMILIB.SYS
[omissis]
109 - (a07e0000) RDPDD.dll (C:\WINNT\system32\RDPDD.dll)
110 - (eb2e8000) asyncmac.sys
111 - (b6776000) kmixer.sys
112 - (78460000) NTDLL.DLL (C:\WINNT\system32\NTDLL.DLL)
When try to dump the kernel memory of RDPDD.dll, I receive a BSOD.
Dump: RDPDD.dll Src: a07e0000 Dst: 2730048 Size: d000
The source address is a07e0000
My destination buffer (in user mode) is: 2730048
The size of dump is d000 byte
This is the code of DumpKernelMemory:
NTSTATUS DumpKernelMemory(PVOID SrcAddr, PVOID DstAddr, ULONG Size)
{
PMDL pSrcMdl, pDstMdl;
PUCHAR pAddress, pDstDddress;
NTSTATUS st = STATUS_UNSUCCESSFUL;
ULONG r;
if (MmIsNonPagedSystemAddressValid(SrcAddr) == FALSE) {
return STATUS_UNSUCCESSFUL;
}
pSrcMdl = IoAllocateMdl(SrcAddr, Size, FALSE, FALSE, NULL);
if (pSrcMdl)
{
MmBuildMdlForNonPagedPool(pSrcMdl);
pAddress = MmGetSystemAddressForMdlSafe(pSrcMdl,
NormalPagePriority);
if (pAddress)
{
pDstMdl = IoAllocateMdl(DstAddr, Size, FALSE, FALSE, NULL);
if (pDstMdl)
{
__try
{
MmProbeAndLockPages(pDstMdl, UserMode, IoWriteAccess);
pDstDddress = MmGetSystemAddressForMdlSafe(
pDstMdl, NormalPagePriority);
if (pDstDddress)
{
memset(pDstDddress, 0, Size);
for (r = 1; r < Size; r++)
{
if (MmIsAddressValid(pAddress)) *pDstDddress =
*pAddress;
pAddress++;
pDstDddress++;
}
st = STATUS_SUCCESS;
}
MmUnlockPages(pDstMdl);
}
__except(EXCEPTION_EXECUTE_HANDLER)
{
}
IoFreeMdl(pDstMdl);
}
}
IoFreeMdl(pSrcMdl);
}
return st;
}
I call DumpKernelMemory from my DeviceIoControl api.
Where's the bug ?
Thanks for your help.
Best regards
Gian Tag: MSI support Tag: 103891
Problem with USB High Speed Hub
Hi All,
I have developed a USB-Serial KMDF driver for Vista 32-bit. Everything
is working fine, but when i connect the USB-Serial device to USB High
Speed Hubs which is two level above (two High Speed Hubs), there is a
problem.
The problem is :
I connect USB flash device and USB-Serial device to the external high
speed hub. Then i connect a loop back to serial end of device, and
open a terminal application like hperterminal and type in any
character. the character is read back correctly. When i unplug the USB
flash device, the call back routine which i register for reads get
returned back with status 0xC0000001 (STATUS_UNSUCCESSFUL). Most
importantly this scenario works fine without any problems for Windows
XP.
The same scenario works fine when i use Full Speed Hubs. The USB-
Serial device is full speed device.
My question is do i need to consider anything special for USB High
Speed hub in my driver or Is this a bug in Windows Vista?
All your suggestions are appreciable.
Thank You.
Regards,
Sushma Tag: MSI support Tag: 103886
windows driver testing techniques and methods/methodology
Hi all,
My company develops windows drivers for sometime.
We are looking for techniques and methods for testing windows drivers.
We use DTM and driver verifier for that.
Are there any other methods for testing drivers? Do DTM and driver
verifier are enough?
As for techniques and methodology, can any one suggest or add links
for techniques and
Methodology when testing windows drivers?
Does Debug OS give anything than release OS version?
Thanks in advance,
Alexia. Tag: MSI support Tag: 103879
How to get autorun working in win2k?
Hi,
I have a few USB flash drives that have CDROM partitions in them with
autorun, and 1 of these autoruns work in 2K while others don't.
Assuming I have the ability to modify the contents of the CDROM
partition, how do I get all of them to work? I've looked at the
autorun.inf files, but they all seem to be pretty similar, except the
one that works is a U3 drive. Tag: MSI support Tag: 103872
NdisAcquireReadWriteLock vs NdisAcquireSpinLock
I recall seeing some time back that NdisAcquireReadWriteLock was an optimal
subsitute for NdisAcquireSpinlock. Is this still true?
I can see that the use of a read/write lock could be more optimal than a
spinlock when multiple threads are acessing gloabl resources on a read-only
basis. However, is this also true when multiple threads try to access a
global resource on a write-only basis? In this case, it would seem that the
processing overhead of using a read/write lock is >= using a spinlock.
Thanks! Tag: MSI support Tag: 103871
DDK XP Build Problem
Hi
When I want to build a project with XP DDK , I receive the error :
C:\WINDDK\2600.1106\inc\wxp\ntdef.h(1097): fatal error C1017: invalid
integer constant expression
And when I click on it , it routes me to that line in ntdef.h :
...
#if _WIN32_WINNT >= 0x0501
...
How can I resolve this issue ?
Regards Tag: MSI support Tag: 103867
Doris D and The Pins free MP3 file download
D O R I S D A N D T H E P I N S L E G A L M P 3 M U S I C
D O W N L O A D S
*Doris D and The Pins 1981*
'Doris D and The Pins - Bad Luck Honey' (http://tinyurl.com/2hm6w8)
(3:42 6.78Mb 256kbps)
'Doris D and The Pins - Dance At The Schoolyard'
(http://tinyurl.com/2d8aj3) (3:26 6.27Mb 256kbps)
'Doris D and The Pins - Dance On' (http://tinyurl.com/yszowg) (2:57
5.40Mb 256kbps)
'Doris D and The Pins - Higher and Higher' (http://tinyurl.com/29nkyw)
(3:24 6.24Mb 256kbps)
'Doris D and The Pins - I Wanna Be Loved By You'
(http://tinyurl.com/22l6xo) (2:54 5.30Mb 256kbps)
'Doris D and The Pins - Midnight' (http://tinyurl.com/24dhpq) (4:51
8.89Mb 256kbps)
'Doris D and The Pins - On The Way To Paris'
(http://tinyurl.com/252dv2) (2:35 4.72Mb 256kbps)
'Doris D and The Pins - Shine Up' (http://tinyurl.com/28k4f6) (4:38
8.49Mb 256kbps)
'Doris D and The Pins - Silver Spaceman' (http://tinyurl.com/26rpn4)
(2:52 5.25Mb 256kbps)
'Doris D and The Pins - The Marvellous Marionettes'
(http://tinyurl.com/2du6oc) (2:43 4.97Mb 256kbps)
*Shine Up 1981*
'Doris D and The Pins - Aiyo' (http://tinyurl.com/yt7l4p) (3:55 7.16Mb
256kbps)
'Doris D and The Pins - And Again' (http://tinyurl.com/23a26x) (3:47
6.94Mb 256kbps)
'Doris D and The Pins - Carrousel' (http://tinyurl.com/yvt5ps) (3:24
6.23Mb 256kbps)
'Doris D and The Pins - Everybody Is Doing Their Thing'
(http://tinyurl.com/27nvj5) (2:53 5.27Mb 256kbps)
'Doris D and The Pins - Girlfriend' (http://tinyurl.com/24682y) (3:20
6.09Mb 256kbps)
'Doris D and The Pins - Heartache' (http://tinyurl.com/2yw9sf) (3:43
6.81Mb 256kbps)
'Doris D and The Pins - If Only' (http://tinyurl.com/2x6v3d) (3:27
6.31Mb 256kbps)
'Doris D and The Pins - It's Only Make Believe'
(http://tinyurl.com/22sfog) (2:51 5.21Mb 256kbps)
'Doris D and The Pins - Let It Shine' (http://tinyurl.com/yrxmv6) (2:53
5.28Mb 256kbps)
'Doris D and The Pins - Music Is' (http://tinyurl.com/2y33we) (3:29
6.38Mb 256kbps)
'Doris D and The Pins - Starting At The End'
(http://tinyurl.com/24krgz) (4:05 7.47Mb 256kbps)
'Doris D and The Pins free MP3 song download'
(http://mp3tube.info/doris_d_and_the_pins/), 'Doris D and The Pins Shine
Up download MP3' (http://mp3tube.info/doris_d_and_the_pins/)
--
Ansh3
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------ Tag: MSI support Tag: 103863
PCI WiFi causes USB Isoch packet loss!?
Hi!
I have a good working isoch streaming driver (full speed USB, queuing up
irp/urb pairs, etc...).
I usually run 12-15hrs long tests to see if any packet loss occurs. (XP sp2)
If my PCI wireless card is disabled in device manager, or at least the WiFi
connection is disabled in network settings, the test completes without any
package loss.
If the wireless card and the wireless network connection are both enabled
(so the connection is alive), isoch packet loss occurs every two minues
(exactly 120 seconds). Sometimes every minute (exactly 60 seconds).
The packet's fail status is usually 0xC0000A00 (bad startframe) or
0xC000000F.
It means that the wireless connection (even if I don't use it at all)
interrups my USB stream every 60 or 120 secs (exactly).
When I replace the wireless card (US Robotics) with another one (Linksys),
the packet loss occurs every 10 minutes. (exactly 600 seconds)
Can anyone explain what is going on and how to avoid this?
Can I recommend any wireless or registry setting to my driver's users to
avoid wifi interruption without disabling their wifi connection?
Thanks for your attention,
Greg1X Tag: MSI support Tag: 103861
NDIS WOL and Pending Packets
Hi!
The WDK is a bit fuzzy about this, but does a miniport need to complete all
pending tx packets before completing the set request of OID_PNP_SET_POWER? I
seem to recall that there were reasons why the driver shouldn't (and perhaps
couldn't) during D0-D1 state transitions.
Also, when transitioning to D1/D2/D3, should the driver wait for all pending
rx packets to be returned?
Thanks! Tag: MSI support Tag: 103847
MS Storport KB932755 problem?
We have a storport miniport driver sitting on top of our own bus
driver. Recently after we update OS with KB932755, we're not able to
reboot. System hangs.
I've notice the problem comes from the device power IRP of the stack
never being able to reach our bus driver to complete it. Storport
seems to try to pass the IRP to our bus driver by calling
PoCallDriver(). However the IRQL is at DISPATCH when this function
being called by storport and the IRP is lost.
According to DDK document PoCallDriver() should be at
IRQL=PASSIVE_LEVEL because our bus driver reports power IRP must in
PASSIVE level by setting DO_POWER_PAGABLE.
Did I miss anything here? Can someone from MS have a comment?
Thanks,
James
-----------------------
1: kd> kv
ChildEBP RetAddr Args to Child
f78b2f34 8086d295 8ac8fd90 8ac8fcd8 ba20aa26 nt!PopPresentIrp+0x41
(FPO: [Non-Fpo])
f78b2f58 ba20aa26 8b220f18 8b220fd0 8b203a58 nt!PoCallDriver+0x19b
(FPO: [Non-Fpo])
f78b2f74 ba20aaad 8ac8fcd8 8b203a58 f7727a40 storport!
RaidAdapterDevicePowerstopAdapter+0x88 (FPO: [Non-Fpo])
f78b2f8c ba20285a b9f0b008 8b203a14 f78b2ff4 storport!
RaidAdapterDevicePowerDownSrbComplete+0x4d (FPO: [Non-Fpo])
f78b2f9c 808320f0 8b203a14 8b2039a0 00000000 storport!
RaidpAdapterDpcRoutine+0x28 (FPO: [Non-Fpo])
f78b2ff4 8088db27 f78ce83c 00000000 00000000 nt!KiRetireDpcList+0xca
(FPO: [Non-Fpo])
f78b2ff8 f78ce83c 00000000 00000000 00000000 nt!KiDispatchInterrupt
+0x37 (FPO: [Uses EBP] [0,0,1])
WARNING: Frame IP not in any known module. Following frames may be
wrong.
8088db27 00000000 0000000a 0083850f bb830000 0xf78ce83c
1: kd> !irql
Debugger saved IRQL for processor 0x1 -- 2 (DISPATCH_LEVEL) Tag: MSI support Tag: 103844
How are hotkeys handled by filter drivers?
I have a HID device that has several non-standard keys. I want to be able to
treat these similar to the hotkeys on a keyboard (like the internet, email,
search buttons, etc). How are hotkeys typically handled? Are they processed
just like an ordinary scan code? Or do you have to do something special like
you do with the power related buttons that require registering device
interfaces? How does the OS know what to do when it does receive a hotkey?
Is this determined by the driver, or is there some user mode component that
links up the hotkey with the desired action? Tag: MSI support Tag: 103840
WPP extended format specification strings
According to this page:
http://msdn2.microsoft.com/en-us/library/ms797195.aspx
WPP natively supports "%!IPV6ADDR!"
And WPP natively supports "!FLAGS!".
But, the W2K8 DDK has no support for "%!IPV6ADDR!", nor "%!FLAGS!".
In fact, several other types mentioned on the MSDN page is not supported,
e.g. "%!time!", and according to the INI file several more types are
supported that are not listed on MSDN.
If I modify the INI file to include "!FLAGS!", TraceView is quite happy.
DEFINE_SIMPLE_TYPE( FLAGS,,, "%!FLAGS!",,); // and %!FLAGS%
I don't know how to define %!IPV6ADDR!?
The two INI files, one for UNICODE and one for MBCS, are also incorrect in
its handling of %s and %S.
defaultwpp.ini (UNICODE):
Incorrect: DEFINE_FLAVOR(s, ASTR,,);
Correct: DEFINE_FLAVOR(s, WSTR,,);
TCHARUNIwpp.ini (MBCS):
Incorrect: DEFINE_CPLX_TYPE(ASTR, WPP_LOGWSTR, LPCWSTR,
ItemWString, "s", s, 0);
Correct: DEFINE_CPLX_TYPE(ASTR, WPP_LOGASTR, const char*, ItemString,
"s", s, 0);
Incorrect: DEFINE_CPLX_TYPE(WSTR, WPP_LOGASTR, const char *,
ItemString, "s", S, 0);
Correct: DEFINE_CPLX_TYPE(WSTR, WPP_LOGWSTR, LPCWSTR, ItemWString,
"s", S, 0);
Missing: DEFINE_CPLX_TYPE(ANSTR, WPP_LOGPCSTR, PCANSI_STRING,
ItemPString, "s", aZ, 0, 2);
Where can I find up to date information on what types are supported by the
W2K8 DDK tools, and up to date, and accurate, INI files?
Regards
P. Tag: MSI support Tag: 103839
3 issues: PREfast annotations in WDK 6001
I use WDK 6001 to build a user-mode app (this app was always built by DDK
since its very beginning 3 years ago).
Looks like PREfast annotations just plain do not work for such a build
(TARGETTYPE=library or TARGETTYPE=console).
Issue 1.
For instance, the documentation tells me to use __user_code; in this case.
__user_code is defined in driverspecs.h, which CANNOT be included to the
user-mode code for WDK builds, since this header file is in (WDK includes)\ddk
directory, and this directory is NOT in the include search path for the
user-mode WDK builds.
Issue 2.
More so. The __declspec("SAL_xxx") construct - like
__declspec("SAL_deref") - does not work!
It causes the "syntax error: string" compiler error. Looks like the
compiler lacks some command-line switch or some special definition in the
source to be capable of understanding the quoted string inside __declspec.
I have tried to create a trivial stupid C file and then build it using my
favourite "cl -MD -Ox file.c" command in the WDK's build env window without the
BUILD tool at all. Same result: __declspec("...") just cause _syntax_ error,
which do not care about what string is in the quotes.
What must I add to my SOURCES file for SAL annotations to work? once more -
this is user-mode code built by WDK.
Issue 3.
I have something like:
typedef struct _S
{
PUCHAR SomeData;
} S, *PS;
f(OUT S* sRet)
{
PS s;
s = (PS)MyAlloc(sizeof(S));
if( s == NULL ) fail;
s->SomeData = (PUCHAR)MyAlloc(SomeSize);
*sRet = s;
return OK;
}
and PREfast is showing me a warning 6014 about "s->SomeData" being leaked.
MyAlloc in this build is resolved to malloc.
How annotations can help to remove this warning? The code is valid and has
no memory leaks for years, being tested several times on a MFC-style debug
allocator (thus MyAlloc).
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com Tag: MSI support Tag: 103837
USB device class is CDC class - which device driver to write.
Hi
I am on a task to write a device driver for our native USB device.
Decided to use WDF model and KMDF framework.
After much effort came to know that our USB device falls under
"Communications and CDC class" (Base 0x02h) of system defined USB classes.
Being new to device driver development,
Now, I would like to take help on how to proceed further with the
development of the driver...queries like - Shall I write Function or Filter
driver ?; Does that come under KMDF or UMDF development of drivers?..etc..
Ur help is appreciated.
--
Thanks in advance,
Shankar G. Tag: MSI support Tag: 103826
Build printer driver in VS 2008
We are starting with printer driver development and we would like to use
Visual Studio 2008 as build environment. We have made some tests with DDK
6001 and almost empty project in VS 2008. Main problem is that when we add
path to DDK for additional include directories and try to build VS will
include files from \Program Files\Microsoft Visual Studio 9.0\VC\include.
Because files are the same as in DDK, but have different contents we get
300+ errors.
My question is how to setup the project so that we will be able to build
drivers?
Problems:
- add appropriate include path
- add appropriate library path
- override (disable) predefined include path - \Program Files\Microsoft
Visual Studio 9.0\VC\include
Has anyone any experience with this.
Thank you for your help
Fred Tag: MSI support Tag: 103825
IOCTL_ATA_PASS_THROUGH vs IOCTL_IDE_PASS_THROUGH (again)
I'm developing an Compactflash (CF) manipulation utility to run
under Windows/XP Pro SP2. I've run into a perplexing problem:
On my Intel ICH9R (set to AHCI mode) driver (Intel Matrix Storage driver),
IOCTL_ATA_PASS_THROUGH successfully executes a DEVICE IDENTIFY (0xEC)
IOCTL_IDE_PASS_THROUGH fails.
On my Jmicron JMB363 PATA (shows up as "Standard dual channel PCI IDE" in
device manager), it's the opposite: IOCTL_ATA_PASS_THROUGH fails,
but IOCTL_IDE_PASS_THROUGH succeeds.
Finally, on the Jmicron SATA/RAID port (this shows up under the 'SCSI/RAID
category'),
both IOCTL_IDE_PASS_THROUGH and IOCTL_ATA_PASS_THROUGH fail .
However, I found sample-code on the web for IOCTL_SCSI_PASS_THROUGH --
that works (for DEVICE IDENTIFY.) Unfortunately, I don't think the SCSI
path
supports non-standard ATA-commands (Read Long?)
Um... is this the situation with Windows XP SP2 storage drivers? Some
vendors
support some IOCTLs, and others just don't? Basically, am I going to have
to
code multiple access-methods into my Windows Compactflash utility, and do
some
convoluted decision-tree logic at runtime?
I'm going to install Windows XP Pro x64 Edition (this is supposed to be
Windows 2003
in disguise), and test if I get the same result. Tag: MSI support Tag: 103821
How can RS-232 communication in MS-DOS?
I try RS-232 communication in MS-DOS.
That system is different interrupt vector table.
I don't know about RS-232 programming in MS-DOS.
RS-232 Interrupt service and COM port base address,
and UART Setting..
I searched web pages. but I can't to searching about RS-232 communication in
MS-DOS.
information web site about the rs232? or sample code..? Tag: MSI support Tag: 103814
Combining IoCsqRemoveNextIrp with own Cancellation Routine?
I am using a CSQ in my driver. So far it works beautifully.
However, due to some constraint, even after I remove an IRP using
IoCsqRemoveNextIrp(), the time it takes to issue IoCompleteRequest()
can vary greatly.
Thus, it is possible that -- if the application (that's using this
driver) exits exactly at the moment between IoCsqRemoveNextIrp() and
IoCompleteRequest() -- the "just removed" IRP will need to be
cancelled (instead of completed as intended).
This basically calls for setting a cancel routine for the "just
removed" IRP, right?
Yes, the CSQ has its cancel routine set in IoCsqInitialize() - but
that was for the *pending* IRPs (i.e. the ones in the CSQ). Now that a
single IRP has been removed fom the CSQ and it is unknown whether it
will be completed or cancelled, it needs its own IoSetCancelRoutine(),
right?
Or did I get this wrong?
Regarding terminology, I know that both completed and cancelled use
IoCompleteRequest() and the only difference is the returned status
(STATUS_SUCCESS etc vs. STATUS_CANCELLED) but for simplicity I call
the one "completed" and the other "cancelled".
Or do I have another misconception here?
Thanks for any clarification of this (delicate) issue.
Don Tag: MSI support Tag: 103796
Newbie with Vista 32bit and driver installations
Hello
Last night "a spiritual phenomenon" propably deleted my AC97 RealTek sound
hardware codec to binary space and from there to oblivion.
As i powered my computer today all soundware drivers was gone.
I downloaded drivers to Vista form RealTek's website and everything went
seemingly well..
..until installation was in picture. "not digitally signed" "could not be
verified" "do you want to continue". Few times i pushed continue button with
same result, question "do i want to install anyway?" continued repeatedly.
Situation now is that i have 6280_Vista_APO.zip downloaded to my harddrive,
even unzipped, but installation won't succeed.
Search internet to find drivers after note that Vista wants to do so results
only to package already downloaded. Obscure error message something about
Vista/Vista 64 +t00 A...
And installation stops.
Yesterday sounds was ok, except other channels overdrive properties which
was corrected by reboot.
After all i'm satisfied with this Vista 32bit Home Basic OS but as i am from
and in Finland a question related earlier Windows experience comes to my
mind.
Am i Having A Pirate Alpha Version After All, No Concern How It Looks Like
To Be Genuine Microsoft Product. Support page with Contact Info is checked
somewehe in 2007 spring, support portal suggest to change country but
nothing else, proxed & popped?
Anyway thank's in advance.
Mika Yrjönen
Hämeenlinna
Finland
"i'm here form a bananaboat lottery, give me micro-owen, a Toyota, new TV an
nice apartment but not forgot the money. Ambubababa" Tag: MSI support Tag: 103795
NDIS 6.0 test -- 2c_oidndisrequest.wsf script terminates abnormally
I am performing NDIS 6.0 test on LAN device. During
"2c_oidsndisrequest"
test, script terminates abnormally.It gave the message "Invalid
procedure call or argument:
'Left' ".
When analysing the failure carefully observed that one of the argument
i.e "Version" will be Empty after this function call,
bDriverInfoFound =
oNDTSupp.DriverInfo(DriverName,Size,TimeStamp,Version,Checked)
So after the above function call, when this statement executed ,
HighWord = Left(Version, FirstPos-1)), the Left () function called
with Version as Empty causes the script terminated.
Any idea how to fix this problem !!!!!!
Below is the code where the script terminated. Also the NDIS test logs
provided.
2c_oidsndisrequest.wsf code;
HighWord = Left(Version, FirstPos-1) /* Here the script terminates*/
Temp1 = Left(Version, SecondPos-1)
NDIS Logs :
Variation #48 Checking if OID must be queried
Querying/Comparing return values
NdisRequest
- OpenId = 0x01010001
- OID = OID_GEN_VENDOR_DRIVER_VERSION
Vendor Driver Version Number = 65536
NdisRequest
- OpenId = 0x01010001
- OID = OID_GEN_VENDOR_DRIVER_VERSION
Vendor Driver Version Number = 65536
Variation #49 Testing OID_GEN_VENDOR_DRIVER_VERSION
[624940]NdtSupp: DriverInfo: GetFileVersionInfoSize return 0 for
C:\Windows\system32\DRIVERS\usbiad.sys.
NdisClose
- OpenId = 0x01010001
NdisClose
- OpenId = 0x01010002
NdisClose
- OpenId = 0x02010001
Variation #50 Verifing script completed successfully...
FAILED: [0] Script was terminated abnormally!
THIS COULD BE THE RESULT OF AN INTERNAL ERROR,
DELIBERATE TERMINATION OF THE WSCRIPT PROCESS OR
STOPPING THE SCRIPT WITH THE UI!
Also If i see the logs at Variation #48 it is getting the Vendor
Driver
Version Number as 65536, but fails to get at variation #49.
Please provide help immediately as I am going bald due to this
problem.
Rgds,
RK Tag: MSI support Tag: 103790
How to disable a driver programmatically from another driver
I have 2 drivers that are not directly layered on top of each other, but have
very tight coupling. If one driver gets disabled by the user, I would like
to force the other driver to be disabled as well. I know I can send messages
between the drivers using several different mechanisms. But if I get an exit
message from the other driver, how can a driver disable itself gracefully, or
alternativley disable the other driver gracefully?
Thanks,
Michael Tag: MSI support Tag: 103783
IoGetDeviceProperty on a deep PCI system crashes
I am calling IoGetDeviceProperty within the start irp. After waiting for the
irp to come back up, I call IoGetDeviceProperty with DevicePropertyAddress.
I then crash with a kernel stack overflow (double fault). I realize that the
system I am on is around 20+ pci-pci bridges deep, however the reason I am
performing such a test on a system with so many pci-pci bridges is in
anticipation of PCIe becoming more main stream and every switch consisting of
two PCI bridges.
We do build large systems for customers, but with PCI we help customers
setup their systems to have a flat topology. However, with PCIe our cabled
PCIe will have a much greater impact on PCI depth as each end contains a
switch, thus adding 4-5 PCI-PCI bridges to the tree. On these large systems,
reaching 20 deep will be pretty easy to do.
You may ask why we need location information. It is to provide slot
information in our chassis so that customers can easily identify their
devices when a system consists of multiple chassis with multiple slots.
Any help would be appreciated. Thank you. Tag: MSI support Tag: 103777
WHQL retest required ?
Hi
If we just change device name from inf file , should we retest WHQL ?
Or can we have a way to update inf file with a lower fee ?
Thank you . Tag: MSI support Tag: 103775
"Identifier not found" and shlwapi.h on WDK
I'm a beginner with driver.. help me please.
I have to develop a PScript Mini Driver and I started with oemps.
I have to check a registry key so I included <shlwapi.h> and I inserted
$(SDK_LIB_PATH)\shlwapi.lib on file SOURCES.
When I run build utility (w2k environment) I get this error:
ddihook.cpp(545) : error C3861: 'SHGetValueW': identifier not found.
I use latest WDK released (6001.18000)
What I forget to do?
Thanks in advantage Tag: MSI support Tag: 103767
can you help me to find what is the problem with this driver?
Hello,
This is not a device driver development question but I hope you can help
me to find a solution or redirect me to the correct newsgroup.
I have a Motorola RAZR V3 phone. I used to connect it to my XP computer and
sync it with my outlook.
Some days ago, I found a malware on my PC and for removing it, I did a
repair install and after that my mobile cannot be detected by windows XP.
I delete the mobile driver and re installed it without any success. when I
connect my mobile to the PC, I get a message that system is found a Motorola
V3 mobile and then a windows appears saying that it cannot install my
hardware.
How can I find what is the problem and how can I fix it?
Any help is very appreciated.
Regards Tag: MSI support Tag: 103751
ACPI Resource / PMBase Register ICH9 / Watchdog
I have been tasked with implementing a watchdog driver using the ICH9
watchdog. Until now my only experience in writing KMDF drivers were with
standard PCI devices such as the SMBus interface. However, now I am having a
tough time trying to determine exactly how to access the resource I need when
it seems to be part of the "motherboard resources" with no clear way of
accessing. I am going to run into this same problem when it comes time to
write the GPIO driver needed of future SBC's.
Has anyone had any experience in writing drivers similar to this - where the
resource within the ICH device is tucked away with no clear way to access.
Is it somehow tied to ACPI.sys ?? Tag: MSI support Tag: 103742
NDISTest 6.5 On Windows Server 2003 SP1
Hi!
Is it possible to run NDISTest 6.5 on 2003 SP1? I've been trying to run
NDISTest in server mode on a 2003 system and have not had much luck.
NDISTest appears to be trying to load ndprot60.sys and fails, which seems to
be expected.
Anybody know what I need to do?
Thanks! Tag: MSI support Tag: 103739
polliing of HID class device input endpoints
Hi,
I am developing the firmware of a low-speed HID-class device and
corresponding PC user application.
Is there any way to disable polling in an HID-class device interrupt endpoint?
The device must receive input report requests only when the user application
request it, and not continuously.
Thank you
--
Andrea Tag: MSI support Tag: 103738
UniDV and location of My Documents
I have a UniDRV based print driver that implements a rendering plugin (to use
the IPrintOemUni::ImageProcessing method to catch the image data). Normally
works fine on XP and Vista (with or without SP1).
It doesn't work though on Vista (with or without SP1) if the user's
Documents folder location is changed to a UNC path. Changing the location of
the Documents folder to a mapped network drive does not cause the problem,
but a UNC path does. (A UNC path works fine on XP).
Symptoms are that the rendering plugin is never loaded.
To reproduce simply right-click on the Documents entry in the Start menu,
select properties, then the Location tab and the Move button, and select as a
new location a folder addressed by UNC. Then print to a printer using a
UniDRV based driver that implements a rendering plugin. It won't be loaded.
Is this something I'm doing wrong, or a UniDRV problem? Any suggested
workaround?
Thanks,
Colin. Tag: MSI support Tag: 103736
UniDRV and redirection of My Documents
I have a UniDRV based driver that implements the
IPrintOemUni::ImageProcessing method in a rendering plugin. Normally works
fine in both XP and Vista. But in Vista it fails when the user's Documents
folder is changed to a location referenced by a UNC name (\\server\dir). It
is happy if the Documents folder location is changed to a mapped network
drive, but not if the same location is referenced by UNC. Relocating the My
Documents folder to a UNC on Windows XP does not exhibit the problem.
The symptoms are that the rendering plug in is never called if the Documents
folder location is changed to a UNC path.
I can't see really how this can be my code or configuration causing this, I
think it must be an issue with UniDRV.
To reproduce simply right click on Documents in the Start Menu and select
Properties then the location tab, and then select the Move button and select
a UNC named location. Then try a UniDrv based driver that implements a
rendering plug in. I don't think it will be called.
Is it something I'm doing wrong, or a bug? Is there a workaround?
Colin. Tag: MSI support Tag: 103735
retrieve driver object of a device handled by other driver
Hi.
Is there a way to get a DEVIE_OBJECT pointer of a device which is handled by
a driver that is not mine ?
my driver (WDF based) handles few devices that exist on one PCI card. The
pci-2-pci bridge device on that board(card) is handled by the pci.sys driver.
so my question is - can i get a handle to that bridge's DEVICE_OBJECT ?
the reason for i want this can be for reading PCI location info of the bridge
for example.
thanks,
Kobi. Tag: MSI support Tag: 103734
How can RS-232 communication in WDM?
How can RS-232 communication in WDM?
(Something like ReadFile(), WriteFile() in Win API32)
I'm beginning WDM programming.
I has searching DDK document.
But, I can't. I want sample code or hit and tips.
Sorry, My English is bad.
Thank you for reading. Tag: MSI support Tag: 103733
Mirror Display Driver: how to lock desktop so that only remote use
Hi all,
I have a Mirror Display driver for remote desktop like application. I want
to lock server's display while remote users are connected and seeing the
display. Like when RDP client connects, server gets locked and only remote
user can see.
Please suggest me what to do?
--
SachinS Tag: MSI support Tag: 103732
Need help writing NT4 compatible Audio and Video Drivers
Guys,
I know this should look lame for you, but I am new here and I really need a
Video and Audio Driver for my Intel G31 chipset (onboard audio and video),
and compatible with Windows NT4.
Doesn't matter how weird this looks (since its a brand new chipset and an
old OS) but that's a real need, since I can't find these driver anywhere.
Can you guys give me tips of how can I do that (I am an expert C/C++
programmer but never created a Device Driver before), or there is some easy
way to transform an Windows XP Driver in a NT4 Driver ?
Regards,
Helio Tag: MSI support Tag: 103731
FYI: New Windows Driver Kit (WDK) Documentation blog
http://blogs.msdn.com/wdkdocs/
This new blog provides timely information about the WDK and Windows Logo Kit
(WLK) documentation sets and connects Windows driver developers with the WDK
documentation team.
If you are in the Windows driver community, you can add this blog to your
RSS feed. Tag: MSI support Tag: 103724
detect if driver is already installed
Hi,
I have a driver, simple .inf.
I 'install' it, wit SetupCopyOEMInf().
At this stage, the driver is not yet fully installed, until after device is
attached to the PC and windows (XP) detects the device and maps the right
drivers for it.
I wish to programmatically detect if drivers are already fully installed
(mapped to device).
What's the most reliable way?
I'm guessing I need to enumerate all devices and find for one that has the
correct Device ID?
Any easier way? Any sample code?
Thanks!
Lisa Tag: MSI support Tag: 103721
Who is responsible for showing non-formatted media prompt?
Hi,
When I insert an unformatted flash drive in Windows Vista,
automatically a prompt about a non-formatted media appears; it
prompts
me to format the media. Is it possible to somehow turn off this
behaviour, thus we don't see any warnings/prompts? Turning off
autorun
in different ways doesn't help.
Also, I'd greatly appreciate, if someone could briefly describe the
processes, going on after inserting flash drive, in particular is any
driver responsible for appearing of the abovementioned format prompt?
I just need to programmatically turn the prompt off.
Thanks in advance,
Martin Tag: MSI support Tag: 103715
Usb Max Transfer Size
Hi,
What is the definition of USB Max Transfer Size.
In bulkusb src i noticed there are a few variable which i think related to
that
1. in bulkpnp.c: Interface->Pipe[i].MaximumTransferSize =
USBD_DEFAULT_MAXIMUM_TRANSFER_SIZE. (PAGE_SIZE)
2. in bulkusb.h BULKUSB_MAX_TRANSFER_SIZE 256,
BULKUSB_TEST_BOARD_TRANSFER_BUFFER_SIZE (64*1024)
3. in bulkusb.inf, Registry entry MaximumTransferSize, 4096
How are those three variables related?
How are they used in DispatchReadWrite,
What is the general rule in setting them in order to maximize throughput
How will those value affect ReadFile? can I request as much data as I want
here?
Regards
charly Tag: MSI support Tag: 103710
BSOD when indicating (NdisMIndicateReceiveNetBufferLists)
Hi All,
There is a BSOD when my NDIS 6 miniport driver is indicating
NET_BUFFER_LISTS. This BSOD happens only when I have wireshark
(winpcap) launched to capture packets. Does anyone know what could be
wrong with the NET_BUFFER_LIST that I indicate? The call stack looks
like the following whin it crashes
nt! RtlpBreakWithStatusInstruction
nt!KiBugCheckDebugBreak +0x1c
nt!KeBugCheck2+0x67f
nt!KiTrap0E+0x2b4
NDIS! ndisFreeConvertedPacket+0x22
NDIS! ndisXlateReturnPacketToNetBufferList+0x33
NDIS! ndisIndicateXlatedPacketsToNdis5Protocols+0x115
NDIS! ndisMDispatchReceiveNetBufferLists+0x10d
NDIS! ndisMTopReceiveNetBufferLists+0x2c
NDIS! ndisMIndicateReceiveNetBufferListsInternal+0x27
NDIS! NdisMIndicateReceiveNetBufferLists+0x20
Thanks for the help
Arun Tag: MSI support Tag: 103705
Kernel mode socket
Hi
Is TDI interface the only way to do kernel mode socket ?
Does Vista support it , if not how can we do ?
Thank you very much . Tag: MSI support Tag: 103698
Vista Inbox HDAUDIO Driver BSOD 7E ISSUE
Hi ALL
I meet a problem after install Vista Inbox hdaudio Driver and do S4
sleep Test for several times.
the Stack is:
85bb8b44 9aaac124 HdAudio!CAzCommon::SendVerb+0x1f 85bb8b70 9aaac329
HdAudio!CAzAfGroup::SendVerb+0x4c 85bb8b9c 9aab7b58
HdAudio!CAzAfGroup::SetPowerState+0x5d
85bb8bb8 999979b0 HdAudio!AzPower::PowerChangeState+0x144
85bb8bd4 81cacb3b portcls!PowerIrpCompletionRoutine+0x1bd
85bb8c08 804ed4f9 nt!IopfCompleteRequest+0x13d 85bb8c1c 804f7403
Wdf01000!FxPkgPnp::CompletePowerRequest+0x2a
85bb8c30 804f24ec Wdf01000!FxPkgPdo::PowerReleasePendingDeviceIrp+0x23
85bb8c44 804f19c2 Wdf01000!FxPkgPnp::PowerStartSelfManagedIo+0x8f
85bb8cbc 804f30ae Wdf01000!FxPkgPnp::PowerEnterNewState+0x169
85bb8ce8 804f3403 Wdf01000!FxPkgPnp::PowerProcessEventInner+0x212
85bb8cfc 804f9f34 Wdf01000!FxPkgPnp::_PowerProcessEventInner+0x26
85bb8d28 804f9fdc Wdf01000!FxEventQueue::EventQueueWorker+0x47
85bb8d30 81d8c882 Wdf01000!FxThreadedEventQueue::_WorkItemCallback+0xd
85bb8d44 81c78e18 nt!IopProcessWorkItem+0x23 85bb8d7c 81e254a8
nt!ExpWorkerThread+0xfd 85bb8dc0 81c9145e nt!PspSystemThreadStartup+0x9d
00000000 00000000 nt!KiThreadStartup+0x16
Does somebody meet same problem?
can you give some advice?
thanks very much
rech Tag: MSI support Tag: 103697
How to get device arrival and removal notification in an applicati
Hi All,
I have written an application to receive notifications for all USB device
plug-in and plug-out. I have used RegisterDeviceNotification() for
GUID_CLASS_USB_DEVICE and my application get WM_DEVICECHANGE notifications.
But, my application does not get any sort of notifications when I plug-in a
new hardware which doesn't have any drivers on my XP machine (it shows as
unknown device is device manager).
Can any one please let me know, how to get notifications for unknown
devices? I am pretty sure, there must be is a way out(Windows device manager
does it). Your help is well appreciated.
Thank you all.
-Jay Tag: MSI support Tag: 103695
About Bitmap drive source code
help me pls,
WDK sample Bitmap drive souce code give out single page BMP file, so how
can i modify that code to support multiple page BMP files.
now i m add OEMStartPage method like below, but never got any multiple
pages. still first page only comes out..
BOOL APIENTRY
OEMStartPage(
SURFOBJ *pso
)
{
//thiru
OEMDBG(DBG_VERBOSE, L"SEND page OEMEndDoc entry.");
PDEVOBJ pDevObj = (PDEVOBJ)pso->dhpdev;
POEMPDEV pOemPDEV = (POEMPDEV)pDevObj->pdevOEM;
DWORD dwWritten;
INT cScans;
if (pOemPDEV->pBufStart)
{
DWORD dwTotalBytes = pOemPDEV->cbHeaderOffBits +
pOemPDEV->bmInfoHeader.biSizeImage; // File size
pOemPDEV->bmFileHeader.bfType = 0x4d42; // Signature = 'BM'
pOemPDEV->bmFileHeader.bfSize = dwTotalBytes; // Bytes in whole file.
pOemPDEV->bmFileHeader.bfReserved1 = 0;
pOemPDEV->bmFileHeader.bfReserved2 = 0;
pOemPDEV->bmFileHeader.bfOffBits = pOemPDEV->cbHeaderOffBits; //
Offset to bits in file.
if (pOemPDEV->bColorTable)
pOemPDEV->bmFileHeader.bfOffBits += pOemPDEV->cPalColors *
sizeof(ULONG);
// Num of scanlines
//
cScans = pOemPDEV->bmInfoHeader.biHeight;
// Flip the biHeight member so that it denotes top-down bitmap
//
pOemPDEV->bmInfoHeader.biHeight = cScans * -1;
// Dump headers first
//
dwWritten = pDevObj->pDrvProcs->DrvWriteSpoolBuf(pDevObj,
(void*)&(pOemPDEV->bmFileHeader), sizeof(BITMAPFILEHEADER));
dwWritten = pDevObj->pDrvProcs->DrvWriteSpoolBuf(pDevObj,
(void*)&(pOemPDEV->bmInfoHeader), sizeof(BITMAPINFOHEADER));
if (pOemPDEV->bColorTable)
{
dwWritten = pDevObj->pDrvProcs->DrvWriteSpoolBuf(pDevObj,
pOemPDEV->prgbq, pOemPDEV->cPalColors * sizeof(ULONG));
LocalFree(pOemPDEV->prgbq);
}
// Dump the data now
//
dwWritten = pDevObj->pDrvProcs->DrvWriteSpoolBuf(pDevObj,
pOemPDEV->pBufStart, pOemPDEV->bmInfoHeader.biSizeImage);
vFreeBuffer(pOemPDEV);
}
return (pOemPDEV->m_pfnDrvStartPage)(pso);
} Tag: MSI support Tag: 103690
IOCTL_HID_READ_REPORT usage ?
Hello everyone,
I am trying to modify the report descriptor in vhidmini to report a mouse
cursor.
First I make sure that this report descriptor works properly in a USB HID
driver.
Then I checked the WDK documents on IOCTL_HID_READ_REPORT, it instructs me
to do the
following things :
(1) fill in Irp->UserBuffer with my HID_INPUT_REPORT
(2) set Irp->IoStatus.Information = sizeof ( HID_INPUT_REPORT )
(3) set Irp->IoStatus.Status = STATUS_SUCCESS
(4) call IoCompleteRequest(Irp, IO_NO_INCREMENT)
So I write the code as follows, the HID report is 5 bytes total.
=========================================================================
NTSTATUS Internal_IOCTL ( IN PDEVICE_OBJECT device , IN PIRP Irp )
{
NTSTATUS status = STATUS_SUCCESS ;
PIO_STACK_LOCATION irpStack = IoGetCurrentIrpStackLocation(Irp) ;
switch ( irpStack->Parameters.DeviceIoControl.IoControlCode )
{
case IOCTL_HID_READ_REPORT:
{
PUCHAR readReport = (PUCHAR)Irp->UserBuffer ;
readReport[0] = 0x00 ; // the mouse button , 0x00 should be no
mouse down
readReport[1] = 0x00 ; // the low part of X
readReport[2] = 0x00 ; // the high part of X
readReport[3] = 0x00 ; // the low part of Y
readReport[4] = 0x00 ; // the low part of Y
Irp->IoStatus.Information = 5 ;
Irp->IoStatus.Status = STATUS_SUCCESS ;
IoCompleteRequest(Irp, IO_NO_INCREMENT) ;
break ;
}
... // other IOCTLs code
}
return status ;
}
=========================================================================
I suppose that the cursor should be fixed at (0,0) after system loads the
driver.
However, after the driver loads, the cursor doesn't move at all.
Can anyone tell me what's wrong with my code?
Thanks :)
Best Regards,
John
2008.03.03 Tag: MSI support Tag: 103688
Hi
How to determine (having the windbg hooked up) whether Message Signaled
Interrupts are supported by the target system?