NTFS uses least used clusters ? (Cluster durability/lifetime ?)
Hello,
Somebody believes NTFS works as follows:
When NTFS needs to write new data to the disk it finds the clusters which
have been least used.
This would ensure longer disk life.
If NTFS simply re-used the same clusters over and over and over again this
would lead to early drive failure (???).
Is there any thruth in this or is this internet/usenet myth ? Me wonders...
(It does so via a list of clusters somebody said.)
(Freeed clusters would be added to the back of the list)
(Needed clusters would be removed from the front of the list)
Thus this would automatically cycle the clusters somewhat.
Sounds plausible.
Bye,
Skybuck. Tag: Where to get NTttcp for windows 2008 server? Tag: 104090
Listing Unattached modems
Hi,
Under control panel > Phone And Modem Options -> Modems tab, you can
see modems listed, such as USB modems, even if they are not attached.
When they are not attached, the "Attached To" column will show "Not
present".
I want to create such list myself, where it shows the description
(name) and modems, even if they are not attached.
I tried:
int _tmain(int argc, _TCHAR* argv[])
{
HWND hwndParent = NULL;
HDEVINFO hDevInfo;
SP_DEVINFO_DATA sdd;
sdd.cbSize = sizeof(SP_DEVINFO_DATA);
GUID guid;
if (RPC_S_OK != UuidFromString((RPC_WSTR)_T("4D36E96D-E325-11CE-
BFC1-08002BE10318"), &guid))
return -1;
hDevInfo = SetupDiGetClassDevs(
&guid,
NULL,
hwndParent,
DIGCF_PROFILE
);
if (INVALID_HANDLE_VALUE == hDevInfo)
return -1;
TCHAR szDeviceInstanceId[MAX_PATH];
DWORD i=0;
while(SetupDiEnumDeviceInfo(hDevInfo, i, &sdd)) {
if (SetupDiGetDeviceInstanceId(hDevInfo, &sdd, szDeviceInstanceId,
sizeof(szDeviceInstanceId)/sizeof(TCHAR), NULL)) {
// insert szDeviceInstanceId to a list
}
++i;
}
SetupDiDestroyDeviceInfoList(hDevInfo);
return 0;
}
However, when I uninstall the device, the above still lists its device
id (because the driver is still present, I think). And I don't want
this.
How can I list Unattached, BUT INSTALLED devices?
Lisa Tag: Where to get NTttcp for windows 2008 server? Tag: 104081
Starting a driver
This is a basic question. Any help would be appreciated.
I've a PortCls driver (btaudio.sys) on the system and want to start
it. It appears (used DriverView utility) it is already
loaded but the sound device it represents does not appear in Control
Panel | Sound and Audio Devices | Audio & Voice
tabs.
The bluetooth stack that uses the driver seem to "start" it when I
connect to a headset for example. However, I've a situation where I
want to start this from my application.
How do I do it?
Thanks
/kmk Tag: Where to get NTttcp for windows 2008 server? Tag: 104080
Cause of Dropped HS ISO Packets?
Greetings,
I have asked this question on the usb forum and they suggested trying here:
I am trying to debug a dropped packet problem and am running out of
ideas. This is a high speed, full bandwidth, ISO IN endpoint. The driver
uses 10 URBs each with 8 3072 byte "packets" (in the microsoft URB
sense) for a total of 80 microframes worth of data.
What I am seeing is drops of individual 1024 byte packets (in the USB
sense) every so often. If I look at the stream on an Ellisys USB200 bus
analyzer, I see that the host does not send an IN token for that
particular transaction. The log looks like this:
SOF
-> IN Token
<---- DATA2 (1024 bytes)
-> IN Token
<---- DATA1 (1024 bytes)
-> IN Token
<---- DATA0 (1024 bytes)
SOF
-> IN Token
<---- DATA2 (1024 bytes)
-> IN Token
<---- DATA1 (1024 bytes)
SOF
-> IN Token
<---- DATA2 (1024 bytes)
-> IN Token
<---- DATA1 (1024 bytes)
-> IN Token
<---- DATA0 (1024 bytes)
The packets in question fail with USBD_STATUS_ISO_NOT_ACCESSED_BY_HW.
Sometimes there is a second completely empty SOF after the frame with
the single missing transaction.
So this sounds like a host problem right? Like not scheduling the URBs
far enough in advance. I have put debug messages in my URB scheduling
and completion routines and have verified that the 10 URBs are cycling
correctly and that indeed the URBs containing the failed transactions
have been sitting in the host controller driver for 80 microframes.
Furthermore, I would expect that an error caused by failure to posting a
URB far enough in advance would result in the entire URB getting missed.
Thus I would expect to see 8 3072 byte transfers to fail, not a single
1024 byte transaction. Seems as if the HC has seen enough of the URB to
fill 7 transfers and 2 transactions of the 8th transfer, it should be
able to fill the 3rd transfer.
So this makes me think it is a device problem. Perhaps the transaction
before the one that fails is in error somehow. But the bus analyzer is
not showing any transaction errors at all. Of course it is possible that
the bus analyzer is not looking for the timing error in question (should
one exist). Or perhaps it is more robust than the host controller in
some way.
This _is_ host specific in degree. On one host I see this every few
seconds across XP SP1, XP SP2 and three difference host controllers (two
different vias and a nec). On another with a ICH based controller we are
getting SURPRISE_REMOVAL messages (I have not been able to get a bus
analyzer on that machine but I suspect it is related). On others, it
happens very rarely, like every 10 minutes or so. It does not appear to
be CPU load based as different machines with similar CPU loads display
different behavior.
Has anyone seen such a thing or have a plausible explanation for what is
going on? My only guess now is some inter-packet timing error that is
sending the HC into an error state, or some interference on the host
computer is blocking out the HC driver (although I would think that at
this low level everything was done in hardware on the HC).
Any insight would be most appreciated.
Best regards,
Tom Tag: Where to get NTttcp for windows 2008 server? Tag: 104079
CreateFile failing with ERROR_ACCESS_DENIED on WDF Driver used in
We are developing an LSP to add a custom stack to an embedded XP system. The
custom stack runs as a KMDF driver with an ioctl interface.
We open the device driver to our custom stack with a CreateFile() call
whenever WSPSocket() is performed.
CreateFile() is failing with an ERROR_ACCESS_DENIED when the process
executing svchost.exe tries to open up TCP port 135 (MS-RPC?).
CreateFile() is also failing with the same error when the process executing
svchost.exe tries to open up UDP port 1900 (UPnP?).
We do not see any errors on any of the other svchost.exe procceses when they
open up sockets, for example, everything works fine for UDP port 123 (NTP?),
and we do not have any problems with any of our applications.
We initially thought that this could be a security issue, so I tried opening
up permission with WdfDeviceInitAssignSDDLString. In fact I opened up the
security descriptor to grant read/write for "everything", but still no luck.
Here it is:
"D:P(A;;GA;;;SY)(A;;GA;;;LS)(A;;GA;;;NS)(A;;GA;;;BA)(A;;GA;;;BU)(A;;GA;;;BG)(A;;GA;;;AU)(A;;GA;;;AN)(A;;GA;;;WD)(A;;GA;;;IU)(A;;GA;;;NU)(A;;GA;;;RC)"
Does anyone have any idea why the CreateFile() call for these two processes
might be failing? or what I might try to triage the problem further.
Thanks,
Tom Tag: Where to get NTttcp for windows 2008 server? Tag: 104075
STORPORT - dynamic vs basic volumes
Hi,
I see the following difference in behavior of my STORPORT miniport device.
If I treat the device as basic disk and create partitions, then on a reboot
everything
comes up ok. However, if I configure it as dynamic disk and create a
dynamic volume,
that volume comes up as missing after the machine is rebooted. An error
message is also captured in system event log, from "ddmon" service, saying
volume is not available. The volume is
marked as Failed in Disk Manager control panel; right-clicking and selecting
Re-activate brings it back to life, with the data intact.
Any ideas? Tag: Where to get NTttcp for windows 2008 server? Tag: 104074
Regarding digital signing by MS - Our own USB device
Hi,
It would be of great help if any one could answer my query.
We plan to have our Driver set(Here "Driver set" by me means 1. Usbser.sys
-windows provided 2. URSerialUSB.INF - I generated/created it to fit our USB
device functionality) digitally signed by MS so as to support VISTA.
Regarding this I have a doubt:
- Is there anything like the 'Device Class' which we mentioned in an .INF
file, should be matching the same as that of the feild supplied by USB Device
descriptor to get an digital certification ?
To be in specific, My USB Device shows baseclass as CDC -0x02; But I used
'Modem' as the Class to mention in .INF;
JFYI* : CDC is a composite device class and MODEM is one of its subclass.
Also ACM/Ports etc..are subclasses for CDC.
To consolidate my question : Will it be a issue to get digital certification
from MS to support Vista when the USB device's class is different to that of
the one which we specify in .INF file. (Given the thing that, my purpose of
accessing the USB device is working fine on Windows 2000/XP/Vista with
minimal Authentication message blocks while installation of the driver)
Ur help is appreciated.
--
Thanks in advance,
Shankar G. Tag: Where to get NTttcp for windows 2008 server? Tag: 104071
WPP (TraceView etc.) in User Mode Application - Possible?
Placing and using WPP Software Tracing in WDM drivers is easy, mainly
because the WDK documentation is remarkablely detailed and clear.
From reading the WDK documentation, I understand that a Trace Provider
can be a user mode application too, not necesarily a driver.
I would like to use WPP to analyze an application that was built using
Visual C++ 2005.
How do I do that? Where do I find information about this?
Any tip or pointer to proper documentation would be greatly
appreciated.
Thanks,
Don Tag: Where to get NTttcp for windows 2008 server? Tag: 104066
WDK 6001: PREfast bug
Here is it. KeReleaseSpinLock was added temporarily to try to get rid of
PREfast warning. Unfortunately, this does not help, and a valid sequence of 2
MS's functions causes a warning:
// !!!
713 KeReleaseSpinLock(&(Disk->SpinLock), Irql);
714 IoCompleteRequest(Irp, IO_NO_INCREMENT);
vsnap.c(714) : warning 28192: No resource of the class 'SpinLock'
can be held when this function is called. 'Disk->SpinLock' is currently held.
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com Tag: Where to get NTttcp for windows 2008 server? Tag: 104060
WDK - Retreive terminal service session from oemdll
As in the subject, there's a way to retreive terminal service session from
the renderer plug-in? Tag: Where to get NTttcp for windows 2008 server? Tag: 104056
How to use WinDbg to debug Vista?
Dear Sirs:
I get one driver source code with WDF and want to debug it.
I Setup "WindowsXP-KB835935-SP2-slp-Symbols.exe" and
"dbg_x86_6.8.4.0.msi" into my
Host PC with XP-SP2 OS. And the Target PC is with Vista
OS(UAC off).
I setup target pc by following WinDBG topic:"Boot
Parameters to Enable Debugging->
Boot Parameters to Debug with a 1394 Cable in Windows
Vista"(Channel = 1) and also
set WinDBG(Channel =1) on Host PC.
Then I copy my driver(debug mode) to Target PC to ready for
trace.
But when i run WinDBG to wait for connect , but no
connection message shows.
I try many times and then same result.
Wha't wrong with me?
Please so kindly to help me. Tag: Where to get NTttcp for windows 2008 server? Tag: 104053
How to use WinDbg to debug Vista?
Dear Sirs:
I get one driver source code with WDF and want to debug it.
I Setup "WindowsXP-KB835935-SP2-slp-Symbols.exe" and
"dbg_x86_6.8.4.0.msi" into my
Host PC with XP-SP2 OS. And the Target PC is with Vista
OS(UAC off).
I setup target pc by following WinDBG topic:"Boot
Parameters to Enable Debugging->
Boot Parameters to Debug with a 1394 Cable in Windows
Vista"(Channel = 1) and also
set WinDBG(Channel =1) on Host PC.
Then I copy my driver(debug mode) to Target PC to ready for
trace.
But when i run WinDBG to wait for connect , but no
connection message shows.
I try many times and then same result.
Wha't wrong with me?
Please so kindly to help me. Tag: Where to get NTttcp for windows 2008 server? Tag: 104052
How to use WinDbg to debug Vista?
Dear Sirs:
I have one driver source code with WDF and i try to debug it.
I setup "WindowsXP-KB835935-SP2-slp-Symbols.exe" and
"dbg_x86_6.8.4.0.msi" into my Host
PC with XP-SP2 OS. And the Target PC is Vista OS (UAC off).
I try to setup Target PC by following WinDbg topic:"Boot
Parameters to Enable Debugging ->
Boot Parameters to Debug with a 1394 Cable in Windows Vista".
(Channel = 1 )
And I also setup my windbg(Channel=1) to wait for connect.
But I try many times to do and no connect information shows.
What's wrong with me when setup to debug?
Please help me to solve.
Thanks Tag: Where to get NTttcp for windows 2008 server? Tag: 104051
Using NTTARGETFILE1 macro in driver build process
Hi,
I am using NTTARGETFILE1 macro in the sources file, to create a specific
file during driver build (through build utility). It creates the file, as
expected. But it creates the files twice. DDK says "NTTARGETFILE1 is invoked
on pass one or later passes". I think the command specified in the
makefile.inc to create the file is invoked twice ( pass 1 and at the time of
linking). Because of this unwanted second time execution of the command,
compilation takes more time. Is there anything to avoid this unwanted stuff.
Something which gets executed only once, either at the time of compilation or
at the time of linking.
I have used the macro like...
In sources file...
.
.
NTTARGETFILE1=CreateMyFile
In makefile.inc ...
.
.
CreateMyFile:
CommandToCreateTheFile
Thanks,
--
MK Tag: Where to get NTttcp for windows 2008 server? Tag: 104050
NdisMAllocateNetBufferSGList Question
The WDK says that this callback will be made at IRSL==DISPATCH. However, I'm
seeing this can be called at IRQL==PASSIVE. Here's the output from vertarget
to show the version of the OS I'm seeing this on:
Windows Kernel Version 6001 (Service Pack 1) MP (1 procs) Free x86
compatible
Product: Server, suite: Enterprise TerminalServer SingleUserTS
Built by: 6001.18000.x86fre.longhorn_rtm.080118-1840
Kernel base = 0x81617000 PsLoadedModuleList = 0x8172ec70
So, is the WDK wrong about this? Tag: Where to get NTttcp for windows 2008 server? Tag: 104047
How to load Mirror Driver when Windows Session is/about to locked?
Hi,
I am not able to load Mirror Driver when windows session is locked. So
remote remote user can't connect is Windows is locked. I want to load Mirror
Driver on connection and unload on disconnect. How can I load mirror driver
when Windows is locked?
--
SachinS Tag: Where to get NTttcp for windows 2008 server? Tag: 104043
NDIS miniport Driver - packet re-ordering
Hello,
I'm developing ndis-usb miniport driver.
If IP packet order was corrupted by any reason, Have to I re-order IP
packet?
I've reviewed the TCP / IP Layer concepts in wikipedia.org.
The doc said that TCP layer re-ordered Packets.
NDIS miniport driver isn't TCP / IP layer, so don't have to re-order
packet. right?
Best regards. Tag: Where to get NTttcp for windows 2008 server? Tag: 104032
winusb.sys
Hi, My name is Eder, I'm working on a driver with the winusb.dll, but I got
lost because I didn't find the winusb.sys on my OS. I'm using winXP and I've
already Installed de WDK 6000 wich didn't install the winusb.sys. I got the
others dll's (WinUSBCoInstaller.dll,WdfCoInstaller01005.dll) wihch are
requested for the .inf but they don't carry any information of this file so,
How can I get that file?and Can I get the latest version of WDK in this web
site and if I cannot Where can I get it? it's really driving me crazy
already. Thanks Tag: Where to get NTttcp for windows 2008 server? Tag: 104022
Intersecthandler for my audio loops for 13 times in vista when tried
I have the following issue.
My AVStream driver has 2 output pins. One is audio and the other is
video)
I tried to connect the audio pin of my AVStream based driver to the
uMedia audio decoder in Vista, it failed to connect. The
Intersecthandler for the audio is repeatedly called 13 times inspite
of successfully giving the data structure(KSDATARANGE_AUDIO) for the
Audio format and gives an error message as "No video port hardware is
available, or the hardware is not responding. 0x80040274". However it
succesfully connects in the windows XP pc.
Video connects in both the operating system successfully(Windows XP &
Vista).
Is there any change in Vista that Iam overlooking here. I have spent
2-3 days without any luck.
I am embedding the Intersecthandler code which iam using:
NTSTATUS
CCapturePin::
IntersectHandler (
IN PKSFILTER Filter,
IN PIRP Irp,
IN PKSP_PIN PinInstance,
IN PKSDATARANGE CallerDataRange,
IN PKSDATARANGE DescriptorDataRange,
IN ULONG BufferSize,
OUT PVOID Data OPTIONAL,
OUT PULONG DataSize
)
{
PAGED_CODE();
const GUID VideoInfoSpecifier =
{STATICGUIDOF(KSDATAFORMAT_SPECIFIER_VIDEOINFO)};
const GUID AudioInfoSpecifier =
{STATICGUIDOF(FORMAT_WaveFormatEx)};
ASSERT(Filter);
ASSERT(Irp);
ASSERT(PinInstance);
ASSERT(CallerDataRange);
ASSERT(DescriptorDataRange);
ASSERT(DataSize);
ULONG DataFormatSize;
//
// Specifier FORMAT_VideoInfo for VIDEOINFOHEADER
//
if (IsEqualGUID(CallerDataRange->Specifier, VideoInfoSpecifier) &&
CallerDataRange -> FormatSize >= sizeof (KS_DATARANGE_VIDEO))
{
PKS_DATARANGE_VIDEO callerDataRange =
reinterpret_cast <PKS_DATARANGE_VIDEO> (CallerDataRange);
PKS_DATARANGE_VIDEO descriptorDataRange =
reinterpret_cast <PKS_DATARANGE_VIDEO> (DescriptorDataRange);
PKS_DATAFORMAT_VIDEOINFOHEADER FormatVideoInfoHeader;
//
// Check that the other fields match
//
if ((callerDataRange->bFixedSizeSamples !=
descriptorDataRange->bFixedSizeSamples) ||
(callerDataRange->bTemporalCompression !=
descriptorDataRange->bTemporalCompression) ||
(callerDataRange->StreamDescriptionFlags !=
descriptorDataRange->StreamDescriptionFlags) ||
(callerDataRange->MemoryAllocationFlags !=
descriptorDataRange->MemoryAllocationFlags) ||
(RtlCompareMemory (&callerDataRange->ConfigCaps,
&descriptorDataRange->ConfigCaps,
sizeof (KS_VIDEO_STREAM_CONFIG_CAPS)) !=
sizeof (KS_VIDEO_STREAM_CONFIG_CAPS)))
{
DbgPrint("%s: No Match\n", __FUNCTION__);
return STATUS_NO_MATCH;
}
//
// KS_SIZE_VIDEOHEADER() below is relying on bmiHeader.biSize
from
// the caller's data range. This **MUST** be validated; the
// extended bmiHeader size (biSize) must not extend past the end
// of the range buffer. Possible arithmetic overflow is also
// checked for.
//
{
ULONG VideoHeaderSize = KS_SIZE_VIDEOHEADER (
&callerDataRange->VideoInfoHeader
);
ULONG DataRangeSize =
FIELD_OFFSET (KS_DATARANGE_VIDEO, VideoInfoHeader) +
VideoHeaderSize;
//
// Check that biSize does not extend past the buffer. The
// first two checks are for arithmetic overflow on the
// operations to compute the alleged size. (On unsigned
// math, a+b < a iff an arithmetic overflow occurred).
//
if (
VideoHeaderSize < callerDataRange->
VideoInfoHeader.bmiHeader.biSize ||
DataRangeSize < VideoHeaderSize ||
DataRangeSize > callerDataRange -> DataRange.FormatSize
) {
DbgPrint("%s: Invalid Parameter\n", __FUNCTION__);
return STATUS_INVALID_PARAMETER;
}
}
DataFormatSize =
sizeof (KSDATAFORMAT) +
KS_SIZE_VIDEOHEADER (&callerDataRange->VideoInfoHeader);
//
// If the passed buffer size is 0, it indicates that this is a
size
// only query. Return the size of the intersecting data format
and
// pass back STATUS_BUFFER_OVERFLOW.
//
if (BufferSize == 0) {
*DataSize = DataFormatSize;
DbgPrint("%s: Video - Buffer Overflow\n", __FUNCTION__);
return STATUS_BUFFER_OVERFLOW;
}
//
// Verify that the provided structure is large enough to
// accept the result.
//
if (BufferSize < DataFormatSize)
{
DbgPrint("%s: Video - Buffer too small\n", __FUNCTION__);
return STATUS_BUFFER_TOO_SMALL;
}
//
// Copy over the KSDATAFORMAT, followed by the actual
VideoInfoHeader
//
*DataSize = DataFormatSize;
FormatVideoInfoHeader = PKS_DATAFORMAT_VIDEOINFOHEADER( Data );
//
// Copy over the KSDATAFORMAT. This is precisely the same as the
// KSDATARANGE (it's just the GUIDs, etc... not the format
information
// following any data format.
//
RtlCopyMemory (
&FormatVideoInfoHeader->DataFormat,
DescriptorDataRange,
sizeof (KSDATAFORMAT));
FormatVideoInfoHeader->DataFormat.FormatSize = DataFormatSize;
//
// Copy over the callers requested VIDEOINFOHEADER
//
RtlCopyMemory (
&FormatVideoInfoHeader->VideoInfoHeader,
&callerDataRange->VideoInfoHeader,
KS_SIZE_VIDEOHEADER (&callerDataRange->VideoInfoHeader)
);
//
// Calculate biSizeImage for this request, and put the result in
both
// the biSizeImage field of the bmiHeader AND in the SampleSize
field
// of the DataFormat.
//
// Note that for compressed sizes, this calculation will probably
not
// be just width * height * bitdepth
//
FormatVideoInfoHeader->VideoInfoHeader.bmiHeader.biSizeImage =
(((D_X * D_Y * 12))/8);
FormatVideoInfoHeader->DataFormat.SampleSize = 0;
//
// REVIEW - Perform other validation such as cropping and scaling
checks
//
DbgPrint("%s: Video - successfull\n", __FUNCTION__);
return STATUS_SUCCESS;
} // End of VIDEOINFOHEADER specifier
else
if( IsEqualGUID(CallerDataRange->Specifier, AudioInfoSpecifier) &&
(CallerDataRange -> FormatSize >= sizeof
(KSDATARANGE_AUDIO)) )
{
//
// Because the only range we expose is such that it will match
// KSDATARANGE_AUDIO, it is safe to interpret the data structures as
// KSDATARANGE_AUDIO. This is due to the fact that AVStream will
have
// prematched the GUIDs for us.
//
PKSDATARANGE_AUDIO CallerAudioRange =
reinterpret_cast <PKSDATARANGE_AUDIO> (CallerDataRange);
PKSDATARANGE_AUDIO DescriptorAudioRange =
reinterpret_cast <PKSDATARANGE_AUDIO> (DescriptorDataRange);
if (DescriptorAudioRange -> MaximumChannels !=
CallerAudioRange -> MaximumChannels ||
DescriptorAudioRange -> MinimumBitsPerSample !=
CallerAudioRange -> MinimumBitsPerSample ||
DescriptorAudioRange -> MinimumBitsPerSample !=
CallerAudioRange -> MaximumBitsPerSample ||
DescriptorAudioRange -> MinimumSampleFrequency !=
CallerAudioRange -> MinimumSampleFrequency ||
DescriptorAudioRange -> MinimumSampleFrequency !=
CallerAudioRange -> MaximumSampleFrequency) {
*DataSize = sizeof (KSDATAFORMAT_WAVEFORMATEX);
DbgPrint("%s: Audio - No Match \n", __FUNCTION__);
return STATUS_NO_MATCH;
}
if (BufferSize == 0)
{
*DataSize = sizeof (KSDATAFORMAT_WAVEFORMATEX);
DbgPrint("%s: Audio - Buffer Overflow\n", __FUNCTION__);
return STATUS_BUFFER_OVERFLOW;
}
if (BufferSize < sizeof (KSDATAFORMAT_WAVEFORMATEX))
{
DbgPrint("%s: Audio - Buffer too small\n", __FUNCTION__);
return STATUS_BUFFER_TOO_SMALL;
}
PKSDATAFORMAT_WAVEFORMATEX WaveFormat =
reinterpret_cast <PKSDATAFORMAT_WAVEFORMATEX> (Data);
RtlCopyMemory (
&WaveFormat -> DataFormat,
&DescriptorAudioRange -> DataRange,
sizeof (KSDATAFORMAT)
);
WaveFormat -> WaveFormatEx.wFormatTag = 0x00FF;
WaveFormat -> WaveFormatEx.nChannels =
(WORD)DescriptorAudioRange -> MaximumChannels;
WaveFormat -> WaveFormatEx.nSamplesPerSec =
DescriptorAudioRange -> MaximumSampleFrequency;
WaveFormat -> WaveFormatEx.wBitsPerSample =
(WORD)DescriptorAudioRange -> MaximumBitsPerSample;
WaveFormat -> WaveFormatEx.nBlockAlign =
(WaveFormat -> WaveFormatEx.wBitsPerSample / 8) *
WaveFormat -> WaveFormatEx.nChannels;
WaveFormat -> WaveFormatEx.nAvgBytesPerSec =
WaveFormat -> WaveFormatEx.nBlockAlign *
WaveFormat -> WaveFormatEx.nSamplesPerSec;
WaveFormat -> WaveFormatEx.cbSize = 0;
WaveFormat -> DataFormat.SampleSize =
WaveFormat -> WaveFormatEx.nBlockAlign;
*DataSize = sizeof (KSDATAFORMAT_WAVEFORMATEX);
DbgPrint("%s: Audio successfull\n", __FUNCTION__);
return STATUS_SUCCESS;
}
DbgPrint("%s: last no match \n", __FUNCTION__);
return STATUS_NO_MATCH;
}
Please check the code and let me know what specific change is required
in vista. It works fine with the Windows XP.
Regards
Imtiaz Ahmed Tag: Where to get NTttcp for windows 2008 server? Tag: 104021
Memory got expired
Hi,
My driver reports the error STATUS_INSUFFICIENT_RESOURCES during some
operation and asserted. The !vm shows like this:
3: kd> !vm
...............
NonPagedPool Usage: 39462 ( 157848 Kb)
NonPagedPool Max: 65536 ( 262144 Kb)
PagedPool 0 Usage: 3120 ( 12480 Kb)
PagedPool 1 Usage: 9448 ( 37792 Kb)
PagedPool 2 Usage: 9467 ( 37868 Kb)
PagedPool 3 Usage: 9457 ( 37828 Kb)
PagedPool 4 Usage: 9468 ( 37872 Kb)
********** Excessive Paged Pool Usage *****
PagedPool Usage: 40960 ( 163840 Kb)
PagedPool Maximum: 40960 ( 163840 Kb)
********** 1359644 pool allocations have failed **********
Shared Commit: 1214 ( 4856 Kb)
Special Pool: 0 ( 0 Kb)
Shared Process: 3330 ( 13320 Kb)
PagedPool Commit: 40960 ( 163840 Kb)
Driver Commit: 6423 ( 25692 Kb)
Committed pages: 181793 ( 727172 Kb)
Commit limit: 956787 ( 3827148 Kb)
...............
So my questions are:
1. Even though PagedPool is reached its maximum limit, why don't the pages
getting paged out (around 3GB space is still available in pagefile.sys to
commit) and continue?
2. Is there any command in Windbg to find out the total memory usage of
kernel (out of 2GB) from dump file?
NB: Could not able to reproduce the issue with Driver Verifier and !poolused
also not giving anything abnormal.
Thanks,
Deepakumar Tag: Where to get NTttcp for windows 2008 server? Tag: 104015
DIFx 2.1: DPInst.exe and 'Welcome to the Found New Hardware Wizard' problem
Hello DIFx team members,
I´ve just tried to use DPInst.exe v2.1 to install my signed driver packages
with Windows XP SP2.
Here is my problem:
DPInst.exe does not continue installing the driver packages until the
'Welcome to the Found New Hardware Wizard'
dialog will be closed.
I did not encounter this problem using DIFxAPI instead.
Do you know why? Is there a solution or is it as designed?
Thanks
Nick Tag: Where to get NTttcp for windows 2008 server? Tag: 104014
Capture Dbgview Message From Win32 Applications
Hi all,
Is there a way to capture prints sent to Dbgview from drivers?
I want to create a win32 app which captures the messages prefered in
C#.
thanks. Tag: Where to get NTttcp for windows 2008 server? Tag: 104010
DebugView Can't work at Vista?
Dear Sir:
I try to add below code to my driver source, and add sys to
vista.
But No Message output. What's wrong with me?
Please help me to solve it.
//----------------------------------------------------------------------------------------------------------------------//
ULONG DebugLevel = TRACE_LEVEL_INFORMATION;
ULONG DebugFlag = DBG_INIT|DBG_PNP|DBG_POWER|DBG_CREATE_CLOSE|
DBG_IOCTLS|DBG_WRITE|DBG_READ|DBG_DPC|DBG_INTERRUPT|DBG_HW_ACCESS;
VOID
SerialDbgPrintEx (
IN ULONG TraceEventsLevel,
IN ULONG TraceEventsFlag,
IN PCCHAR DebugMessage,
...
)
{
#if DBG
#define TEMP_BUFFER_SIZE 1024
va_list list;
CHAR debugMessageBuffer [TEMP_BUFFER_SIZE];
NTSTATUS status;
va_start(list, DebugMessage);
if (DebugMessage) {
status = RtlStringCbVPrintfA( debugMessageBuffer,
sizeof(debugMessageBuffer),
DebugMessage,
list );
if(!NT_SUCCESS(status)) {
KdPrint((_DRIVER_NAME_": RtlStringCbVPrintfA failed %x\n",
status));
return;
}
if (TraceEventsLevel < TRACE_LEVEL_INFORMATION ||
(TraceEventsLevel <= DebugLevel &&
((TraceEventsFlag & DebugFlag) == TraceEventsFlag))) {
KdPrint((debugMessageBuffer));
}
}
va_end(list);
return;
#else
UNREFERENCED_PARAMETER(TraceEventsLevel);
UNREFERENCED_PARAMETER(TraceEventsFlag);
UNREFERENCED_PARAMETER(DebugMessage);
#endif
}
and
I call
SerialDbgPrintEx(TRACE_LEVEL_INFORMATION, DBG_PNP, "-->
SerialEvtDeviceAdd\n");
but NO message shows on DebugView Tag: Where to get NTttcp for windows 2008 server? Tag: 104008
getting the device path / device handle of a specific device
Hi,
I'm trying to write an application which returns me a handle to a
device in C#. I already got most of the information needed for this
purpose, like the DeviceInfoSet (as IntPtr), the SP_DEVINFO_DATA
struct, the device name, ... But the final step, calling
SetupDiEnumDeviceInterfaces() to retrieve the SP_DEVICE_INTERFACE_DATA
struct fails. Extraction from my code:
//get device info set for the device class
_deviceInfoSet = SetupDiGetClassDevs(ref _guids[0], 0,
IntPtr.Zero, DIGCF_PRESENT);
if (_deviceInfoSet.ToInt32() == -1)
if (!res) { //device information is unavailable:
_deviceName = new StringBuilder("");
_errorcode = -3; return;
}
//_deviceInfoData.cbSize = (uint)
Marshal.SizeOf(_deviceInfoData);
_deviceInfoData.cbSize = 28;
_deviceInfoData.DevInst = 0;
_deviceInfoData.ClassGuid = System.Guid.Empty;
_deviceInfoData.Reserved = 0;
res = SetupDiEnumDeviceInfo(_deviceInfoSet, _deviceIndex,
_deviceInfoData);
if (!res) { //no such device:
SetupDiDestroyDeviceInfoList(_deviceInfoSet);
_deviceName = new StringBuilder("");
_errorcode = -1; return;
}
// code for get the device name by calling
SetupDiGetDeviceRegistryProperty() ....
/* ok till here */
SP_DEVICE_INTERFACE_DETAIL_DATA diDetail = new
SP_DEVICE_INTERFACE_DETAIL_DATA();
//diDetail.cbSize = (uint) Marshal.SizeOf(diDetail);
if (IntPtr.Size == 8)
diDetail.cbSize = 8;
else
diDetail.cbSize = 5;
uint size1 = 0;
// get Buffer Size
bool check =
SetupDiGetDeviceInterfaceDetail(_deviceInfoSet, ref _deviceInfoData,
IntPtr.Zero, 0, out size1, IntPtr.Zero);
check =
SetupDiGetDeviceInterfaceDetail(_deviceInfoSet, ref _deviceInfoData,
ref diDetail, size1, out size1, IntPtr.Zero);
SetupDiGetDeviceInterfaceDetail() always returns false, and size1
stays '0'. What am I doing wrong?
Or is there an other way in getting the device path? Maybe there is a
function returning the device path when passing the DevInst or
Reserved field from SP_DEVINFO_DATA?
Other ways I tried:
retrieving the device ID by calling CM_Get_Device_ID(); but till now I
haven't a way how to get the device path by device ID.
IoGetDeviceProperty(); but I don't know how to get PDEVICE_OBJECT
(marshalled as IntPtr) as I don't know in which .dll
IoGetDeviceObjectPointer() can be found (WineHQ tells me something
about 'ntoskrnl.dll' which cannot be found on my WinXP system; so I
tried 'ntoskrnl.exe' but got an AccessViolationException with the
explanation "Attempted to read or write protected memory. This is
often an indication that other memory is corrupt.")
As you see, I tried a lot of different ways, but couldn't find the
proper solution. Can you help me?
Thanks a lot
Christian Dankl Tag: Where to get NTttcp for windows 2008 server? Tag: 104007
ActiveMovieWindow blinks in GraphEdit
I modified the avshws to support splitter. it's can run. but it have blink on
the window which is connected to the second instance pin.
the code is as follows:
NTSTATUS
CCapturePin::
Process (
)
{
PAGED_CODE();
NTSTATUS Status = STATUS_SUCCESS;
PKSSTREAM_POINTER Leading;
if(this->m_Pin->ClientState >= KSSTATE_PAUSE )
{
PKSPIN pinCopySource = NULL;
PKSPIN pinDelegateBranch = NULL;
KsPinGetCopyRelationships(this->m_Pin,
&pinCopySource,
& pinDelegateBranch);
if( pinCopySource == NULL && pinDelegateBranch == NULL)
{
... //original code of avshws
}
else
{
return STATUS_SUCCESS;
}
} Tag: Where to get NTttcp for windows 2008 server? Tag: 104003
ddk build hierarchy question
Hi,
as i understand the "dirs" file for the build utility should contain only
subdirectories (with the location of "dirs" file as the root) and not
"../SomeDir".
assuming that i have a kind of common library (common drivers routines that
i created) to be used for several drivers ( to be used = to be compiled and
linked with that lib) and the lib's sources are located above my "dirs" file
(my drievrs sources) on the file system. since i can't use "../SomeDir" in my
"dirs" file, what options do i have in order to be linked with that lib ?
must i create a link from a subdirectory to this directory ? must i build
each seperatly ?
thanks. Tag: Where to get NTttcp for windows 2008 server? Tag: 104002
How to get a hub's MAC address
I have a hub ( NetGear DS108). I need know this hub's MAC address.
Because this hub has no driver I have no idea to get it.
Thanks!
Geo Tag: Where to get NTttcp for windows 2008 server? Tag: 103994
Installer Driver Selection and Ranking
We have a driver for a 1394 IIDC camera. Windows, in the image.inf
file, has a default driver (listing only the compatible hardware ids)
for this device. Without going through WHQL certification, how do we
get Windows to install our camera driver by default in 2000, XP, and Vista?
We're most concerned with the signature score part of the ranking. Our
identifier score for the camera is a 0, so obviously that is not a problem.
Currently we're looking at purchasing an Authenticode certificate,
though we'd like to confirm that the Authenticode signature will be
enough to lower our signature score so that our driver is chosen as
default. The documentation is not clear on whether a WHQL signature
combined with a compatible hardware id is a better or worse match than
an Authenticode signature combined with matching hardware ids.
Also we're looking at modifying our class coinstaller to handle the
DIF_SELECTBESTCOMPATDRV and DIF_SELECTDEVICE requests. Does our
coinstaller have to be signed in order to handle these requests?
Thanks,
Drew Tag: Where to get NTttcp for windows 2008 server? Tag: 103985
Filtering power button
I need to filter the power button press. I was able to determine which ACPI
device is registering GUID_DEVICE_SYS_BUTTON. I took the kmdf toaster filter
driver sample from the WDK and tried to install it. I added an UpperFilters
entry in
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Enum\ACPI\PNP0C0C\2&daba3ff&0.
When I rebooted, the filter driver loaded about 50 instances, but AddDevice
was never called. So I tried installing as a class filter by creating and
UpperFilters entry in
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Class\{4D36E97D-E325-11CE-BFC1-08002BE10318}.
This is the "System" class. But when I boot I get the following crash:
INACCESSIBLE_BOOT_DEVICE (7b). What is the correct why to install a filter
driver on an ACPI device that supports GUID_DEVICE_SYS_BUTTON?
Thanks,
Michael Tag: Where to get NTttcp for windows 2008 server? Tag: 103982
Is there any better way getting checked build inbox driver for Windows?
I would get checked build inbox driver for debugging purpose.
Do I need to install the checked build OS and then get the checked build
driver?
Does Microsoft provide website for checked build driver download?
Best Regards
Jack Huang Tag: Where to get NTttcp for windows 2008 server? Tag: 103977
How to replace inbox driver in Vista?
I would replace free build acpi.sys with checked build acpi.sys in Vista.
I always get access denied error.
How should I do to replace inbox driver in Vista?
Best Regards
Jack Huang Tag: Where to get NTttcp for windows 2008 server? Tag: 103976
IA64 bit driver
Hi,
I have a transport driver and a application which runs on that.This
transport driver checks whether the connection between 2 systems are up so
that data can be transferred.My driver and application works fine in x86 and
x64 machines.It fails in IA64.
when I tried debugging the application using windbg I get the following
stack trace.
0:001> kb
RetAddr : Args to Child
: Call Site
00000000`77b3fbc0 : 00000000`77b3fba0 c0000000`0000040c 00000000`6b270000
00000000`6b00a880 : ntdll!EtwpGetTraceBuffer+0xefd98
00000000`00000000 : 00000000`00000000 00000000`00000062 00000000`00000001
00000000`00000000 : ntdll!EtwpGetTraceBuffer+0x89f0
I saw an exception when my code was running and I did a break when the
exception was thrown and got the following message.
Wed Mar 12 19:04:17.048 2008 (GMT+6): (e50.60c): Unknown exception - code
000006d9 (first chance)
Wed Mar 12 19:04:19.068 2008 (GMT+6): (e50.540): Break instruction exception
- code 80000003 (first chance)
ntdll!EtwpGetTraceBuffer+0xefd98:
00000000`77c26f68 break.i 0x80016
I dont infer anything from this stack.Do anybody overthere get anything from
this call stack.
Thanks in advance Tag: Where to get NTttcp for windows 2008 server? Tag: 103971
Ethernet Driver is not getting loaded after a shutdown
Hello all,
I have a strange problem. My ndis ethernet driver gets loaded on
windows XP only after reboot. More specifically it is not getting
loaded after every shutdown. Device manager is showing resource
conflict. But i couldnt find any memory or irq conflict from device
manager. (Here if we uninstall the driver and try to scan the
hardware, it is not getting detected.)And also it works well if we
restart it. Without my driver, hardware is always getting detected
irrespective of whether it was a restart or a shutdown(Eventhough is
is getting detected if we install the driver ,it will ask for restart
if it was shut down previously ,otherwise not.). Driver is not having
any dependency problem. inf file also doesnt seem to be causing any
problem. Windows event log says that "service cannnot be started. it
is disabled since it has no enabled device associated with it." . If
this is the case, how come this situation changes, when we restart the
system. Or is this a hardware problem. Why is it not being enabled
after a shutdown.
Looking forward for your responses.
With Best Regards
Subhash Tag: Where to get NTttcp for windows 2008 server? Tag: 103969
about SCSI driver DTM test issue
hi guys!
now ,i am develop SCSI driver,after build a *.sys , install it on Windows
and run ok,but when i test DTM and run reboot functions,such as "sleep stress
with IO,disable enable with IO", failed and computer crashed and reboot
failure, i havenot ideas for it,so please help!
thanks a lot!
fax Tag: Where to get NTttcp for windows 2008 server? Tag: 103967
WDK windows server 2008 RTM downloaded, only 1 readme.txt
it says:
This disc contains a "UDF" file system and requires an operating system
that supports the ISO-13346 "UDF" file system specification.
Why? I use MS FTP manager downloading it.
TIA Tag: Where to get NTttcp for windows 2008 server? Tag: 103964
VFW Driver on Server 2008
There appears to be a new behavior on Server 2008 for a driver registered
with an MSVIDEO entry under the Drivers32 section of the registry. Previous
OS versions allowed parameters to be passed to the driver open (DRV_OPEN
message) after the dll name. S2K8 appears to be using the entire string as
the dll name.
Is there a syntax that allows for the dll name on the MSVIDEO REG_SZ data to
be followed with parameters?
Yes, I know VFW is not supported, but aside from the MSVIDEO change, my
driver works fine.
Thanks,
Harry Tag: Where to get NTttcp for windows 2008 server? Tag: 103961
How to Uninstall PNP and LowerFilter driver.
Our application installs a PnP driver which depends on a storage filter
driver configured as a lower filter. When we attempt to uninstall the PnP
device via Device Manager and choose to delete the binaries, Vista 64 reports
that the filter driver is not signed at boot time. Both drivers have valid
WHQL cat files and were installed via a single INF from an MSI file.
Is there any information on how we can configure/register the drivers and be
able to remove them via Device Manager and/or by an application? Our goal
is to remove all registry and binaries associated with the PnP device.
Thanks Tag: Where to get NTttcp for windows 2008 server? Tag: 103958
DeviceIoControl with OVERLAPPED and KMDF
Hi all,
In a driver written with KMDF 1.5, should I need to care if a user
mode application sends a IOCTL with OVERLAPPED structure set or not in
DeviceIoControl() (opened with CreateFile with flag
FILE_FLAG_OVERLAPPED set)? Now I hear that DeviceIoControl() fails if
OVERLAPPED is specified but I am not sure if that should matter...
BR,
Johan Paul Tag: Where to get NTttcp for windows 2008 server? Tag: 103939
Mouse Device as a Generic HID Device
Hi,
I want to use the mouse device as a generic or raw HID Device. That is
if I want to write a HID mini driver that interfaces with HID class
driver instead of Mouse Class Driver then can it be done? If yes what
are the areas which I need to look into? Where can I get a sample or
close to example for the same? Tag: Where to get NTttcp for windows 2008 server? Tag: 103933
WinUsb Control_Transfer Question
Hi,
I need to send a setuppacket (without extra data) to my usb device and the
device must respond by sending data back (for example a getstatus request).
Code example:
WINUSB_SETUP_PACKET SetupPacket;
SetupPacket.RequestType = 0xA1;
SetupPacket.Request = 0x01;
SetupPacket.Value = 0;
SetupPacket.Index = 0;
SetupPacket.Length = 8;
bResult = WinUsb_ControlTransfer( WinUSB_Handle, SetupPacket, DataBuffer, 0,
&bytesTransferred, NULL );
When i look at the raw usb data with a USB protocol analyser the .Length
member of the setuppacket is send as 0. It seems that the BufferLength value
of WinUsb_ControlTransfer overwrites this value. Why? Now the device doesnt
know that is must return data.
When the BufferLength value of WinUsb_ControlTransfer is set to the value of
Setuppacket.Length it is possible to receive data from the device but it the
WinUsb_ControlTransfer function also sends useless data to the device.
So i would like to know how to read data from the control pipe.
Is it possible to use the WinUsb_Read_Pipe function to read from a control
pipe? when i try it returns false and the error code is 87 (invalid value).
Thanks,
Erwin School. Tag: Where to get NTttcp for windows 2008 server? Tag: 103932
USB HID Driver for Cypress USB2IIC Bridge.
Hello,
Now I was set to a driver development for Cypress USB2IIC bridge.Hope I can
get help here.
TIA
Johnthan Chau Tag: Where to get NTttcp for windows 2008 server? Tag: 103915
Writing to disk under Vista and IOCTL_SCSI_PASS_THROUGH
Hello,
As per the documentation (and also personal tests) Vista doesn't allow
to write to certain parts of a disk even though the program runs with
admin privileges.
Then after searching the newsgroups I found a message where "Gary G.
Little" said it was possible using IOCTL_SCSI_PASS_THROUGH and
IOCTL_ATA_PASS_THROUGH. If I understood correctly it should also be
possible from a normal user app (i.e. not a driver).
http://tinyurl.com/yusjva
or
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_thread/thread/8dd00a4fa2af1ca3/36c51c0ff38e3c5f?lnk=st&q=write+disk+vista#36c51c0ff38e3c5f
The part of his post I used as a guideline is:
> You need to look at IOCTL_SCSI_PASS_THROUGH and
> IOCTL_ATA_PASS_THROUGH, and understand what an LBA is, and how it is
> used in a TFR (which you have to know) and CDB (something else you
> have to know). Before it is over you should be intimate with the
> SetupDiXxxx API.
Though after setting up a minimal example that tries to follow those I
could only get it to work when writing to sector 0 and some other
sectors but not for all sectors.
Below is my sample code that tries to write to sector 6213784 on a 40GB
drive (first 20 GB are used by a primary partition formatted with
NTFS, and the last 20 GB are unallocated). Some values like sector size
are hard coded, I just tried to make it a simple as possible.
(Please note that my original code was in Pascal and I made a quick
translation to C, just in case you wonder about syntax oddities).
h := CreateFile ("\\\\.\\PhysicalDrive0", GENERIC_READ |
GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING,
0, 0);
if (h == INVALID_HANDLE_VALUE)
// do error handling ...
return;
LBA = 6213784; // sector number in linear block addressing
BlockCount = 1; // amount of sectors to write
ZeroMemory(&sptwb, sizeof(sptwb));
sptwb.sptwb_spt.spt_Length = sizeof(SCSIPASSTHROUGH);
sptwb.sptwb_spt.spt_PathId = 0;
sptwb.sptwb_spt.spt_TargetId = 1;
sptwb.sptwb_spt.spt_Lun = 0;
sptwb.sptwb_spt.spt_CdbLength = CDB10GENERIC_LENGTH; // 10
sptwb.sptwb_spt.spt_SenseInfoLength = sizeof(sptwb.sptwb_bSenseBuf);
sptwb.sptwb_spt.spt_DataIn = SCSI_IOCTL_DATA_OUT; // 0
sptwb.sptwb_spt.spt_DataTransferLength =
sizeof(sptwb.sptwb_bDataBuf); // 512 bytes
sptwb.sptwb_spt.spt_TimeOutValue = 5000; // TIME_OUT
sptwb.sptwb_spt.spt_DataBufferOffset = &sptwb.sptwb_bDataBuf - &sptwb;
sptwb.sptwb_spt.spt_SenseInfoOffset = &sptwb.sptwb_bSenseBuf - &sptwb;
sptwb.sptwb_bDataBuf[0] = 'S';
sptwb.sptwb_bDataBuf[1] = 'u';
sptwb.sptwb_bDataBuf[2] = 'c';
sptwb.sptwb_bDataBuf[3] = 'c';
sptwb.sptwb_bDataBuf[4] = 'e';
sptwb.sptwb_bDataBuf[5] = 's';
sptwb.sptwb_bDataBuf[6] = 's';
sptwb.sptwb_spt.spt_Cdb[0] = SCSIOP_WRITE; // 0x2A
sptwb.sptwb_spt.spt_Cdb[1] = 0x00;
sptwb.sptwb_spt.spt_Cdb[2] = (LBA >> 24) & 0xFF;
sptwb.sptwb_spt.spt_Cdb[3] = (LBA >> 16) & 0xFF;
sptwb.sptwb_spt.spt_Cdb[4] = (LBA >> 8) & 0xFF;
sptwb.sptwb_spt.spt_Cdb[5] = (LBA >> 0) & 0xFF;
sptwb.sptwb_spt.spt_Cdb[6] = 0x00;
sptwb.sptwb_spt.spt_Cdb[7] = (BlockCount >> 8) & 0xFF;
sptwb.sptwb_spt.spt_Cdb[8] = (BlockCount >> 0) & 0xFF;
sptwb.sptwb_spt.spt_Cdb[9] = 0x00;
if (!DeviceIoControl(h, IOCTL_SCSI_PASS_THROUGH , &sptwb,
sizeof(sptwb), &sptwb, sizeof(sptwb), dwBytesReturned, NULL))
// Code to output last error message (GetLastError, etc.)
Could you please tell me what of the tips quoted above could make it
work? Should I acquire the handle differently, i.e. not use
"\\\\.\\PhysicalDrive0" but something else? What is a TFR?
Any advice would be greatly appreciated.
Regards,
Maël Hörz. Tag: Where to get NTttcp for windows 2008 server? Tag: 103910
MSI support
Hi
How to determine (having the windbg hooked up) whether Message Signaled
Interrupts are supported by the target system?
TIA
Andrew Tag: Where to get NTttcp for windows 2008 server? Tag: 103903
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: Where to get NTttcp for windows 2008 server? 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: Where to get NTttcp for windows 2008 server? 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: Where to get NTttcp for windows 2008 server? 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: Where to get NTttcp for windows 2008 server? 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: Where to get NTttcp for windows 2008 server? Tag: 103879
Hi All,
Where to get the latest NTttcp tool for Windows 2008 server? I cant
find it.