Forcing spool files to contain EMF
Hi again,
After reading some material on printers, and asking questions in
forums, I am still confused.
So I thought I might try to rephrase my question and get a better
answer.
My final goal - Get an EMF from EVERY print that is issued (on every
printer installed and from every application), analyze it, and stop or
resume the print.
I know EMF is undocumented, but these are my requirements so I want to
stick to it in the meantime.
My idea was to somehow make sure all spool files will contain EMF and
not text or RAW. (And extract the EMF from the spool file)
If I'll send all prints through a dummy printer driver (maybe I'll
change in the registry and put my printer driver for all installed
printers) which is local and always uses "Advance printing
features" (set from the code) I should accomplish this?
Is there another possibility?
After I analyze the EMF, if I decide so, I can resend the spool file to
a real printer to be printed. (Using OpenPrinter and WritePrinter).
Again, this solution has to work on both local and network printer
(eventually, I need the EMF on my system not on a remote one)
Thanks. Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79594
KS filter driver fails remove data format
Hi,
I am trying to build a video capture filter driver upon on webcam WDM
driver. I need to remove some format such as MJPEG for post image
processing. Now I encountered a problem.
>From the MSDN of KS Data Formats and Data Ranges, KS filter reports all
dataformat information thru KSPROPERTY_PIN_DATARANGES and
KSPROPERTY_PIN_CONSTRAINEDDATARANGES. And clients use
KSPROPERTY_PIN_PROPOSEDATAFORMAT and KSPROPERTY_PIN_DATAINTERSECTION to
quest the format supportted status.
In IRP complete routine, I did get the stream class returned datarange
information at KSPROPERTY_PIN_DATARANGES , then I removed the format as
following
case KSPROPERTY_PIN_DATARANGES:
if(lOut){
PKSDATARANGE pDataRange;
PKS_DATARANGE_VIDEO pdataRangeVideo;
PKSMULTIPLE_ITEM pKsMI;
PKS_VIDEOINFOHEADER pKsVideoIH;
ULONG i;
// SystemBuffer is used to transfer the returned
supportted fomat.
pKsMI = (PKSMULTIPLE_ITEM) pSys;
pKsMI->Count = 5; //Note that totle color format has
10 items
pKsMI->Size = 1488;
pDataRange = (PKSDATARANGE) ((PBYTE)pKsMI +
sizeof(KSMULTIPLE_ITEM));
for(i=0; i< pKsMI->Count; i++)
{
pDataRange->Flags =
PinDefaultDataRanges[i]->Flags;
pDataRange->FormatSize =
PinDefaultDataRanges[i]->FormatSize;
pDataRange->Reserved =
PinDefaultDataRanges[i]->Reserved;
pDataRange->SampleSize =
PinDefaultDataRanges[i]->SampleSize;
memcpy(&pDataRange->MajorFormat,
&PinDefaultDataRanges[i]->MajorFormat, sizeof(GUID));
memcpy(&pDataRange->SubFormat,
&PinDefaultDataRanges[i]->SubFormat, sizeof(GUID));
memcpy(&pDataRange->Specifier,
&PinDefaultDataRanges[i]->Specifier, sizeof(GUID));
pDataRange = (PKSDATARANGE)((PBYTE) pDataRange +
pDataRange->FormatSize);
}
}
else
Irp->IoStatus.Information = 1488;
break;
In the KSPROPERTY_PIN_DATAINTERSECTION, similar modificatin is made.
But after that, amcap can not preview, it reports "Error 80004002:
Cannot find VCapture:IAMStreamConfig", followed with "This graph cannot
preview" message.
I can not found the reason for this failure. Can anyone tell me the
clue to resolve this problem? How to change the dataformat in the video
capture upper filter driver?
Thanks in advance! Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79586
STATUS_WDF_FORWARDED and KMDF 1.1
I have a driver that compiled fine under 01.00.5054, that is now giving me
grief under KMDF 1.1.
Among other things, the status STATUS_WDF_FORWARDED has disappeared.
Instead, the call to WdfRequestForwardToQueue, simply returns
STATUS_SUCCESS, if successful.
While I understand that this is consistant with a lot of the DDK, I (of
course) have conditional logic that does not complete the IRP if the request
has been successfully forwarded.
What's the best way to handle this now?
G Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79573
RDR bug?
The scenario:
1) Two different CDs with different \autorun.inf on them. In other words,
the file names are the same, the content differ.
2) Two PCs in a LAN, the server and client
3) The CD drive on the server is shared; it's just a normal share with
default settings.
4) Insert CD1 on the server.
5) Open and read \\Share\CD\autorun.inf on the client. All is OK.
6) Eject CD1, insert CD2.
7) Open and read \\Share\CD\autorun.inf. Now either CreateFile() fails with
Win32 error 34 (ERROR_WRONG _DISK), or ReadFile() returns the old content
from CD1. I can open all other files just fine, but not the files with the
same name which were opened previously. Say, if I have \setup.exe on both
CD1 and CD2, but I didn't open setup.exe at step 5, I can access CD2's
setup.exe on step 7.
How can flush the RDR cache on the client programmatically, instead of
having to reboot the server or recreate the share every time? Thanks.
A. Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79568
What is the best strategy to retrieve data from video driver? I am
Hi,
I am trying to retrieve basic data from video driver via ExtEscape.
But the problem is I am getting blue screen of death.
I have a data structure
typedef struct _DispCmdQueue {
RECTL queue[2000];
INT queueHeadIndex, queueTailIndex;
INT queueSize;
} RectQueue, *PRectQueue;
In the main function I am creating a
RectQueue rectQueue;
Then I am calling the driver
ExtEscape(hdc,0,0,NULL, sizeof(rectQueue), (char *)&rectQueue);
And in the driver I am trying to set one field of the structure like that
ULONG
DrvEscape(
IN SURFOBJ *pso,
IN ULONG iEsc,
IN ULONG cjIn,
IN PVOID pvIn,
IN ULONG cjOut,
OUT PVOID pvOut)
{
PRectQueue userPRectQueue = (PRectQueue) pvOut;
userPRectQueue->queueTailIndex = 1;
}
But I am getting blue screen and machine needs reboot.
Any suggestion.
Sincerely,
Omer Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79564
Winqual: Error encountered during new submission creation
Hello
I have been trying rather unsuccessfully to create a new submission for the
last few days.
After I add the test logs I receive an error message " ...does not appear to
contain valid logs for the selected operating system"
All tests have passed and the Submission viewer doesnt not indicate any
problems either
Has anyone experienced a similar problem.... ?
Is there a problem with creating the cab files if you have a dual boot
machine .... and the OS and HCT are not installed on the C drive ?
Does the winqual site have a problem with the inf in the parent directory
and drivers for x86/x64 listed in sub directories
(e.g., Parent dir (xxx.inf)
subdir x86 (xxx.sys for x86)
subdir x64 (xxx.sys for x64)
)
Any help would be appreciated
Thanks
--rr Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79561
DevCon Sample
Hi
I am looking for sample code that makes use of the DevCon application to
enable/disable devices
I look for the following methods:
Using DevCon Classes and ListClass method to list to the user the list of
devices (not all) in a readable format
Based on the data returned from the DevCon, retrieve the device specific
data to use later to enable/disable that device (something like Hardware ID)
Thank you,
Samuel Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79558
Listening to broadcasts for a port using TDI
Hi,
I'm attempting to write a function for a kernel driver of ours that will
listen for a UDP broadcast on a specified port. I'm attempting to
communicate with a device on the network that when given a directed UDP
packet on a specified port unfortunately responds with a UDP broadcast to a
different port.
I tried to do an IoCallDriver call with an IRP created with
TdiBuildQueryInformation and a QType of TDI_QUERY_BROADCAST_ADDRESS to obtain
the broadcast address of the local-node. I get a status of STATUS_CANCELLED
returned.
I have many functions in our kernel drive that can communicate via UDP and
TCP successfully, but I can't seem to create a connection to the local
broadcast address. These functions work with abstract "Sockets". I know
there are no sockets like in WinSock2 in the kernel space, but our functions
use this concept via the IoGetDeviceObjectPointer call, etc., etc.. So I
have a function that will successfully create a "Socket" and with this
"Socket" I try to:
1. Find the local-node broadcast address via TdiBuildQueryInformation.
(Unsuccessfully.)
2. Attempt to bind to 0xFFFFFFFF and setup a TDI_EVENT_RECEIVE_DATAGRAM
event handler. I see the broadcast using Etherpeek, but the event handler is
never fired.
So I know that the code I have that creates a "Socket" works because I use
it all over the driver code and it works. However, I'm not sure if I have to
create the "Socket" a little different because I want to use it to accept
broadcasts. I know that in WinSock2 you have to open the socket and prime,
or set the broadcast option, to use broadcasts. It would seem logical that
there was some sort of priming needed in the kernel space using TDI also.
Any help on this subject would be much appreciated.
Thanks,
-David G Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79555
one more question about DEVMODE private data
Hello!
Has anybody ever used DEVMODE private data to transfer some data from one to
another module?
I found out that there are some problems. To fill private members I use the
following:
PCBUSERDATA pUserData = (PCBUSERDATA) pCallbackParam->UserData;
POEMDEV pOEMDev = (POEMDEV)pUserData->pOEMUIParam->pOEMDM;
pOEMDev->>dwDriverData = 1;
pOEMDev->>dwDriverData1 = 2;
The field dmDriverExtra of DEVMODE has strange value. And there is trash
in the following address:
PVOID pvDriverData = (PVOID) (((BYTE *) pdm) + (pdm->dmSize));
where pdm is a starting address of DEVMODE structure.
Can you help me?
Thank you. Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79549
Programatically make the Network Interface Card led flash
Most of the RJ45 connector on netword card now have two led.
We bought a Intel Pro/1000 MT dual port adapter. It came with the
ProSet software. One nice feature of this software is a botton to make
one of the two led on the RJ45 connector flashed for 120 second to help
identify the card.
How can i use this feature in a c++ program. Also is it possible to do
the same thing in onboard NIC. Most of the DELL and IBM computer use
BroadCom NetXTreme chip as their NIC. A i would like to control one of
these led.
Thanks. Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79547
Error while accessing Video Mini Port Driver
Hello,
I've been searching for a long time to get an information about I2C
interface function calls. I am trying to send DDC commands over I2C bus
to Monitor. I've used WDM Src\WDM\...\ATIShare source code template to
do this.
With the code, given below, I am able to get I2COpen & I2CAccess
function pointers from Video Adapter.(that supports I2C Interface)
But calling I2COpen function always fails and returns 0xC00000C2 error
code. It is
defined in ntstatus.h as
#define STATUS_ADAPTER_HARDWARE_ERROR ((NTSTATUS)0xC00000C2L)
There is no documentation available for this. Does anyone have any
information about the sequence of calls to be issued to access the I2C
Interface? Any help is appreciated.
I'm calling LockI2Cprovider function after LocateAttachI2CProvider
function call. The program fails in LockI2Cprovider () function.
BOOLEAN
LocateAttachI2CProvider(
PDEVICE_OBJECT pVideoDeviceObject,
PI2C_CONTEXT pstI2CContext
)
{
PIRP pIrp;
BOOLEAN bResult = FALSE;
PIO_STACK_LOCATION pNextStack;
NTSTATUS ntStatus;
KEVENT Event;
I2CINTERFACE* pI2CInterface;
if (pVideoDeviceObject == NULL || pstI2CContext == NULL)
{
return FALSE;
}
pI2CInterface = pstI2CContext->m_i2cProviderInterface;
if (pI2CInterface == NULL)
{
return FALSE;
}
pIrp = IoAllocateIrp (pVideoDeviceObject->StackSize, FALSE);
if( pIrp == NULL)
{
return FALSE;
}
pNextStack = IoGetNextIrpStackLocation (pIrp); // original
if (pNextStack == NULL)
{
return FALSE;
}
pIrp->IoStatus.Status = STATUS_NOT_SUPPORTED;
pNextStack->MajorFunction = (UCHAR)IRP_MJ_PNP;
pNextStack->MinorFunction = IRP_MN_QUERY_INTERFACE;
KeInitializeEvent( &Event, NotificationEvent, FALSE);
IoSetCompletionRoutine (
pIrp,
I2CScriptIoSynchCompletionRoutine,
&Event,
TRUE,
TRUE,
TRUE);
pNextStack->Parameters.QueryInterface.InterfaceType =
(struct _GUID *)
&GUID_I2C_INTERFACE;
pNextStack->Parameters.QueryInterface.Size =
sizeof( I2CINTERFACE);
pNextStack->Parameters.QueryInterface.Version = 1;
pNextStack->Parameters.QueryInterface.Interface =
(PINTERFACE) pI2CInterface;
pNextStack->Parameters.QueryInterface.InterfaceSpecificData = NULL;
ntStatus = IoCallDriver (pVideoDeviceObject, pIrp);
if( ntStatus == STATUS_PENDING)
{
KeWaitForSingleObject(
&Event,
Suspended,
KernelMode,
FALSE,
NULL);
}
if ((pI2CInterface->i2cOpen == NULL) ||
(pI2CInterface->i2cAccess == NULL))
{
return FALSE;
}
else
{
DebugPrint ("deviceInfo->m_i2cProviderInterface->i2cOpen 0x%x",
pI2CInterface->i2cOpen);
DebugPrint ("deviceInfo->m_i2cProviderInterface->i2cAccess
0x%x",
pI2CInterface->i2cAccess);
}
pstI2CContext->m_pdoDriver= pVideoDeviceObject;
bResult = TRUE;
if( pIrp != NULL)
IoFreeIrp( pIrp);
return bResult;
}
BOOLEAN LockI2CProvider (PI2C_CONTEXT pstContext)
{
NTSTATUS status;
if ((pstContext->m_i2cProviderInterface->i2cOpen == NULL) ||
(pstContext->m_i2cProviderInterface->i2cAccess == NULL) ||
(pstContext->m_pdoDriver == NULL))
{
return FALSE;
}
pstContext->i2cAccessBlock->Status = I2C_STATUS_NOERROR;
status = pstContext->m_i2cProviderInterface->i2cOpen (
pstContext->m_pdoDriver,
TRUE,
pstContext->i2cAccessBlock);
if (status != STATUS_SUCCESS)
{
DebugPrint ( "CI2CScript: LockI2CProvider() status =
0x%lx\n",
status);
return FALSE;
}
pstContext->m_dwI2CAccessKey =
pstContext->i2cAccessBlock->dwCookie;
DebugPrint ("LockI2CProvider m_dwI2CAccessKey %ld",
pstContext->i2cAccessBlock->dwCookie);
return TRUE;
}
Thanks
VK Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79538
I want to capture keystokes at first
Hi,
I am working on windows driver develpoment for USB keyboard.
Data from UHC comes in form of usb packets i.e URB. Can anyone please
tell me where i will get exact data or characer from URB at first.
Whether i can capture exact data(character) at first in
hidusb.sys/hidclass.sys/kbdhid class mapper driver or in some other
driver?
Please give me necessary inputs regarding this.
Thanks in advance,
nash
--
nash
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------ Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79533
Win98 Smartcard Reader Hot plug-in problem
My Win98 USB Reader driver works well if USB reader plugged before Win98
boot. But if I plugged reader after Win98 boot, seems pc/sc manager couldn't
talk to
driver correctly. From driver debug, I found all driver PnP enumerate IRP
worked well, but driver couldn't get smartcard service request. I wonder if
pc/sc manager support USB reader hot plug-in in Win98? Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79527
HCT12.1 DrverPath Test got 0x000000C4(0x00000090...) Bluescreen
Hello Everyone:
I run HCT12.1 DevicePath Test for my smartcard reader driver, it got
bluescreen with 0x000000C4(0x00000090..) message. But if I run DDK tool
dc2.exe in command line for my driver, like: dc2 /hct /dr drivername. It
PASSED. What's the different between these two kinds of tests??
When I got BS, how to use the dump file ? I have tried to open dump file in
windbg, it returned"symbol not found", I have added pdb file into the "symbol
path". Any more setting I need ?
Thank you for everyone's attention! Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79525
"KsPinGetFirstCloneStreamPointer" is failing
Hello,
I am writing AVstream minidriver and new to direct show. I am
using "KsPinGetFirstCloneStreamPointer" function to clone stream buffer
and Its some time its failing and some times its not.
1) What are the reasons for failing this fucntion?
2)A Basic question why it is required to clone?
Please help me out to get answers to these question.
Thanks and Regds,
Darshan Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79522
How to send a simple MIDI-note on a soundcard?
I am a newbie in kernel-streaming topics and the drivers...
All I need is to play a midi-note in windows kernel-mode. Like
MidiOutShortMessage in WinAPI.
Where can I read the manuals or examles? Must I use IMiniport
interfaces or
create complex streams? But how to use this IMiniport interfaces I
don't
understand completely.
All I understand now is to find some PortMidi in system, create a new
stream
in his Mimiport and to write data. But I don't knpw how to find this
Port. I
think, there is no need in creating new port.
Can you give me code-examples or even ready code? It is easier to
understand
topics with examples.
I must implement this in coming days, it is my home task in university.
--
Avtoritet
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------ Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79517
How to send USB Set_Idle request to HID driver?
I have a USB mouse device that repeatedly sends reports even when
nothing has changed. I need to issue a USB Set_Idle request to tell it
to only report changes. This mouse uses the built-in HID class driver
that's part of Windows.
Can this be done from a user-mode app? I looked at al the HidD_Xyz
functions, but didn't see anything. If this can only be done from a
driver, how would I go about getting a reference to the standard HID
class driver associated with this device so I can send it a USB URB?
I tried using IoGetDeviceInterfaces( &GUID_DEVINTERFACE_HID ) and
calling IoGetDeviceObjectPointer on every device it found, but it
failed with every device. Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79516
Why doesn't mirror driver catch BitBlt sometimes?
my mirror driver can catch BitBlt call. But I noticed that it's failed
to catch BitBlt sometimes immediately after I change the screen
resolution. I want the mirror driver be able to capture the whole
screen at first by using
BitBlt(hdc2,0,0,SCREEN_WIDTH,SCREEN_HEIGHT,hdc1,0,0,SRCCOPY)). I found
that BitBlt was executed successfully, But mirror driver didn't capture
it. why? BTW, if I right click the task bar and select show the
Desktop, the mirror driver may capture the whole screen always.
Does anyone help me out? any comment? Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79515
WMI Property Page for Driver
I have added WMI support for the driver and I can access the class and
the properties using wbemtest and other utlilities.
However, there is something that the DDK mentions about having a
Property Page and I am not able to see where the propety page comes or
how to enable the property page ?
I have browed theough the device manager, services menu et al but I
cant find it.
this is what the DDK says...
"Drivers can automatically expose any WMI classes they implement on
their property sheet by using the WMI generic property page provider."
I have enabled everything through the INF that the DDK says about the
property page provider and the co-installer as below, but I still can't
find the damn property page..neither in the device manger( by right
clicking the device or elsewhere). Any help is appreciated.
Thanks.
This is from the DDK and I am doing everything as below.
Enabling the Generic Property Page Provider
To use the WMI generic property page provider with your driver, you
must enable wmiprop.dll as a device co-installer.
In the CoInstaller add-registry-section, register wmiprop.dll as a
co-installer for the WMI class by adding a value entry for the class
GUID under the HKLM\System\CurrentControlSet\Control\CoDeviceInstallers
key. The value for the value entry is "WmiProp.dll,
WmiPropCoInstaller". For example:
; This section is defined in the CoInstaller section, as follows.
; [CoInstaller]
; AddReg = CoInstaller_AddReg
[CoInstaller_AddReg]
HKLM, System\CurrentControlSet\Control\CoDeviceInstallers, ClassGUID,
0x00010000, "WmiProp.dll, WmiPropCoInstaller"
ClassGUID is the GUID for the WMI class. See Registering a Class
Co-installer for details.
You must also specify the particular WMI classes to be exposed through
the generic property provider. To do this, set the WmiConfigClasses
value-entry to be a comma-separated list of the WMI classes in the
add-registry-section of the device class or device hardware instance.
; the device class AddReg section.
[device_class_AddReg]
HKR,,"WmiConfigClasses",0x00000000,"class1,class2"
; the device hardware instance AddReg section.
[device_hw_inst_AddReg]
HKR,,"WmiConfigClasses",0x00000000,"class3" Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79511
Pen Drive Ids
As I obtain this information of pen drive? (vendorid, productid...)
Use XP SP2 and VB.net 2005
Some idea?
Thanks! Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79510
Help with Hidd_GetAttributes
The Hidd_GetAttributes function does not return the information to me of my
device USB (they pen drive). It returns all 0.
GetLastError returns code 50.
Use XP SP2 and VB.net 2005
Some idea?
Thanks!
PS: CreateFile works OK Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79502
Driver project configuration.
Hi all,
I'm interested in developing Win32 device drivers using the Visual Studio
.NET 2003 IDE. (I'm purposely trying to avoid using DDK make files for
internal maintenance reasons - trust me, they warrant this action.) Since I'm
developing the drivers from scratch I thought I should be able to do this
without problems. I've read a few articles about device driver development
and have successfully implemented an example driver using the IDE by
manually specifying the necessary compiler switches, but I'm not sure how to
make certain features work. For example, if I enable C++ exception
handling, I receive the following link error:
Defs.obj : error LNK2019: unresolved external symbol __CxxThrowException@8
referenced in function "void * __cdecl operator new(unsigned int,enum
EMemPool)" (??2@YAPAXIW4EMemPool@@@Z)
I discovered that if I manually link in the "libcmt.lib" library then the
symbol is resolved, but this is no good because it results in the following
link errors (as I expected):
kernel32.lib(KERNEL32.dll) : warning LNK4237: /SUBSYSTEM:NATIVE specified
when importing from 'KERNEL32.DLL'; Use /SUBSYSTEM:CONSOLE or
/SUBSYSTEM:WINDOWS.
LINK : warning LNK4078: multiple '.rdata' sections found with different
attributes (C0000040)
My project is obviously implemented in C++. Now, I know just about every
driver developer out there is thinking that one should never use C++ in
drivers, but I have yet to discover any compelling reason why, so unless you've
got one, please don't respond to this post only to bark at me about how C++
is evil (or whatever.) Please understand that when you respond to the post
others that have the answers I need won't because they will assume I have
received the information I need.
I've overridden the global new and delete operators so I can control whether
memory is allocated from the paged or non-paged pool and I've carefully
selected my compiler switches to insure that all necessary sections exist
and have the proper attributes. At this time it seems that the only problem
I have is that I'm missing the VC++ exception handling routines that live
the CRT libraries. So I either have to not use exceptions, which is a major
loss to me, or find out how to resolve these symbols. Can anyone point me
in the right direction?
I'm also not sure what I'll be loosing by opting not to use the DDK build
system (make files) and using the VS.NET 2003 IDE instead. Is there
anything or do the make files primarily just configure build switches, etc?
Thanks in advance,
Matt Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79501
Mount manager and virtual disk drive
Hello,
I devloped a virtual disk driver based on the ramdisk sample several years
ago.
Now we found out, that I can't share the drives on the network or defrag it.
Every time I try create a share name I get an error like
"device or directory dosen't exist".
I guess that IoRegisterDeviceInterface () may solve my problem, but I don't
have a PDO...
Can swenum supply me a "virtual PDO" ?
Is there anywhere a sample for swenum?
Regards
Kalle Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79495
KSDATARANGE problem (AVSTREAM)
Hello.
i defined a several struct describing output pin resolution of AVSTREM
minidriver like this
#define D_X 160
#define D_Y 120
const KS_DATARANGE_VIDEO FormatRGB24Bpp_Capture0 =
{
// KSDATARANGE
{
sizeof (KS_DATARANGE_VIDEO), // FormatSize
0, // Flags (Ignored)
D_X * D_Y * 3, // SampleSize (Ignored)
0, // Reserved (Reserved)
STATICGUIDOF( KSDATAFORMAT_TYPE_VIDEO ), // aka. MEDIATYPE_Video
0xe436eb7d, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b,
0xa7, 0x70, //MEDIASUBTYPE_RGB24,
STATICGUIDOF( KSDATAFORMAT_SPECIFIER_VIDEOINFO ) // aka.
FORMAT_VideoInfo
},
TRUE, // BOOL, bFixedSizeSamples (all samples same size?)
TRUE, // BOOL, bTemporalCompression (all I frames?)
KS_VIDEOSTREAM_CAPTURE,// Reserved (was StreamDescriptionFlags)
0, // Reserved (was MemoryAllocationFlags
(KS_VIDEO_ALLOC_*))
// _KS_VIDEO_STREAM_CONFIG_CAPS
{
STATICGUIDOF( KSDATAFORMAT_SPECIFIER_VIDEOINFO ), // GUID
KS_AnalogVideo_None,
D_X, D_Y, // InputSize, (the inherent size of the incoming signal
// with every digitized pixel unique)
D_X, D_Y, // MinCroppingSize, smallest rcSrc cropping
rect allowed
D_X, D_Y, // MaxCroppingSize, largest rcSrc cropping
rect allowed
1, // CropGranularityX, granularity of cropping
size
1, // CropGranularityY
1, // CropAlignX, alignment of cropping rect
1, // CropAlignY;
D_X, D_Y, // MinOutputSize, smallest bitmap stream can
produce
D_X, D_Y, // MaxOutputSize, largest bitmap stream can
produce
1, // OutputGranularityX, granularity of output
bitmap size
1, // OutputGranularityY;
0, // StretchTapsX
0, // StretchTapsY
0, // ShrinkTapsX
0, // ShrinkTapsY
333333, // MinFrameInterval, 100 nS units
10000000, // MaxFrameInterval, 100 nS units
8 * 3 * 1 * D_X * D_Y, // MinBitsPerSecond;
8 * 3 * 30 * D_X * D_Y // MaxBitsPerSecond;
},
// KS_VIDEOINFOHEADER
{
0,0,0,0, // RECT rcSource;
0,0,0,0, // RECT rcTarget;
D_X * D_Y * 8 * 3 * 30, // DWORD dwBitRate;
0L, // DWORD dwBitErrorRate;
333333, // REFERENCE_TIME
AvgTimePerFrame;
// KS_BITMAPINFOHEADER
sizeof (KS_BITMAPINFOHEADER), // DWORD biSize;
D_X, // LONG biWidth;
D_Y, // LONG biHeight;
1, // WORD biPlanes;
24, // WORD biBitCount;
KS_BI_RGB, // DWORD biCompression;
D_X * D_Y * 3, // DWORD biSizeImage;
0, // LONG biXPelsPerMeter;
0, // LONG biYPelsPerMeter;
0, // DWORD biClrUsed;
0 // DWORD biClrImportant;
}
};
#undef D_X
#undef D_Y
And found one problem, when i defined a several resolutions with 160 width
(for i.e. 160x120, 160x128, 160x140) AMCAP incorrectly draws resolution list
in stream format dialog resolution list - some items is on the incorerect
position (i suppose that they should appear in the order as i define it in
KSPIN_DESCRIPTOR_EX) and another bug is when i select 160x120 and then opens
this dialog again the current selection is 160x140 :(
Can anybody advise what the problem is?
Thanks.
-Tulup Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79488
Which class to use?
Hi to all,
i am planning to start developing a usb device which has to send continious
numbers to the application. I don't want to write a driver. Can i use the
drivers already existing. If so which device class can i use for that.
Pls shre ur knowledge with so that i can finish my mini project by capturing
continious data from usb. Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79484
how to get volume instance for a USB device ?
Anyone has any suggestion how the interface ID in the volume class can be
acquired based on a known USB drive ?
A parameter in USB device registry, "ParantIdIndex", contains the right
information, but there is no corresponding SPDRP_xxx for that parameter.
Thanks
-Gary Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79472
Printing drivers architecture
Hi
I've read the information in the DDK about the printing architecture
and I have several questions:
1. Is there a better documentation about the printing architecture then
the MSDN?
2. Why some printers print in raw and some in EMF? How this decision is
being taken after an application is issuing a "Print" command?
Is there a way to always produce an EMF file instead of RAW, regardless
the printer being used?
3. My goal is eventually to get an EMF file from each print request,
analyze it and block / deny the printing. So, Where in the "chain"
is the best place to enter to do such a thing?
Thanks Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79463
Printing drivers architecture
Hi
I've read the information in the DDK about the printing architecture
and I have several questions:
1. Is there a better documentation about the printing architecture then
the MSDN?
2. Why some printers print in raw and some in EMF? How this decision is
being taken after an application is issuing a "Print" command?
Is there a way to always produce an EMF file regardless the printer
I'm using?
3. My goal is eventually to get an EMF file from each print request,
analyze it and block / deny the printing. So, Where in the "chain"
is the best place to enter to do such a thing?
Thanks Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79462
USB Selective suspend question again
Is there a possibility of race condition when canceling USB idle request?
From the WDK docum ( build 5356):
"The following list indicates the 3 most important sets of circumstances in
which a driver might cancel an idle request and specifies what the driver
must do in each case:
(1)The bus driver has not called the USB Idle Notification Callback Routine.
The driver must use IoCancelIrp to cancel the idle request IRP.
(2)The bus driver has called the USB idle notification callback routine.
Drivers must not cancel an idle request IRP within the idle notification
callback routine.
(3) ... If the device is already in a low power state, it is too late to
cancel the idle request IRP ... "
Since the bus driver calls the callback at passive IRQL, another
thread that tries to cancel the idle IRP needs some way to sync with it ?
OTOH if the idle IRP can be canceled in parallel with the callback,
but the driver needs to serialize something other (like sending D2 power irp),
please say exactly so.
Regards,
Pavel Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79459
Virtual Webcam followup, win98 install issues
Hi
I've successfully implemented a virtual webcam device driver which
plays video files , based on the TESTCAP DDK sample.
Its working perfectly on both Win2k/xp and Win98.
However, while on 2K/XP , i can install the driver automatically using
the sample utility provided in the DDK ( %BASEDIR%\SRC\SETUP\INSTALL ),
Im having trouble with doing that on Win98.
On Win98 im trying to use the CINSTALL utility. It recognizes the INF
file and installs the sys files and device manager shows the entry but
when i run AMCAP, I get an error "Could not create video capture filter
: 0x80070002" aka File not found.
Running a registry monitor shows that its failing to find some registry
keys after which it throws the error.
Using the Add hardware wizard works seamlessly.
Does anyone have a clue as to how to get this to work?
At the worst case, if someone could list the entire set of operations
that are done when installing a WDM kernel streaming driver, Ill make
my installl script perform those actions and get rid of the INF file
altogether.
The basic structure is identical to TESTCAP, so you can see that one's
INF file for details.
Thanks in advance Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79453
Serial port number in device manager
Hi!
I'm working with a driver for virtual serial port and can't make the
device manager display the correct port number. It seems to simply
increment them, i.e. the first time I create a port it displays e.g. 3,
the second time 4 and so on.
How can I make the device manager understand which port number is
correct? I've set the following:
\Device\COMn
\DosDevices\COMn (symbolic link)
..\DeviceMap\SERIALCOMM\COMn
Thanks in advance,
Nille Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79452
Any news on USB autorun (xp)?
Hey all,
I've been poking all over the net trying to see what the progress is on
getting USB drives to autorun/play. The closest thing anyone has come
up with is the funky U3 hack of tricking XP with a phony CD drive
work-around that leaves you with /two/ extra letters. Interesting
work-around, but a hack, never-the-less.
This autorun at least gets your program on the popup window, but it's
still not autorun.
[autorun]
action=Launch Portable Start Menu
icon=PStart.ico
open=PStart.exe
label=Monkey Man!
includeRuntimeComponents=True
Any progress on getting USB drives to autorun/play? Any word from MS?
-b Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79450
Help! How to get the DriverObject of PCI
Let me clarify the problem I am facing with now.
We have a PCIe controller which includes a PCI bridge device and another PCI
device. Our driver only controls the PCI device while the PCI bridge device
is handled by Windows PCI driver. Now due to a hardware problem, I need to
access PCI configuration space of the bridge device. Well, by following the
rules of WDM, I wrote a PCI bus filter driver to filter pci.sys. This filter
driver sends IRP_MJ_PNP/IRP_MN_QUERY_INTERFACE with InterfaceType
GUID_PCI_BUS_INTERFACE_STANDARD to the PCI driver to get the
PCI_BUS_INTERFACE_STANDARD. And then our original driver communicates with
this filter driver and uses
PCI_BUS_INTERFACE_STANDARD.ReadConfig/WriteConfig to enumerate and access
any PCI devices on the system.
This works fine. However, I am looking for a simpler solution (two driver
solution is not convinient for user and I don't know if a PCI bus filter
driver is elligible for WHQL or not).
First of all, I thought I could use IoGetDeviceObjectPointer to get the DO
of PCI driver if it is created with a name, unfortunately it looks like the
DO is created without a name.
Now I thought if I could get the DriverObject of the PCI driver, then I
should be able find the PCI DO by walking through the
DriverObject->DeviceObject list. I know this list holds the PCI FDO and
PDOs for all enumerated PCI devices, however I can tell which is the FDO I
needed by checking DeviceObject->Flags.
Well, then now I am looking for a documented (or at least stable among
different Windows versions) solution to find the DriverObject of PCI. By
playing with WinDbg, it looks like I can find the PCI driver by walking
through DeviceObject->DeviceObjectExtension->AttachedTo starts with my own
DeviceObject. Unfortunately DeviceObjectExtension->AttachedTo is not a
documented field.
WinDbg command `!drvobj pci` to get the DriverObject of PCI driver. So does
WinDbg command `!object \driver\pci`. I don't know how WinDbg implements
these commands. Maybe it checks \driver in the object directory and matches
with the name, However, it looks like Windows doesn't publish the DDIs
needed to query objects under \driver directory. And also I don't know how
to interprete the queried data.
The OSR tool DeviceTree now is shipped with Windows DDK. I believe it uses
undocument fields or APIs. If MS can accept that as its public tool, Could
MS make it published to simplify our developers' life?
As you see, I am running out of solution now. Maybe I missed something,
maybe I am wrong on something, Could anybody here help me to step out of it?
Thanks a lot! Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79449
private data in unidrv
Hello!
I just want to understand DDK unidrv example. As far as I've read unidrv can
include two plug-ins. So,I try OEMDEV structure to send some data from one to
another. But when I add some more fields in OEMDEV stucture (I mean besides
OEM_DMEXTRAHEADER and dwDriverData, which are happened in DDK example), the
data stopped to translate between the plug-ins. Is OEMDEV structure of a fix
size, or my private data should be described anywhere more?
To fill private members I use the following:
LONG APIENTRY OEMDocUICallBack(PCPSUICBPARAM pCallbackParam)
{
......
PCBUSERDATA pUserData = (PCBUSERDATA) pCallbackParam->UserData;
POEMDEV pOEMDev = (POEMDEV)pUserData->pOEMUIParam->pOEMDM;
........
pOEMDev->dwDriverData1 = 1;
pOEMDev->dwDriverData2 = 2;
pOEMDev->dwDriverData3 = 3;
.......
} Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79447
AddPrinterDriver
I want to install printer through programatically
For this i have used AddPrinterDriver function.
But i am getting an error saying
"1804-The specified data type is invalid. ERROR_INVALID_DATATYPE"
I have used DRIVER_INFO_3 structure.
The problem is comming while calling the AddprinterDriver function.
I am adding the piece of this code
Dinfo3.cVersion = 3 ;
Dinfo3.pEnvironment = "Windows NT x86" ;
Dinfo3.pName = "I TEQ" ;
Dinfo3.pDriverPath
="c:\\windows\\system32\\spool\\drivers\\w32x86\\3\\UNIDRV.DLL" ;
Dinfo3.pDataFile
="c:\\windows\\system32\\spool\\drivers\\w32x86\\3\\ITEQ.GPD" ;
Dinfo3.pConfigFile
="c:\\windows\\system32\\spool\\drivers\\w32x86\\3\\UNIDRVUI.DLL ;
Dinfo3.pHelpFile =
"c:\\windows\\system32\\spool\\drivers\\w32x86\\3\\UNIDRV.HLP" ;
Dinfo3.pDependentFiles ="UNIRES.DLL\0ITEQ.DLL\0ITEQ.GPD\0STDNAMES.Gpd\0\0" ;
Dinfo3.pMonitorName = NULL ;
Dinfo3.pDefaultDataType = "EMF" ;
BOOL RetValue = AddPrinterDriver(NULL,3,(LPBYTE)&Dinfo3);
Can anybody help me out of this problem.
-Shankar B. Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79444
Drivers for Toshiba Satellite Pro 6100
Hi,
I have installed win 2k pro on my laptop : toshiba satellite pro 6100.
On the device manager, i find conflict on "other devices" section. A
yellow question mark is near
1- Base System Device
2- Ethernet Controller
3- Multimedia Audio Controller
4- PCI Device
5- TOSHIBA wireless~_LAN_CARD
6- unknown device
i don't have the original CD. i looked in toshiba website and used
google but could not find the drivers
any help please?
many thanks Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79437
NdisQueryBuffer Performance
I am working on an NDIS driver and want to look at the Layer 2, IP and
TCP headers. I wanted to know how expensive of an operation
NdisQueryBuffer is for the buffers that contain
the headers.
Thanks. Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79435
Why no DEV_BROADCAST_HDR in WM_DEVICECHANGE ?
I am trying to catch up a USB driver insertion/removal with WM_DEVICECHANGE.
I called RegisterDeviceNotification() with GUID_DEVINTERFACE_DISK or
GUID_DEVINTERFACE_VOLUME, but in WM_DEVICECHANGE message, I can see only
DBT_DEVNODES_CHANGED. The parameters like wParam = DBT_DEVICEARRIVAL, and/or
lParam= DEV_BROACAST_HDR are never seen.
Any suggestion ?
My data structure when calling RegisterDeviceNotification() looks like:
ZeroMemory(pNotificationFilter, nSize);
pNotificationFilter->dbcc_size = nSize;
pNotificationFilter->dbcc_devicetype = DBT_DEVTYP_DEVICEINTERFACE;
pNotificationFilter->dbcc_classguid = InterfaceClassGuid;
memcpy(pNotificationFilter->dbcc_name,deviceName,sizeof(deviceName));
*hDevNotify =
RegisterDeviceNotification(hWnd,pNotificationFilter,DEVICE_NOTIFY_WINDOW_HANDLE);
Thanks
-Gary Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79434
PsSetLoadImageNotifyRoutine question on win2kSP4
Hello,
In my driver i have registered PsSetLoadImageNotifyRoutine. On windows 2000
Sp4 i only see *.exe and ntdll.dll loaded, as compare to xp where i see every
image file loaded. IS it something expected ??. The reason I am asking
because i was expecting on kernel32.dll notification and act accordingly
after kernel32.dll is mapped into process.
Thanks Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79419
MmMapViewInSystemSpace on XP 64 and S2K3 64 bugs
But I have a problem with mapping in system address space via
PVOID BaseAddress = NULL;
SIZE_T RegionLength = length;
NTSTATUS rc = MmMapViewInSystemSpace ((PVOID)hSection, &BaseAddress,
&RegionLength);
Sometime one file mapped on already used and referenced BaseAddress for
another file.
It's only happened on x64. Anybody have this problem? Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79414
your help urgently required..........
hello all,
i am anil, Mr.Bruno said that alex posted the solution to my situation in
some other group, I am accessing this group using OUTLOOK EXpress. but i am
unable trace that group. can u help to specify that group.
i will seach over there for solution. I nearly worked on it for 4 hrs. But i
didnot get it.
i am really sorry, because i am again creating new thread here.
by specifying problem once again.
i have got some opensource project. that is related to USB sniffing. tha t
is snoopypro. Actalluy this is developed under Microsoft visual c++.
i am getting the folloeing problems at following code. can u update me
please, this code atuclly in
winddk.h
static __inline struct _KPCR * KeGetCurrentKPCR(VOID)
{
ULONG Value;
__asm__ __volatile__ ("movl %%fs:0x18, %0\n\t"
: "=r" (Value)
: /* no inputs */
);
return (struct _KPCR *) Value;
}
errors: 1.c:\Documents and
Settings\Anil_Desktop\Desktop\SnoopyProSrc\SnoopyPro\wind dk.h(124): error
C2065: '__asm__' : undeclared identifier
2.c:\Documents and
Settings\Anil_Desktop\Desktop\SnoopyProSrc\SnoopyPro\wind dk.h(124): error
C2146: syntax error : missing ';' before identifier '__vola tile__'
3.c:\Documents and
Settings\ANil_Desktop\Desktop\SnoopyProSrc\SnoopyPro\wind dk.h(125): error
C2143: syntax error : missing ')' before ':'
4.c:\Documents and
Settings\ANUPAMA_Desktop\Desktop\SnoopyProSrc\SnoopyPro\w inddk.h(127):
error C2059: syntax error : ')'
5.c:\Documents and Settings\ANUPAMA_Desktop\Desktop\SnoopyP
roSrc\SnoopyPro\w inddk.h(124): error C3861: '__volatile__': identifier not
found,
even with argument-dependent lookup and some other warnings.
if anybody know correct solution , i require it urgently.
i think here we need inputs. If you identify those inputs, we
can solve(i think). plz suggest me..
i will wait for your replies. thank u all for spending
time to read it...
thank u,
Anil kumar Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79412
how to get the video stream format (filter driver)
Hi,
I have a filter driver for a webcam and I need to do some processing on the
video stream before sending it to the user app. The problem that I am facing
is that the camera supports multiple video formats (both multiple
resolutions and video encoding: RGB and YUV).
In the DDK documentation (the "KS Data Formats and Data Ranges" article) it
is said that the properties KSPROPERTY_PIN_DATARANGES,
KSPROPERTY_PIN_CONSTRAINEDDATARANGES, KSPROPERTY_PIN_PROPOSEDATAFORMAT and
KSPROPERTY_PIN_DATAINTERSECTION are used to querry the data format of the
pin, and KSPROPERTY_CONNECTION_DATAFORMAT to set the data format (or some
property of KSPROPERTY_Connection)
I have looked through all the property IOCTLs that my filter receives and I
did not find any KSPROPERTY_CONNECTION_DATAFORMAT ; the only IOCTLs from
this class that pass through my driver are KSPROPERTY_CONNECTION_STATE and
KSPROPERTY_CONNECTION_ALLOCATORFRAMING.
Does anyone know how is the stream format set at this level (basic IOCTLs
parsing), or at least a point where to look from? This should be closely
related to the way AVStream or USBCAMD uses to set the format.
BTW, as far as I could guess, it seems that the current format is the one
negociated by the last KSPROPERTY_PIN_DATAINTERSECTION, but i did not find
any information that it also sets the format, not only querry for a
supported one. Can anyone confirm this?
Also, I believe that the function driver below me I believe is a USBCAMD 2.0
minidriver.
Thanks,
Bogdan. Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79409
What error does it mean
I met this assert in W2K3 checked build with my IM driver and verifier turned
on:
*** Assertion failed: MiLockedCommit > 0
*** Source File: ..\mi.h, line 3415
What error does it mean ?
Peter Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79403
Please, someone at Microsoft could answare this issue!?
Question is marked at the end of this mail!!
I'm not able to avoid LanMan to process a request on \IPC$
I've my own redirector and I actually success the prefix claim to MUP:
Return SUCCESS to CreateSrvCall
Return SUCCESS to CreateVNetRoot
My redirector is the first in NP order list.
After this I should be the owner of \myserver\IPC$ so I espect to really
fail an OPEN on such netroot without LANMAN to take the control.
Application try to open \myserver\IPC$\srvsvc and \myserver\IPC$\wkssvc and
I've tried to return:
OBJECT_NOT_FOUND
NOT_SUPPORTED
NOT_IMPLEMENTED
INVALID_HANDEL
and so on...
after every successfull call to my prefix claim functions LANMAN always try
to open \myserver\IPC$ over the net, it holds win32 application for a long...
LANMAN must get a timeout before returning...
QUESTION **
I'd like to know if RDBSS addresses the \IPC$ OPEN to LANMAN without asking
MUP to get the right provider!!!!
Any of the STATUS code returned to CreateVNetRoot or Create successfull
avoid LANMAN to keep control of the request!!!!
Is it my fault or a RDBSS strange behaviour!?
Thanks to all
Ale Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79395
KMDF1.1 with Windows 2000 support
KMDF 1.1 with Windows 2000 support is available for download at
http://www.microsoft.com/whdc/driver/wdf/KMDF_pkg.mspx.
--
-Eliyas
This posting is provided "AS IS" with no warranties, and confers no rights.
http://www.microsoft.com/whdc/driver/kernel/KB-drv.mspx Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79394
USB Composite Device, Serial + Mass Storage, could not install ser
Hi All,
My current project need to implement a composite device which includes
Serial and Mass Storage. and without any special driver on windows.
I have made the Serial and Mass Storage work as a single function. To
install serial, I just create inf file then windows can find and setup it
correctly.
But, after I create a new composite device, I can still install the serial
port on windows by a new inf file but there is question mark (?) on my
virtual serial port and it could not be opened. I check my firmware and all
the USB request has been responsed. on windows XP, some things, during the
copy file of usbser.sys, windows xp will reboot. The mass storage device can
work without any problem.
Are there anybody here who know if it is possible to install a composite
device (CDC+Mass Storage) without and customer driver? (inf file is OK) Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79391
Regarding SCSI miniport driver in 64-bit
Hi All,
I am trying to port a SCSI miniport driver for a virtual HBA that is working
without
any problem in 32-bit to 64-bit. When I install the HBA (by plugging it to a
virtual
bus which is created using toaster sample), the DriverEntry() is called
followed
by FindAdapter(). after that the driver is unloaded and the device manager
gives
the CM error code 10. (failed to start).
The miniport driver is not using any resources. Following are the values I
use
for the HW_INITIALIZATION_DATA and PORT_CONFIGURATION_INFORMATION:
HW_INITIALIZATION_DATA:
1. HwInterrupt(), HwDmaStarted() and HwAdapterState() are not used (set to
NULL). Other functions are used.
2. NeedPhysicalAddresses is set to FALSE.
3. MapBuffers is set to TRUE.
4. NumberOfAccessRanges is set to 0.
5. TaggedQueuing is set to FALSE
6. MultipleRequestsPerLu is set to FALSE.
7. AutoRequestSense is set to FALSE.
8. ReceiveEvent is set to FALSE.
9. AdapterInterfaceType is set to Isa.
One thing I noticed is that the ScsiPortInitialize() returns STATUS_SUCCESS..
In PORT_CONFIGURATION_INFORMATION,
1. InterruptMode is set to LevelSensitive.
2. CachesData is set to FALSE.
3. MaximumNumberOfTargets = 6 (just for testing)
4. BufferAccessScsiPortControlled = TRUE
5. ScatterGather = FALSE
6. MapBuffers = TRUE
7. NeedPhysicalAddresses = FALSE
8. TaggedQueuing = FALSE
9. MultipleRequestsPerLu = FALSE
10. AutoRequestSense = FALSE
11. Master = FALSE.
Actually After FindAdapter(), the IRP_MN_REMOVE_DEVICE is called for the
adapter in the bus driver which unloads the driver. So, there should be some
problem in FindAdapter() that causes this. But same code works fine in 32-bit
without any problem.
When I examined the event log, I got following error:
Driver detected an internal error in its data structures for
\Device\Scsi\MyDrv1.
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
0000: 00 00 00 00 01 00 56 00 ......V.
0008: 00 00 00 00 04 00 04 c0 .......Ã?
0010: df fa ff ff bb 00 00 c0 �úÿÿ»..�
0018: 00 00 00 00 00 00 00 00 ........
0020: 00 00 00 00 00 00 00 00 ........
Thanks,
Killme. Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79383
Devcon sample weirdness
Does anyone know why the following:
_NT_TARGET_VERSION=$(_NT_TARGET_VERSION_WIN2K)
is necessary in the Vista WDK Devcon sources file for device enable/disable
functionality to work? I don't really have time to dig through the devnode
right now to figure this out. I am hoping someone from MSFT might be able
to give us a heads up on this?
Thanks.
Bill M. Tag: How to detect USB connect or not at Windows 98/ME ? Tag: 79381
Hi all,
My AP need to know device connect status at Windows 98/ME.
Is possible to know USB connected or not by checking Registry Key ?
Thanks for any hint.