Questions on PCI config space when ressetting a PCI board
Hi,
I'm developing a wdm driver under Win2K for a proprietary PCI board.
Unfortunately, the board's PCI interface logic is part of a FPGA that can
only be fully reset by reconfiguring the FPGA. We foresee that we need to
reset our board on certain occasions and we do not want to power-cycle our
system for this.
Therfor, I'm implementing the following reset sequence in my driver:
Because the reconfiguration of the FPGA resets the PCI config space, I start
with saving this data (after having disabled the boards PCI interface). I
then call PoRequestPowerIrp to force the board to go to device state D3. In
the IoCompletion routine, PoRequestPowerIrp is called again to force the
board to go back to device state D0 (this actually resets our FPGA and the
PCI config space). In the IoCompletion routine of the second
PoRequestPowerIrp, I restore the PCI config space data and reenable the PCI
interface.
When, in the above scheme, I use the sequence
IoBuildAsynchronousFsdRequest() - IoSetCompletionRoutine() - IoCallDriver()
to read or write the PCI configuration space, this completion routine is
called with DeviceObject = NULL. I solve this by passing the DeviceObject
via the 'context' of the completion routine. Is this normal or could I be
doing something wrong here?
Apart from the above problem the sequence seems to work, but I am not sure
wether I should also save and restore the power management registers of the
PCI config space. Or should I leave this to the pci.sys bus driver who does
the actual D0/D3/D0 switching ?
Also, I'm not sure that the above will work under all circumstances so I
would appreciate it if anybody knows where to find some more info on stuff
like this.
Thanks in advance,
Koen Tag: Typeperf Tag: 40909
Basic kernel mode driver question.
I have the following development workstation: Windows XP Pro, VC++6.0, DDK
2600.1106 (installed in C:\DDK\WINDDK\2600.1106), Platform SDK February
2003.
As a confirmation that all of the above components are installed correctly,
I compiled one of the sample projects (oemps) by doing the following:
1.. Opened an XP checked build window via the start menu.
2.. Navigated to "C:\DDK\WINDDK\2600.1106\src\print\oemdll\oemps".
3.. Typed "build -cef"
4.. The kernel mode driver KOEMPS.DLL was built and placed in
"C:\DDK\WINDDK\2600.1106\src\print\oemdll\i386".
My goal is to generate a random number in PSCommand method of
"C:\DDK\WINDDK\2600.1106\src\print\oemdll\oemps\command.cpp"
1.. Using the VC6.0 IDE, I added the following to the pscommand method:
LARGE_INTEGER time;
ULONG seed; // seed value should be a global or in device
extension
ULONG rand; // random value
KeQuerySystemTime(&time); // only do first time or in init code!
seed = (ULONG) time;
rand = RtlRandom(&seed); // get random number
2.. I Opened an XP checked build window via the start menu.
3.. Navigated to "C:\DDK\WINDDK\2600.1106\src\print\oemdll\oemps".
4.. Typed "build -cef".
Command.cpp failed to compile because KeQuerySystemTime and RtlRandom were
'undeclared identifiers'. Because these two api's are defined in ntddk.h, I
added '#include <ntddk.h>' to command.cpp. The compile failed because it
could not find ntddk.h. I then changed the line to '#include <
C:\DDK\WINDDK\2600.1106\inc\ddk\wxp\ntddk.h>'. The compile failed again
because I had several redefinition errors.
How do I get api's defined in NTDDK.H to compile in this (oemps) Microsoft
provided sample project? Tag: Typeperf Tag: 40908
IRP_MJ_INTERNAL_DEVICE_CONTROL problem
H
I'm currently developing a filter driver, but I still encounter this problem in my IRP_MJ_INTERNAL_DEVICE_CONTROL handler. That's my code
NTSTATUS MyDispatchInternalDeviceControl(IN PDEVICE_OBJECT pDeviceObject, IN PIRP Irp)
{
PDEVICE_EXTENSION pDeviceEx;
PIO_STACK_LOCATION IrpSp = NULL;
IrpSp = IoGetCurrentIrpStackLocation(Irp);
IoCopyCurrentIrpStackLocationToNext( Irp );
pDeviceEx = (PDEVICE_EXTENSION)pDeviceObject->DeviceExtension;
return IoCallDriver(pDeviceEx->pLowerDeviceObject, Irp ); //crashe
}
When I call IoCallDriver the system crashes with KERNEL_MODE_EXCEPTION (8e). Does anyone know why
Thanks a lo
mosquitooth Tag: Typeperf Tag: 40906
USB Modem device
Hi,
We have a USB modem device, which is acually a GSM/GPRS phone. The GSM/GPRS
part may need the PIN code for the SIM card in order to make calls. Se when
the initialization command has been sent, we must ask the device if it it
needs the PIN, and present a dialog if it does.
How can we accomplish this?
Please direct me to relevant documentation or newsgroup.
Leo Havmøller. Tag: Typeperf Tag: 40904
USB Modem device
Hi,
We have a USB modem device, which is acually a GSM/GPRS phone. The GSM/GPRS
part may need the PIN code for the SIM card in order to make calls. Se when
the initialization command has been sent, we must ask the device if it it
needs the PIN, and present a dialog if it does.
How can we accomplish this?
Please direct me to relevant documentation or newsgroup.
Leo Havmøller. Tag: Typeperf Tag: 40903
Driver date and version
this is pice of my inf file for my driver
[Version]
Signature=$CHICAGO$
Class= SvanDevices
ClassGuid={EDD31C19-40AE-4ca6-8D81-3E6F2B1676B5}
CatalogFile=svan_driver.cat
Provider=%MFGNAME%
DriverVer=02/26/2004,1.2.3
My problem is that W200 in driver properties don.t display driver date.
Driver version is correct, but date is not available.
This bug cuse to problems with driver update. I must delete inf file from
windows/inf folder
I compile my driver with rc file. Tag: Typeperf Tag: 40901
NDIS test failed on MiniportHalt
In the MiniprotHalt routine, I have to cancel timer queue
which I have set with NdisSetTimer and NdisInitializeTimer
at Miniport InitializeHandler. When I called *NdisMCancelTimer*,
I got an assertion failed.
*** Assertion failed: ((Timer)->Header.Type == TimerNotificationObject)
|| ((Timer)->Header.Type == TimerSynchronizationObject)
*** Source File: D:\nt\private\ntos\ke\timerobj.c, line 186
The code
VOID MPHalt(
IN NDIS_HANDLE MiniportAdapterContext)
{
PMP_ADAPTER Adapter = (PMP_ADAPTER) MiniportAdapterContext;
...
// Cancel pending timers
NdisMCancelTimer(&Adapter->Timer, &Cancelled);
...
}
Could you give me any suggestions or clues, thank in advance. Tag: Typeperf Tag: 40900
Unidrv: Custom Halftoning on Windows NT
Since The *HTCallbackID does not work on Windows NT, we have hooked the IPrintOEMUni::ImageProcessing() callback to apply the custom halftone pattern
This Unidrv based PCL driver is for a monochrome printer. The values in our custom halftone pattern are in the range of 0 to 255. Hence to apply this pattern we have the following values in the ColorMode feature of our GP
*Feature: ColorMod
*rcNameID: =COLOR_PRINTING_MODE_DISPLA
*DefaultOption: Mon
*Option: Mon
*rcNameID: =MONO_DISPLA
*Color?: FALS
*DevBPP:
*DevNumOfPlanes:
*DrvBPP:
*IPCallbackID: 334
We *have* to convert the source DIB to 1BPP and give it back to the UNIDRV after ImageProcessing() returns.
The indexes in the pSrcBitmap to the pColorTable where converted to grayscale values using the formul
greyvalue = rgbRed * 0.299 + rgbGreen * 0.587 + rgbBlue * 0.114
We tried dithering the 8BPP grayscale DIB using Flyod-Stienberg algorithm, but are not able to reproduce the same quality DIB the UNIDRV gives us when the *DrvBPP is
Are we missing something
How does GDI do the dithering from 8BPP to 1 BPP
Is it possible to dither 8BPP greyscale to 1BPP Monochrome image of the same quality as GDI's dithering Tag: Typeperf Tag: 40899
Need Help on POSUSB
Hi ,
I am implementing a Virtual Com port driver for our Target Device on
WinXp. For this, I have taken the reference driver code from Microsoft
POSUSB
The issue is that while doing an install / Uninstall or Enable /
Disable of the Virtual Com Port, the OS asks for a system restart.
I am interested in knowing if this is an acceptable behavior as we are
planning to do HCT validation of the driver. We have referred to the
HCT documentation for the same, but in no place does it say that this
restart is acceptable. Unfortunately, I have not been able to find how
serial port emulation can be done without the above said behavior.
when i Disable/Enable or Install/Uninstall the device, i am not
handling the RemovalRelations in the IRP_MN_QUERY_REMOVE_DEVICE.i am
just passing that IRP down as STATUS_SUCCESS. after that i am geting
IRP_MN_CANCEL_REMOVE_DEVICE this is because of bus driver not process
it proper. But as per Documentation you need not worry about this IRP.
I would be very grateful if you can guide me in this regards.
thanks in advance
Regards,
Deepak. Tag: Typeperf Tag: 40892
How to implement Selective Suspension on NDIS-WDM driver
Does anybody know to implement Selective Suspension for USB device on NDIS-WDM driver? Especially how to handle IRP_MN_WAIT_WAKE on NDIS-WDM driver? Thanks. Tag: Typeperf Tag: 40888
Read a file in driver
Hi,
I've written a function to read a file and copy its data to a buffer in the
non paged pool. But I can get nothing after a KsRead() call. All the
returned value are STATUS_SUCCESS. It's qutie strange.
My code is as following:
NTSTATUS
ReadMyFile(
IN PWCHAR FileName
)
{
NTSTATUS status;
IO_STATUS_BLOCK ioStatusBlock;
UNICODE_STRING fileNameString;
OBJECT_ATTRIBUTES objectAttributes;
ACCESS_MASK desiredHandleAccess;
ACCESS_MASK desiredObjectAccess;
ULONG ulShareAccess;
ULONG ulDisposition;
FILE_STANDARD_INFORMATION StandardInformation;
HANDLE hFile = NULL;
FILE_OBJECT *pFileObject = NULL;
//
// Attempt to open the file based on the access rights of the caller.
// Note that the SYNCHRONIZE flag must be set on the Create even
// though this is contained in the translated GENERIC_READ attributes.
// This is because the bit is tested before the Generic attributes
// are translated. This filter only does synchronous I/O on stream
// Read requests.
//
RtlInitUnicodeString(&fileNameString, FileName);
InitializeObjectAttributes(
&objectAttributes,
&fileNameString,
OBJ_CASE_INSENSITIVE,
NULL,
NULL);
//
// Set the access desired based on the type of filter which was
// actually created.
//
desiredHandleAccess = GENERIC_READ | SYNCHRONIZE;
desiredObjectAccess = FILE_READ_DATA;
ulShareAccess = FILE_SHARE_READ;
ulDisposition = FILE_OPEN;
status = IoCreateFile(&hFile,
desiredHandleAccess,
&objectAttributes,
&ioStatusBlock,
NULL,
0,
ulShareAccess,
ulDisposition,
FILE_SYNCHRONOUS_IO_NONALERT,
NULL,
0,
CreateFileTypeNone,
NULL,
IO_FORCE_ACCESS_CHECK | IO_NO_PARAMETER_CHECKING);
if ( !NT_SUCCESS(status) ) {
goto error;
}
status = ObReferenceObjectByHandle(hFile,
desiredObjectAccess,
*IoFileObjectType,
ExGetPreviousMode(),
reinterpret_cast<void
**>(&pFileObject),
NULL);
if ( !NT_SUCCESS(status) ) {
goto error;
}
if (m_pFileBuffer != NULL) {
ExFreePool(m_pFileBuffer);
m_pFileBuffer = NULL;
}
m_ulFileBufferSize = 0;
//
// retrieve file's size
//
status = KsQueryInformationFile(pFileObject,
&StandardInformation,
sizeof(StandardInformation),
FileStandardInformation);
if ( !NT_SUCCESS(status) || StandardInformation.EndOfFile.QuadPart >
MAXLONG ) {
goto error;
}
else {
ULONG m_ulFileBufferSize =
(LONG)(StandardInformation.EndOfFile.QuadPart);
}
//
// allocate a buffer to hold file's content
//
m_pFileBuffer = (BYTE*)ExAllocatePoolWithTag(NonPagedPool,
m_ulFileBufferSize,
NULL);
if ( m_pFileBuffer == NULL ) {
status = STATUS_INSUFFICIENT_RESOURCES;
goto error;
}
DbgPrint("(1) Bitmap data is %02X %02X %02X %02X",
*m_pFileBuffer, *(m_pFileBuffer + 1), *(m_pFileBuffer + 2),
*(m_pFileBuffer + 3));
//
// read file's content to buffer
//
status = KsReadFile(pFileObject,
NULL,
NULL,
&ioStatusBlock,
m_pFileBuffer,
m_ulFileBufferSize,
0,
KernelMode);
if (NT_SUCCESS(status))
{
DbgPrint("(1) Bitmap data is %02X %02X %02X %02X",
*m_pFileBuffer, *(m_pFileBuffer + 1), *(m_pFileBuffer + 2),
*(m_pFileBuffer + 3));
}
error:
if ( !NT_SUCCESS(status) && m_pFileBuffer != NULL ) {
ExFreePool(m_pFileBuffer);
m_pFileBuffer = NULL;
}
if ( pFileObject != NULL ) {
ObDereferenceObject(pFileObject);
}
if ( hFile != NULL ) {
ZwClose(hFile);
}
return status;
} Tag: Typeperf Tag: 40887
Detecting Print-to-File option from a printer driver plugin DLL
Do anyone know how to detect Print-to-File option from a printer driver plugin DLL
I like to be able to do this in Win9x, WinNT, Win2k and WinXP. Your advice is highl
appreciated
Thanks
Anthony Tag: Typeperf Tag: 40884
Mirror Drv, EngDeviceIoControl problem
This is a multi-part message in MIME format.
------=_NextPart_000_000D_01C3FCCD.814DCA40
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
I am writing a mirror display drive, I am tring to communicate between =
the Display driver and the miniport driver using EngDeviceIoControl, BUT =
of some strange reason when the mimiport gets the HwStartIO request =
'RequestPacket->OutputBuffer' has a pointer different then the one =
passed through the EngDeviceIoControl call, when the EngDeviceIoControl =
returns ( after the MirrorStartIO took place ) the content of the Output =
buffer doesn't change ( although it was update in the Miniports =
HwStartIO request ). What may cause this problem?
The Display Driver code:
****************************
DHPDEV DrvEnablePDEV( .... )
{
...
DWORD dwDataPtr=3D 0;
DWORD dwRetBytes =3D 0;
DWORD dwRet =3D EngDeviceIoControl( hDriver, IOCTL_MIRROR_GET_SHM, NULL, =
0, &dwDataPtr, sizeof(dwDataPtr), &dwRetBytes);
...
}
The miniport code:
*********************
UserModeMem_t g_SharedMemory =3D { 0 };
BOOLEAN MirrorStartIO(
PVOID HwDeviceExtension,
PVIDEO_REQUEST_PACKET RequestPacket
)
{
VideoDebugPrint((Trace,"StartIO Called.\n"));
switch(RequestPacket->IoControlCode)
{
case IOCTL_MIRROR_GET_SHM:
VideoDebugPrint((Trace,"IOCTL_MIRROR_GET_SHM =3D=3D =
RequestPacket->IoControlCode.\n"));
RequestPacket->StatusBlock->Status =3D NO_ERROR;
*(unsigned long*)RequestPacket->OutputBuffer =3D (unsigned =
long)&g_SharedMemory;
RequestPacket->OutputBufferLength =3D sizeof(&g_SharedMemory);
break;
}
return TRUE;
}
Thanks,
Nadav.
------=_NextPart_000_000D_01C3FCCD.814DCA40
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV>
<P><FONT face=3DArial size=3D2>Hi,<BR><BR>I am writing a mirror display =
drive, I am=20
tring to communicate between the Display driver and the miniport driver =
using=20
EngDeviceIoControl, BUT of some strange reason when the mimiport gets =
the=20
HwStartIO request 'RequestPacket->OutputBuffer' has a pointer =
different then=20
the one passed through the EngDeviceIoControl call, when the =
EngDeviceIoControl=20
returns ( after the MirrorStartIO took place ) the content of the Output =
buffer=20
doesn't change ( although it was update in the Miniports HwStartIO =
request ).=20
What may cause this problem?</FONT></P>
<P><FONT face=3DArial size=3D2>The Display Driver=20
code:<BR>****************************</FONT></P>
<P><FONT face=3DArial size=3D2>DHPDEV DrvEnablePDEV( .... =
)<BR>{<BR>...<BR>DWORD=20
dwDataPtr=3D 0;<BR>DWORD dwRetBytes =3D 0;<BR>DWORD dwRet =3D=20
<STRONG>EngDeviceIoControl</STRONG>( hDriver, IOCTL_MIRROR_GET_SHM, =
NULL, 0,=20
&dwDataPtr, sizeof(dwDataPtr), =
&dwRetBytes);<BR>...<BR>}</FONT></P>
<P><FONT face=3DArial size=3D2></FONT> </P>
<P><FONT face=3DArial size=3D2>The miniport=20
code:<BR>*********************</FONT></P><FONT size=3D2>
<P>UserModeMem_t g_SharedMemory =3D { 0 };</P></FONT>
<P><FONT face=3DArial size=3D2>BOOLEAN MirrorStartIO(<BR> =
PVOID=20
HwDeviceExtension,<BR> PVIDEO_REQUEST_PACKET=20
RequestPacket<BR> =
)<BR>{<BR> VideoDebugPrint((Trace,"StartIO=20
Called.\n"));</FONT></P>
<P><FONT face=3DArial=20
size=3D2> switch(RequestPacket->IoControlCode)<BR> {<BR>&nbs=
p;case=20
IOCTL_MIRROR_GET_SHM:<BR> VideoDebugPrint((Trace,"IOCTL_MIRROR=
_GET_SHM=20
=3D=3D=20
RequestPacket->IoControlCode.\n"));<BR> RequestPacket->S=
tatusBlock->Status =3D=20
NO_ERROR;<BR> *(unsigned =
long*)RequestPacket->OutputBuffer =3D=20
(unsigned=20
long)&g_SharedMemory;<BR> RequestPacket->OutputBufferLe=
ngth =3D=20
sizeof(&g_SharedMemory);<BR> break;<BR> }</FONT></P>
<P><FONT face=3DArial size=3D2> return TRUE;<BR>}<BR></FONT></P>
<P><FONT face=3DArial size=3D2>Thanks,<BR> =
Nadav.</FONT><FONT face=3DArial=20
size=3D2></P></FONT></DIV></BODY></HTML>
------=_NextPart_000_000D_01C3FCCD.814DCA40-- Tag: Typeperf Tag: 40883
Writing storage device driver for a flash PCI card
Hello,
I have a PCI adapter that has flash memory on it. I know everythings about this card, including the PCI manuf device ID, the PCI config register, and how to read and write from/to the flash memory.
I want to write a driver for it such that when I open windows explorer I will see my card shown as drive D: (or E: if there is a CD rom in the system). I have been reading books, including Programming the MS WDM 2nd, Oney, and the DDK documentation from the lastest DDK for Window 2000/XP. Too much information has made me confused.
1. Should I write the SCSI mimiport driver that will layer below the scsi port driver?
I read about this SCSI miniport things but it's really confused. I have thought about this but when I look at the functions that I have to implement shown in the DDK, it is too complicated. My PCI card does not use DMA and IRQ. It only need two 32-bit registers and a 4k memory range and an IO port that is part of the PCI config space.
2. What are the alternatives?
Port driver? I thought my driver must be a port driver, since it must tell the system how to read and write to the PCI register. But it must contain a layer that tell the system that my drive is a D: drive.
Anyhow, this whole thing is a mess in me right now. Can someone explain or show me what the best approach to this? Thank you so very much.
Long Tag: Typeperf Tag: 40880
Keyboard mouse stream separation - again...
Hello folks,
again I am having a few questions belonging to my previous topics. I
want to separate keyboard and mouse streams originating from different
devices - Windows shall only get the information of one device combo.
The others shall be used for whatever.
I have written adopted DDK filter driver examples for PS/2 chain. This
works but is a bit dirty.
The DDK also contains the original "keyboard class" and "mouse class"
drivers. Wouldn´t it be possible to adopt them to deliver this
feature?
How are those driver examples installed? DDK help says that they are
protected by system driver protection... How can you prevent XP from
caring about those drivers?
Many thanks for your help...
Volker Tag: Typeperf Tag: 40878
BusFilter on XP
Hi,
I've just written a dummy pass-through bus filter that works fine on
Windows 2000 but on Windows XP crashes when ASPI driver sends a
request.
Has anyone of you met this problem ? Thanks.
Clark Tag: Typeperf Tag: 40869
International OEM Windows Driver Development
Introducing myself, I am a Windows custom Printer driver specialist,
background is as follows:
Seeing all these driver issues on this newsgroup would like to
introduce QualSoft..
- Develop Printer drivers for Printer manufacturers WorldWide,
- Developed drivers since 1995,
- Developed unique access to device functionality,
- Continue to work with OEM printer manufacturers Internationally
todate
- Continue to market Internationally for printer driver development
for OEM Windows Driver development,
- Specialist in Custom printer driver development for all Windows
versions,
- Specialist in development of Printer Monitors,
- Specialist in working to client's unique needs,
- Development for International OEM's
- Develop for all types of technology including laaer, line printer,
label printers, barcode printers.
With Best Regards,
Andy Headland
QualSoft Software Consultants Ltd
Tel: +44 (0)1969 624575
Fax: +44 (0)1969 624637
http://www.qualsoftsoftware.com
qualsoft_software@msn.com Tag: Typeperf Tag: 40868
WinPE and sbp2port
Hello,
I have a 1394 Storage device in WinPE.
When I try to reconnect the device in WinPE or if the
device was not connected on the boot, I get a problem
with the driver sbp2port.sys.
The service entry for the driver in the registry shows that INITSTARTFAILED
is 1.
The same device can be reconnected fine in Windows XP Professional SP1.
I use the same version of sbp2port.sys (5.1.2600.1106) in
both cases.
Any advices what and where to change in WinPE configuration?
Thank you.
SD. Tag: Typeperf Tag: 40866
srand() inkernel mode
Does anyone have a suggestion for seeding rand() in a kernel mode driver?
In user mode or application layer, it is common to srand(currenttime), but
the system time is not available in kernel mode.
Thank you. Tag: Typeperf Tag: 40864
Share memory between user mode and kernel mode
Hi
A windows application (user mode) create a memory area with CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE,0,TAILLE_BUFFER,"SharingImage"
I want to use this area in a driver (kernel mode).
According to the Microsoft knowledge Base 191840. I have to use the following functions
- ZwOpenSection(
-ZwMapViewOfSection(
But I don't know how to get adress of the area
The source is
RtlInitUnicodeString(&ShareMemoryName,L"\\SharingImage")
InitializeObjectAttributes( &InitializedAttributes, &ShareMemoryName, OBJ_PERMANENT | OBJ_CASE_INSENSITIVE, NULL, NULL)
status = ZwOpenSection( &pat_AcquisitionFile,SECTION_MAP_READ, &InitializedAttributes)
the return code is always
"STATUS_OBJECT_NAME_NOT_FOUND"
What can I do to point to the right are
Thanks
Pasca Tag: Typeperf Tag: 40854
Win98 unidriver/landscape mode banding
Is there anyway to get a vertical banded RGB data in Win98 unidriver ?
I set sPlanes=1, sBitsPerPixel=24, thus a fnOEMDump() function is
required.
Unidriver bands portait pages in printing direction, that's fine.
Problem raises when i print with landscape mode:
If i set MD_LANDSCAPE_GRX_ABLE in fGeneral, it will band landscape
page horizontally, which is not the printing direction.
If i clear MD_LANDSCAPE_GRX_ABLE in fGeneral, UniControl() returns
the whole page dimension at 1st time NEXTBAND was called, and returns
empty rect at 2nd time NEXTBAND was called. This is absolutely not
what we want. We'd like to have correct band rect(s) for landscape
mode.
Is there any solution for such condition in unidriver ? Or the only
way is to write my own driver ?
Thanks in advance. Tag: Typeperf Tag: 40853
PCMCIA and CIS Reading/Writing
Hi,
I succeed in reading the CIS of my PCMCIA card. I don't use
the kernel mode, sorry to post here, but perhaps someone could help
me.
I whould like to know where I can find the size of my CompcatFlash
memory car in the slot PCMCIA, using the CIS I just read, is it
possible to retreive the information.
Is it possible to WRITE in the CIS, in order to change on byte in the
name on the manufacturer in exemple??
thanks if you know that or if you have links for me?? Tag: Typeperf Tag: 40852
firewire delayed write failure
Hi everybody,
i have a problem with an external firewire hard disk. The problem is a
"Delayed Write Failure" when i try to read some kind of file (DV AVI
most of the time).
The root cause of the problem is explained at
http://www.bustrace.com/products/delayedwrite.htm.
On this page there is also a little test tool that is able to
reproduce the problem. The solution is to write a filter driver that
prevents IO larger than 128Kb to reach the drive.
Is there anyone able to write a filter driver like the one described
in the link and post it to the community?
thank you. Tag: Typeperf Tag: 40851
NDIS IM, Stream Interface
Hi Count Blackoth,
I am new for wince and IM driver, working on WINCE 4.2.
I am trying to load IM driver on WINCE 4.2 dynamically.
I have gone through all your communication with
microsoft.public.development.device.drivers
on the subject of NDIS IM, Stream Interface,PocketPC2002.
I am going in the same way and have same set of questions as you
had.
I found that your questions remained unanswered.
If you have found the solution , would you like to share with me ??
Can you guide me how should I write an stream interface for IM
driver and making it workable.
Any suggestion in this regard will be a great help for me.
regards,
Niraj Tag: Typeperf Tag: 40847
Normal newsgroup server
Hi
is the newsgroup available through normal newsgroup interface? I prefer my Netscape 7.1 newsgroup reader to the web one, however I can't find this particular newsgroup on my favorite servers. If it is available, where
Thanks. Tag: Typeperf Tag: 40845
1MHz interrupt
Hello,
I would like to write an application that would periodically write bytes to the parallel port with frequency ranging from several Hz to 1MHz. I thought I could use the hadrware timer to genearte interrupt every time and write a device driver to handle it. However, my first question is: Is it possible to accomplish it? I mean, is it possible to get such a high frequency reliable under Windows? will not my interrupts be delayed by task switching, other interrupts etc. Is it possible to disable task switching etc for a short time? Or would it be realiable at least in the case that no other applications run
Thank you very muc Tag: Typeperf Tag: 40844
create an event at ring0 level
Hi,
whats the way of creating an event at Ring0 level.I am using Win 98 OS.So
far i have got the information to create event at ring3 and convert it to
ring0 event.But i don't want to do that.I need to create event at ring0
level.How to do that.
Plz reply.
regds
vinay Tag: Typeperf Tag: 40840
SPTI rejects valid requests
I'm witing some low level CD access stuff (writing DAO in RAW mode and
things).
I'm mainly using SPTI, cos I'm developing under XP.
The problem I'm having is that a number of calls are failing for no apparent
reason.
These calls work perfectly when I use ASPI as the transport (I choose to use
ASPI or SPTI when my base level object is initialised - all the CDB
construction and so on are in higher levels and identical).
The 2 calls which I'm seeing give problems are Read TOC (ATIP) and ReadCD
(with a -ve LBA).
I've looked at the CDB and in both cases it is identical.
The errors I'm seeing are Address out of Range (for Read CD) and 'invalid
Operation for this track' for the ATIP reading.
I cannot believe that something in Windows is doing this. But on the other
hand, nor can I see anyting odd I'm doing with these particular functions.
The Object proper is quite happy to use dozens of other functions (including
ReadToc with other parameters!) and happily writes audio cds and DVDs and
reads the same. Just these few functions ...
Can ayone throw light on this?
Iain Tag: Typeperf Tag: 40839
any code on memory card reader driver and firm ware???
I want to develop a readerdriver that can support memorycard ,but feel
quite confused,has any one developed that before?could you share me
the LIB that replaces PC/SC ,if you can offer me some source code ,
It will be quite a great honor to me.
thanks in advance!!!!! Tag: Typeperf Tag: 40838
Map interface index from the IP Helper API to an intermediate driver miniport instance.
Hi!
Is there any way for an intermediate driver to find out (in either
ProtocolBindAdapter or MiniportInitialize) what interface index (IP Helper
API) it will get.
In userspace I keep track of adapter by their iphlp index and I would like
to make a call down an intermediate driver with that index instead of the
name of the adapter. It would be awesome if each of my miniports instances
could figure out that index on their own.
Cheers! Tag: Typeperf Tag: 40836
ISR not called
Iam writing a device driver for PCI card
Iam using a interrupt.
I have initialized the interrupt and connected the InterruptServiceRoutine
by the call IoConnectInterrupt.Also the DPC object is initialized for the
DpcForIsr routine by IoInitializeDpcRequest.
In the interrupt service routine
First checked for the interrupt whether it is from my card if it is not
returned FALSE immediately.
If it is from my card then acknoledged it. Then some processing is done.
Then the DPC object is queued to continue the request processing by
IoRequestDpc.
Return TRUE from the Interrupt Service routine.
When I debugged the program ISR routine is not called.
Am I doing any mistake.
Secondly when I restart the system, the system was hung.I think the problem
is due to not disabling the interrupts in correct way.What am I supposed to
do.
How to solve these problems?
thanks®ards
sobana.D Tag: Typeperf Tag: 40830
isr not called
Iam writing a device driver for PCI card
Iam using a interrupt.
I have initialized the interrupt and connected the InterruptServiceRoutine
by the call IoConnectInterrupt.Also the DPC object is initialized for the
DpcForIsr routine by IoInitializeDpcRequest.
In the interrupt service routine
First checked for the interrupt whether it is from my card if it is not
returned FALSE immediately.
If it is from my card then acknoledged it. Then some processing is done.
Then the DPC object is queued to continue the request processing by
IoRequestDpc.
Return TRUE from the Interrupt Service routine.
When I debugged the program ISR routine is not called.
Am I doing any mistake.
Secondly when I restart the system, the system was hung.I think the problem
is due to not disabling the interrupts in correct way.What am I supposed to
do.
How to solve these problems?
thanks®ards
sobana.D Tag: Typeperf Tag: 40829
ISR not called
Iam writing a device driver for PCI card
Iam using a interrupt.
I have initialized the interrupt and connected the InterruptServiceRoutine
by the call IoConnectInterrupt.Also the DPC object is initialized for the
DpcForIsr routine by IoInitializeDpcRequest.
In the interrupt service routine
First checked for the interrupt whether it is from my card if it is not
returned FALSE immediately.
If it is from my card then acknoledged it. Then some processing is done.
Then the DPC object is queued to continue the request processing by
IoRequestDpc.
Return TRUE from the Interrupt Service routine.
When I debugged the program ISR routine is not called.
Am I doing any mistake.
Secondly when I restart the system, the system was hung.I think the problem
is due to not disabling the interrupts in correct way.What am I supposed to
do.
How to solve these problems?
thanks®ards
sobana.D Tag: Typeperf Tag: 40828
ISR not called
Iam writing a device driver for PCI card
Iam using a interrupt.
I have initialized the interrupt and connected the InterruptServiceRoutine
by the call IoConnectInterrupt.Also the DPC object is initialized for the
DpcForIsr routine by IoInitializeDpcRequest.
In the interrupt service routine
First checked for the interrupt whether it is from my card if it is not
returned FALSE immediately.
If it is from my card then acknoledged it. Then some processing is done.
Then the DPC object is queued to continue the request processing by
IoRequestDpc.
Return TRUE from the Interrupt Service routine.
When I debugged the program ISR routine is not called.
Am I doing any mistake.
Secondly when I restart the system, the system was hung.I think the problem
is due to not disabling the interrupts in correct way.What am I supposed to
do.
How to solve these problems?
thanks®ards
sobana.D Tag: Typeperf Tag: 40827
UPS minidriver Dll
Hi
I'm currently developing a UPS minidriver Dll for Windows XP
The UPSTurnOff function has a parameter DWORD aTurnOffDelay
The DDK describes the parameter as
Specifies the minimum amount of time, in milliseconds, to wait before turning off the UPS unit's power outlets.
Called by the UPS service, I get here 180
Does this mean that I have to wait 180ms before issueing the output to the UPS to shut down
Does this mean that I have to issue the output 180ms long
It CANNOT mean that the UPS has to turn off 180ms after issuing the output because XP has no
even begun to shut down
I assume this value is in seconds. 180s seems to be an appropriate value for shutting down XP
Thanks for your help Tag: Typeperf Tag: 40819
OID problem
Hi,
I am developing a protocol driver. There I need to define my own WLAN OIDs.
How it can be done. I have a driver developer manual from a chipset
manufacturer. that chipset developer is providing some of his own OIDs. I am
on Windows 2000. thought chipset developer provides his OID header files but
as of now i don't have those. so thought if it is possible to write own
OIDs.
e.g. one of the OID provided by chipset manufacturer is OID_CURRENT_BSSID.
I have some info from Driver Developement Manual for miniport drivers.
Is there any way by which i can define these OID.
regards,
Puneet Tag: Typeperf Tag: 40813
How can I lock user memory at DISPATCH_LEVEL?
Hi
My driver has to do lots of Scatter Gather List DMA operations. This used to be ok at PASSIVE_LEVEL, but it becomes a problem when I try to use a system queue and call DMA operation in my StartIo routine. Before I can start DMA operation, I need call IoAllocateMdl() to build MDL for the user memory and call MmProbeAndLockPaged() to lock the user memory into the physical pages. According to DDK document, MmProbeAndLockPages() function can be called at DISPATCH_LEVEL ONLY when the memory is not pagable, but I have no way to guarranttee that the user memory is nonpagable, right
Is there anyway I can get around this
Thanks
zhong Tag: Typeperf Tag: 40799
INF directive for amd64, intel 64bit extension
I could not find the directive for amd64 and intel 64bit extension used in INF
Currently, in DDK, following directives are defined
ntx86, ntia64 and nt
What's for amd64 and intel 64bit extension
Thanks
Yadong Tag: Typeperf Tag: 40796
multiple virtual COM port support over USB
I have a WinCE device that is able to connect to the PC via Active Sync over USB. It can also connect as a modem(but not at the same time). The drivers on the PC side for either of these expose a virtual COM port on the PC. I want to change my WinCE device side driver to add support for one more virtual COM port over the same USB connection. I have changed my device side descriptor to say it has two interfaces, but I'm having trouble enumerating two ports. Do the PC side drivers (wceusbsh.sys or usbser.sys) support enumerating multiple interfaces
Thanks for your hel Tag: Typeperf Tag: 40786
Creating a GUID in Kernel-mode
Does anybody have a code snippet that shows how to generate a GUID in a
kernel-mode driver?
Thank you Tag: Typeperf Tag: 40780
Windows Driver Development Company
Seeing all these queries, I thought you should all know about QualSoft
at http://www.qualsoftsoftware.com
Good quality driver developement services for OEM's and printer
manufacturers worldwide since 1995. Tag: Typeperf Tag: 40779
Problem using KeQuerySystemTime
My goal is to inject a job id into a PS header using WMARKPS compiled in
kernel-mode (for NT4.0). My development environment is WinXP Professional,
VC++6.0, Windows DDK 2600.1106.
1.. Using the 'DDK checked' shortcut (on the start menu):
1.. I typed "set WINNT_40=1"
2.. After moving to "
C:\DDK\WINDDK\2600.1106\src\print\oemdll\watermark_NT", I typed
"build -cef". (I copied the watermark folder to watermark_nt, and modified
the sources file so that watermarkps.dll would be compiled in kernel-mode).
3.. At this point I am able to install and use the NT version of WMARKUI
and WMARKPS on an NT4.0 system.
2.. From this point I want to simply inject a PS comment that consists of
a JOBID generated from the system time.
1.. In the PSCommand method of Command.cpp in WMARKPS I want to use
KeQuerySystemTime(), but when I compile, KeQuerySystemTime() causes an
undeclared identifier error.
2.. If I "#include <ntddk.h>" (or wdm.h), the compiler says that it can'
t find the header files.
3.. If I "#include < C:\DDK\WINDDK\2600.1106\inc\wxp\ntddk.h>", the
compiler gives me a bunch of redefinition errors.
4.. If I "#include < C:\DDK\NTDDK\inc\ntddk.h>", the compiler again
gives me a bunch of redefinition errors.
How can I get methods defined in NTDDK.H to compile?
Thank you,
Mike Tag: Typeperf Tag: 40771
IP Address Assignement Problem on WinME- A starnge one.
Hi,
I am facing a strange problem on WinME.
I am connecting two USB Network Devices on My system running WinME.
I assign x.y.z.1 address to first card (say Card1) and x.y.z.2 to second
card (say Card2).
Ping works on both the cards.
Now I remove both the cards and connect card2 first. What I see is that the
system has assigned x.y.z.1 address to this card2 and if I connect Card1
now the system assigns x.y.z.2 address to Card1.
(Actually we would expect the system to assign x.y.z.1 addres to Card1 and
x.y.z.2 to card2)
Why the system is behaving this way?
Is it any known issue on WInME or is there anything that I am missing in my
driver or in INF file.
Please help me in sorting out this issue.
thanking you in advance.
regards,
Nazim Tag: Typeperf Tag: 40770
CARDBUS-Card incorrectly enumerated as MTD-0002 Memory card
I tried to install a CARDBUS-Card in my Toshiba Satellite Pro 4320, with Win2K SP4 on it. When I inserted the card, it was recognized as the PCMCIA MTD-0002 memory card. All tries to install the correct driver failed. On other notebooks or desktops the card is recognized correctly. I also tried to update the bios, but without solving the MTD-0002-problem.
The used cardbus controller is a Toshiba ToPIC100
Thank you for your efforts
greeting Tag: Typeperf Tag: 40769
Microsoft Printer Language Monitor
Hello All:
The Story so far
----------------
I want to compress a PCL output file via a standard UNIDRV based
printer driver in w2k. I need to do this so that a compressed PCL file
is read by another custom tool which will extract and interpret the
PCL Data.
To do this, I need a language monitor with my unidrv based printer
driver. According to my picture, The story goes that the pcl data is
received in the language monitor from the print processor. The
language monitor will compress and send the data to microsoft's own
port monitor via the FILE port and the file is saved and compressed.
Problem:
--------
I have compiled Microsoft's own sample of a language monitor, namely
the pjlmon package but I only could do this if I change the following:
1: There is a case statement with a syntax error using a ';' instead
of ':'
2: The assignments to the function pointer types mismatch so I had to
create wrappers which match those in the MONITOREX structure used in
the sample.
I installed microsoft's language monitor successfully after some
hassle but I still have more issues. Namely:
1: I had to remove references to critical sections everywhere.
2: I had to remove a validation UpdateTimeoutsFromRegistry in the
InitializePrintMonitor.
My problem is that my WritePort in the sample is not being called. I
have included some file output traces to check for this.
I also see that in MSDN, docs state that InitializePrintMonitor2 is to
be used for language monitors. It is not the case in MS's own sample.
Does anyone have experience on MS Language Monitors who can shed a
light upon my problem please?
Thanks and Best Regards
Duncan Camilleri Tag: Typeperf Tag: 40767
DiskPerf Crashes.
Hi Guys
I am using Win XP Pro SP1 for developing a simple device driver.
As i am a beginner i wanted to test the DIskperf.sys provided in the DDK
kit.
I have two hard disks connected in my system say disk1 and disk2
disk2 is the secondary slave.
so i install the diskperf.sys in disk2 ..
as
addfilter /device \disk2 /add diskperf.sys
after that i restart the system
then i can see that my disk2 is not at all recognized.
To solve the problem i go to Device Manager,uninstall Disk2 and again do a
scan for plug and play hardware.
This seems to be a recurring problem.
Any help is awaited...
Expecting replies
Regards
Shalini Tag: Typeperf Tag: 40762
Does anyone know what the image size is for an install of typeperf in XPE