UpdateDriverForPlugAndPlayDevices( ) question ..
Hi
Can we use this function to install (not update) new device, should it
cowork with
other SetupAPI function ?
What's the difference about the use flow of this function between real and
virtual device ?
Thank for your teaching. Tag: test only Tag: 107525
Ndis 6 MUX IM Sample is not using BackFill for adding VLAN tag in the
Hi All,
Why MUX IM is not using DataBackFillSize and request VLAN tag header
size in backfill? Instead it is allocating from look aside list every
time there is a send call. This seems to be inefficient. Any Ideas?
Thanks
Arun Tag: test only Tag: 107523
ndis equivalent for InterlockedExchangeAdd
Hi All
Is there any Ndis equivalent for InterlockedExchangeAdd that doesnt
use spin lock?
Thanks
Arun Tag: test only Tag: 107518
Redefinition of NDIS_STATUS_ * Macros
Hi All,
There are many macros in NDIS.H and other places that I need in a user-
mode application.
#include' ing <ndis.h> and compiling with Visual Studio generates many
errors, and it appears that interdependencies of driver-mode/user-mode
headers cannot be eliminated.
What is typical strategy for circumventing this problem?
TIA,
-Le Chaud Lapin- Tag: test only Tag: 107517
Custom OIDs for WMI in NDIS miniport driver
Hi Experts,
I am trying to add custom OIDs for WMI testing in my NDIS miniport
driver.
I have created MOF file describing the classes and defined and handled
the all the custom OIDs in driver.
I couldn't see my WMI classes in Wbemtest application after loading
the driver. When i try to enumerate the classes I am getting Invalid
Class error. I took the sample from WDK version 6000. The sample is
NDIS/e100bex.
All the WMI standard OIDs I can enumerate except my custom OIDs and
respective classes.
I have seen many posts WRT NDIS Miniport custom OIDs, I haven't found
useful information for on only custom NDIS Miniport OIDs. I hope
somebody will definately help me to get rid of this problem.
Thanks in advance, Your valuable advices/suggestions are always
appreciable.
Anvesh Tag: test only Tag: 107516
Ndis Miniport Custom OIDs for WMI
Hi Experts,
I am trying to add custom OIDs for WMI testing in my NDIS miniport
driver.
I have created MOF file describing the classes and defined and handled
all of those custom OIDs in my driver.
I couldn't see my WMI classes in Wbemtest application after loading
the driver. When i try to enumerate the classes I am getting Invalid
Class error. I took the sample from WDK version 6000. The sample is
NDIS/e100bex.
All the WMI standard OIDs I can enumerate except my custom OIDs and
respective classes.
I have seen many posts WRT NDIS Miniport custom OIDs, I haven't found
useful information for on only custom NDIS Miniport OIDs. I hope
somebody will definately help me to get rid of this problem.
Thanks in advance, Your valuable advices/suggestions are always
appreciable.
Anvesh Tag: test only Tag: 107515
KSMETHOD_TYPE_SOURCE: what it actually means
I am trying to implement KSMETHOD on the AVStream mini-driver we
developed. I would like to implement an asynchronous handling of the
IRP passed into the methodhandler where data will be filled by the
device into the output buffer through DMA (data will be in the order
of megabytes). For this I believe that the output buffer should be
directly passed into the driver, i.e. MDL for output buffer should be
created with probe and lock.
After going through KSMETHOD_ITEM>Flags member documentation I think
it is done by the class driver but could not make out how to specify
what I want. The confusion arise because of the way
KSMETHOD_TYPE_SOURCE macro is explained. Whether setting it will lead
to buffering? if so how source mode can then be enabled and when will
the data be probed and locked?
Hope someone has clarity on this.
Thanks In Advance.
Tom Tag: test only Tag: 107511
How to test DMA above 4GB?
Hi all,
I have a device which support 64-bit DMA.
I would like to test this functionality but I don't know how.
I had tried /nolowmem /pae boot options but it doesn't work.
Could you give me some comment? Thanks. ^_^
Best regards,
Ziv Tag: test only Tag: 107508
communication between wdf and wdm drivers.
Hi, i have an architecture question regarding communication between a wdm
driver and a wdf driver.
my system holds an old wdm driver and a new WDF based driver. My product is
going through a phase where these two drivers will need to communicate (until
the old wdm will not be used anymore). i read some of your articles
regarding driver-to-driver communication and i basically use function
pointers (and interface notification for synch) and all works well.
i started to face a problem when i try to do as follows :
my WDF driver will be called with a pending IOCTl in order to fill some data
and return it to the user mode part of that WDF driver.
My WDM driver, however, is the one who's responsible for the interrupt
handling.
so - when an interrupt arrives, the WDM driver handles it and in its DPC
will use function pointers in order to call a routine that is implemented in
the WDF driver. here's where the problem starts : since the call comes from
the WDM driver context i'm not able to use in that function any WDF calls. i
get bug check.
so my question is how would i be able to complete the pending IOCTL request
in the WDF driver from a call in the WDM driver since i'm not able to use any
WDF methods such as WdfCompleteRequest. does it seem right to use a work
item in the WDF driver that would be signaled when the WDM driver uses the
function pointer (a function that is implemented in the WDF driver which
passed the function's pointer to the WDM driver) ?
thanks,
Kobi. Tag: test only Tag: 107505
femme en termes de ed paquets dessai ed paquets dessai par email ed paquets dessai suisse ed paquets dessai canada soft en ligne ed paquets dessai suisse en ligne
femme en termes de ed paquets dessai ed paquets dessai par email ed paquets dessai suisse ed paquets dessai canada soft en ligne ed paquets dessai suisse en ligne
+++ SANTE MASCULINE +++ SANTE MASCULINE +++ SANTE MASCULINE +++
+
ACHETER VIAGRA BON MARCHE (ALL CARDS ACCEPTED !!!)
http://jhku.net/ACHETER-VIAGRA-BON-MARCHE/
http://jhku.net/ACHETER-VIAGRA-SOFT/
http://jhku.net/ED-PAQUETS-DESSAI/
+
+
+
ACHETER CIALIS BON MARCHE (ALL CARDS ACCEPTED !!!)
http://jhku.net/ACHETER-CIALIS-BON-MARCHE/
http://jhku.net/ACHETER-CIALIS-SOFT/
http://jhku.net/ED-PAQUETS-DESSAI/
+
+
+
ACHETER LEVITRA BON MARCHE (ALL CARDS ACCEPTED !!!)
http://jhku.net/ACHETER-LEVITRA-BON-MARCHE/
http://jhku.net/ED-PAQUETS-DESSAI/
+
+
+
ACHETER PROPECIA BON MARCHE (ALL CARDS ACCEPTED !!!)
http://jhku.net/ACHETER-PROPECIA-BON-MARCHE/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
http://groups.google.de/group/supply-kind-of-hdmi-cable/web/monitor-kabel-hdmi-kabel-10-meter-xbox-360
http://ibm-news.for-um.de/member.php?u=2
http://www.zofag.com
http://ibm-news.for-um.de/showthread.php?t=11795
http://ibm-news.for-um.de/showthread.php?t=11772
citrate de sildenafil soft
commander ed paquets dessai us usa soft
citrate de sildenafil soft canada
acheter ed paquets dessai canada commander en ligne
ed paquets dessai belgique pharmacie
acheter ed paquets dessai canada en linge sans presription
ed paquets dessai canada soft sans prescription
Achat ed paquets dessai Simple
ed paquets dessai au rabais au Canada
ed paquets dessai canada suisse
commander ed paquets dessai us usa soft
ed paquets dessai soft generique
ed paquets dessai canada belgique
ed paquets dessai suisse
ed paquets dessai belgique sans ordonnance
acheter ed paquets dessai bon marche en linge
comprimes de ed paquets dessai us usa bon marche
citrate de sildenafil soft canada
ed paquets dessai suisse soft sans prescription
ed paquets dessai sur internet
acheter ed paquets dessai commander en ligne
citrate de sildenafil soft canada
dans commande ed paquets dessai us usa corpus
Achetez Le ed paquets dessai
commander ed paquets dessai en ligne aucune prescription
commander ed paquets dessai canada soft
ed paquets dessai suisse soft sans prescription
solucion impotencia en France
commander ed paquets dessai par mail
comprimes de ed paquets dessai canada
ed paquets dessai suisse bon marche
Acheter ed paquets dessai canada en ligne sur internet
un Achat de ed paquets dessai avec livraison
femme en termes de ed paquets dessai en France
ed paquets dessai belgique bon marche Sans Prescription
achat ed paquets dessai Tag: test only Tag: 107504
How to DTM Client?
http://www.microsoft.com/whdc/DevTools/WDK/DTM/DTMhowto.mspx
i read the document, and play, but I can't.
Page 15, 3 - After you have installed DTM Client software on your test
clients, the controller automatically detects new test clients and adds them
to the Default Pool
but i does havn't 'test clients' in Default Pool.
i try, clinet windows xp and vista32, but always empty in DTM Studio Default
Pool.
How can client detect?
thank you for reading~ ^^ Tag: test only Tag: 107501
DIFxApp
I need some help please. I need to install a driver to go along with my
application and I am just not "getting" how to use DIFxAPP to get it done. I
have read the documents but there is so much that I don't understand that I
don't even know where to start.
Can someone point me to a well explained step-by-step approach to adding
this functionality to my VS 2005 installer for my application.
Many thanks,
Sid. Tag: test only Tag: 107491
I/O target from socket doesn't timeout
Hi,
I have created an I/O target from a socket but when I send an I/O request to
it, it won't timeout.
The socket was created with WSASocket passing WSA_FLAG_OVERLAPPED and I used
setsockopt() to set read/write timeout as below. After setting these options
the I/O target is created using
IWDFFileHandleTargetFactory::CreateFileHandleTarget.
When I send down the request I specify a timeout of 10 seconds, but it won't
work.
Socket creation:
socket =
WSASocket(AF_INET,SOCK_STREAM,IPPROTO_TCP,NULL,0,WSA_FLAG_OVERLAPPED);
Socket configuration:
int iOptVal = 3000;
res = setsockopt(socket, SOL_SOCKET, SO_SNDTIMEO, (char*)&iOptVal,
sizeof(iOptVal));
res = setsockopt(socket, SOL_SOCKET, SO_RCVTIMEO, (char*)&iOptVal,
sizeof(iOptVal));
I/O Target creation:
IWDFFileHandleTargetFactory *fileHandleTargetFactory = NULL;
IWDFIoTarget *target = NULL;
hr = fxDevice->QueryInterface(IID_PPV_ARGS(&fileHandleTargetFactory));
hr = fileHandleTargetFactory->CreateFileHandleTarget(socket, &target);
fileHandleTargetFactory->Release();
Request forwarding:
request->Send(target,WDF_REQUEST_SEND_OPTION_TIMEOUT,-100000000);
Has anyone had this problem? How can I set a timeout for a request sent to
an I/O target created from a socket handle?
Thanks in advance. Tag: test only Tag: 107489
I need a network miniredirector sample, NulMRx DDK sample doesn't
Hi,
I downloaded WDK 6001.18001. I built NullMRx sample and installed it. I
tried it on WinXP and W2K3..
Unfortunatelly "net use * \\nulsvr\share" does not work. It returns with
"System error 67 has occurred. The network name cannot be found."
In init.c (Line 284) RxStartMinirdr function failed. It returns with
"c000000e" (STATUS_NO_SUCH_DEVICE).
I found this in the MSDN:
"The call to RxStartMinirdr cannot be made from the DriverEntry routine of
the network mini-redirector after a successful call to RxRegisterMinirdr
since some of the start processing requires that the driver initialization be
completed." But the RxStartMinirdr is called from DriverEntry.
Could someone help me to solve this problem or give me a sample which works.
Would be very important.
Thanks,
Misi. Tag: test only Tag: 107482
Does Windows has built-in or third party USB device driver ?
Hi
Does Microsoft Windows has USB device driver that we can define USB interfaces
and endpoints to let our PC become an USB device ?
Can we add an USB device port , how can I do that request ?
Thank for your teaching. Tag: test only Tag: 107478
Can we write kernel mode dll or application ?
Hi
Should kernel mode process be driver, can it be a system service like a dll
or app ?
Is there any function which can switch process between user mode and kernel
mode ?
Thank you . Tag: test only Tag: 107477
_inp( ) and _outp( ) question ..
Hi
Can't we use _inp( ) and _outp( ) in Windows XP, should we use
WRITE_REGISTER_UCHAR and READ_REGISTER_UCHAR and WRITE_PORT_UCHAR and
READ_PORT_UCHAR in kernel mode ?
How can I see the port of a device from Windows Device Manager ? I can see
IO range of some devices, what's the deffirence between IO range and IO port ?
Should I get IO port and register info by some function or IO control , or
all of them should read from documents ?
Thank for your teaching . Tag: test only Tag: 107476
Does Windows has built-in device driver ?
Hi
Does Microsoft Windows has USB device driver that we can define USB interfaces
and endpoints to let our PC become an USB device ?
Can we add an USB device port , how can I do that request ?
Thank for your teaching. Tag: test only Tag: 107473
Allocate Continuous memory with specific boundary for DMA
Dear all:
In my case, i need a 64k boundary physical memory for DMA transfer.
But AllocateCommonBuffer dont have a parameter to specify the boundary.
How to achieve this requirement?
(Use MmAllocateContiguousMemorySpecifyCache?)
--
Sincerely Yours, Tag: test only Tag: 107468
Getting printer specific information stored in GPD file
Hi all,
Basically i have a custom UI and renderer plug-in for a printer driver
using unidrv.dll.
What i need to know in the plug-in are diffrent options set in the GPD file
without reading(parsing) the GPD file.
The only supported methods I found are in IPrintCoreHelper::GetOption which
can give a feature - option return but not the particulars of that option.
And the second method is IPrintCoreUI2::DrvGetDriverSetting which also
given a feature name returns the selected option.
The other close third is IPrintOemDriverUni::DrvGetGPDData which can only
return the value of *OEMCustomData field.
Is there a way to get other field from the GPD ?
RM Tag: test only Tag: 107467
viewsonic driver n00b question
I need some help - I had to reinstall Win XP on my system and all went
relatively well except for the fact that I am having a driver issue
with my Viewsonic vx922 lcd monitor. I get the XP boot screen and
then the screen goes dark - I swapped in my trusty crt and I see
everything which tells me the issue is tied to the drivers. I went to
viewsonic's site and updated drivers to no avail. Any thoughts on
this since I want to go back to my lcd monitor.
TIA! Tag: test only Tag: 107466
you watch hot boobs hot video hot picture
you watch hot boobs hot video hot
picture
*********************************************
http://anushkahollywood.blogspot.com/
********************************************** Tag: test only Tag: 107465
How can know the Serial.sys Driver?
My Driver is Boot start driver,
Start set 0 in Service Registry.
My Driver is Serial Driver.
when was load serial.sys Driver?
how load time serial.sys ?
thank you for reading
best ^^ Tag: test only Tag: 107463
DirectInput, USB HID filters, and EvtInternalDeviceControl
I'm trying to write a filter for a USB HID device that will
essentially override the device's HID Descriptors with a custom
version, but otherwise function as a normal HID device. I've gotten
the driver to compile, install, and execute but the
EvtInternalDeviceControl function is never called. I've checked
several of the KMDF samples and it appears I'm registering the
function correctly. My EvtDeviceAdd and EvtDeviceD0Entry functions
run, but nothing after. Further, will I need to do anything special in
order to have DirectInput correctly recognize the device with the
corrected descriptor? I'm using the hidkmdf HID minidriver KMDF sample
as the function driver with this as my LowerFilter. I can post
additional code and log data as needed. Below is the pertinent piece
of my DeviceAdd function:
WDF_IO_QUEUE_CONFIG queueConfig;
WDFDEVICE hDevice;
/* SNIP */
status = WdfDeviceCreate(&DeviceInit, &attributes, &hDevice);
if (!NT_SUCCESS(status))
{
DbgPrint("SIXCD: WdfDeviceCreate failed with status code 0x%x
\n", status);
return status;
}
WDF_IO_QUEUE_CONFIG_INIT_DEFAULT_QUEUE(&queueConfig,
WdfIoQueueDispatchParallel);
queueConfig.EvtIoInternalDeviceControl =
SixcdEvtInternalDeviceControl;
status = WdfIoQueueCreate(hDevice, &queueConfig,
WDF_NO_OBJECT_ATTRIBUTES, WDF_NO_HANDLE );
if (!NT_SUCCESS (status))
{
DbgPrint("SIXCD: WdfIoQueueCreate failed 0x%x\n", status);
return status;
} Tag: test only Tag: 107462
DPINST - ReInstal l- scan for hardware change
Hi,
I am using DPINST for install & removal for the driver.
To update a driver first i am removing the driver using dpinst /U inf /D and
for reinstllation I have to do the hardware scan using devcon utility before
installing again, otherwise, DPINST wont be able to find the device, it
returns that no devices are found.
Because for XP OS, with out hardware scan, installation wont be succesful,
it is not the case for vista.
Problem: When i do the hardware scan with devcon, Add hardware wizard comes
up, i want to supress that.
Question: 1) Is there any way to supress this wizard here?
2) using DPINST, before installing, is there any way to scan the device with
out any pop-up coming?
Thanks,
Kota Tag: test only Tag: 107461
question on class guid
I have filter driver which sits below file system driver.
My LoadOrderGroup is "filter".
These many days I didnot use inf file to install the driver.
I was just adding entry in the registry and copying the driver files to
system directry for my installation application.
Now I am planning to install it thru inf file.
Is class and classguid entry in the inf file mandatory.
wdk doc says that if the LoadOrderGroup is filter the class is not specified.
But when I run the chkinf tool without including class and classguid entry I
get errorrs.
Is it ok if I dont have class entry.
My driver is a mirroring driver.
Thanks in advance
The wdk doc says that Tag: test only Tag: 107460
Must USB Iso transfer use selectInterface ?
1. If there is only 1 interface and 1 alternative setting in
descripter of the device, must select interface be sent ? Since for
bulk, it is not necessary, and the pipe can be directly used after get
pipe handle from set configure.
2. If select interface have to be sent. Must there be 2 alternative
settings ? Tag: test only Tag: 107459
XcvData broken on Vista
I have a print driver/port monitor pair that use XcvData and XcvDataPort
to communicate. When the printer is being used as a network printer and
connected to by a client, the driver on the client calls XcvData with a
custom string in pszDataName. My XcvDataPort function in the port
monitor recognizes this string and responds with the requested data. It's
very simple, fully supported according to the documentation, and works
flawlessly between XP boxes.
But throw Vista into the mix and it's completely broken. If the server is
XP and the client is Vista, XcvData returns error 2 (file not found). The
port monitor on the server is *not* called.
Conversely, if the server is Vista and the client is XP, XcvData returns
error 122 (insufficient buffer). And again, the port monitor on the
server is not called. However, despite the fact that XcvDataPort was
never called, XcvData gives me back error 2 as XcvDataPort's return code.
The actual printing works flawlessly in both cases, so I know it's not a
fundamental permissions or network issue. It's purely a problem with
XcvData.
I strongly suspect it's a security issue since most things Vista are, but
even if I turn off the firewall, UAC, print as admin, set permissions on
the printer to full control for everyone, etc, I get the same results.
It's as if Vista is simply refusing to allow XcvData to communicate with
the port monitor.
Any clues? Simplified code follows to give you an idea....
On the client I do this:
// open the port on the print server
HANDLE hServer;
if (!OpenPrinterW(L"MyServer\\,XcvPort DIRPS:", &hServer, NULL))
return false;
// request the data
char *pBuff = new char[dataSize];
if (!XcvData(hServer, L"GetConfigData", 0, 0, (PBYTE)pBuff, dataSize, &dataSize, &status) || status != ERROR_SUCCESS)
return false;
On the server, the port monitor does this:
DWORD WINAPI XcvDataPort(HANDLE hXcv,
LPCWSTR pszDataName,
PBYTE pInputData,
DWORD cbInputData,
PBYTE pOutputData,
DWORD cbOutputData,
PDWORD pcbOutputNeeded)
{
if (pszDataName && !wcscmp(pszDataName, L"GetConfigData"))
{
*pcbOutputNeeded = dataSize;
if (cbOutputData < dataSize)
return ERROR_INSUFFICIENT_BUFFER;
*pOutputData = myData;
return ERROR_SUCCESS;
}
return ERROR_SUCCESS;
} Tag: test only Tag: 107448
Microsoft RNDIS driver failed to handle multi config descriptors
Does Microsoft Window (XP Host) RNDIS driver support multiple configuration
descriptors? We changed the WinCE RNDIS driver code to provide two
configuration
descriptors to the host.
When we pass the 2 configuration descriptors per the USB specification the
host(XP) accepts them by returning a "SetConfiguration" message with a valid
configurationValue, and then subsequently dies with an error 10. Tag: test only Tag: 107446
Troubleshooting Sleep Issues
Please, Does anyone know how to determine what application, service, or
driver is resetting the idle timer on an XP system, thus causing the machine
to never enter a sleep state on it's own?
Any Ideas would be great.
Thx a bunch.
--
Thx.
Y_not Tag: test only Tag: 107442
How do get to RS232 COM Port List?
My Driver Code is Boot start RS232 Serial Driver. [Window NT Driver on
Windows XP]
I don't know.
How can get actuality COM port list?
If actuality my comport have COM1 and COM3,
I must open only COM1 and COM3.
but My code is try to open the COM1 to COMX.
because, this method is occur a Blue Screen, Sometimes.
How can get actuality COM port list in NT Style Driver (base Windows XP) ?
Thank you for reading~
best regards Tag: test only Tag: 107438
Echo sample driver is not loaded windows XP
Hello All,
The Echo sample driver is not loaded in the windows XP system. i am
using the WDK 6000 driver development kit. the Kmdf library version is
1.5.
Regards
Sulabh Tag: test only Tag: 107435
KMDF sample driver not loaded in windows XP - WDK 600
Hello All,
Hello All,
I compiled the echo sample driver which is avilable in the WDK 6000
driver delopment kit. this is a KMDF based driver, i give proper
libray version which is mentioned the echo.inf file.
I tryied to install this driver into the windows XP professioanl .
The
Windows XP operating system is not loaded this driver ,it is
returning
the error code 37.
Note: I am not able to load any kmdf sample driver Windows XP
professional.
Kindly help me as soon as possible it is very urgent.
Thanks in advance.
Regards
Sulabh Tag: test only Tag: 107434
[KMDF Echo Sample Driver not loaded in Windows XP]
Hello All,
I compiled the echo sample driver which is avilable in the WDK 6000
driver delopment kit. this is a KMDF based driver, i give proper
libray version which is mentioned the echo.inf file.
I tryied to install this driver into the windows XP professioanl . The
Windows XP operating system is not loaded this driver ,it is returning
the error code 37.
Note: I am not able to load any kmdf sample driver Windows XP
professional.
Kindly help me as soon as possible it is very urgent.
Thanks in advance.
Regards
Sulabh Tag: test only Tag: 107433
Checked build driver with free build OS....
Hi,
I know, to help debugging, its required to have the windows checked
build and with checked build driver (driver under development). But what
happens if checked build driver is loaded and used with free build os ?
(XP SP2).
As far as I know, the checked build driver
1. Does not have optimization enabled
2. Lots of DbgPrint
3. The size of the binary is huge (because of symbols and etc).
3. The driver will be slow.
Are there anything more to add to the above list ? If I manage to remove
all the prints and if the driver is meeting the performance criterion,
is it advisable to deploy the checked build driver with free build OS ?
Regards
Esha Tag: test only Tag: 107430
NDIS encryption
hi, i try to crypt the buffer but it fails with, irq_less_or_equal OR with
bad_pool_handel
thanks for some ideas or a little help
here is the code:
NdisAllocatePacket(&Status,
&MyPacket,
pAdapt->SendPacketPoolHandle);
if (Status == NDIS_STATUS_SUCCESS)
{
NDIS_PHYSICAL_ADDRESS HighestAcceptableAddress;
ULONG ulBfrCnt,
ulTotPktLen,
ulCurrBfr,
ulAmtToMove;
PUCHAR pCurrBfr;
ULONG TotalPacketLength;
PSEND_RSVD SendRsvd;
PVOID pBuf;
PNDIS_BUFFER pNdisBfr;
HighestAcceptableAddress.LowPart = -1;
HighestAcceptableAddress.HighPart = -1;
NdisQueryPacket(Packet, // Get information from
packet descriptor.
NULL,
NULL,
&pNdisBfr, // Output variable for
address of first buffer descriptor.
&ulTotPktLen // Output variable for
number of bytes in packet payload.
);
Status =
NdisAllocateMemory(&pBuf,ulTotPktLen,0,HighestAcceptableAddress);
GetPktPayload(Packet, // Copy payload
pBuf, // to area.
szPayloadCopy, // Amount of space in area.
&ulOrigPayload // Return number of bytes in packet.
);
NdisAllocateBuffer( &Status, &newbuffer, pAdapt->SendPacketPoolHandle,
pBuf, ulOrigPayload );
Encrypt(pBuf,ulOrigPayload);
if(Status == NDIS_STATUS_FAILURE)
{
NdisFreeMemory(pBuf,
ulOrigPayload, //Maybe add a checksum length
0);
Status = NDIS_STATUS_FAILURE;
DBGPRINT(("exit NDIS_STATUS_FAILURE 9\n"));
break;
}
SendRsvd = (PSEND_RSVD)(MyPacket->ProtocolReserved);
SendRsvd->OriginalPkt = Packet;
NdisGetPacketFlags(MyPacket) = NdisGetPacketFlags(Packet);
NdisChainBufferAtFront(MyPacket,newbuffer);
=======================================
void Encrypt(PVOID pData,ULONG uDataLen) {
NDIS_PHYSICAL_ADDRESS HighestAcceptableAddress;
ULONG i;
int b;
PVOID tmp;
PVOID cur;
NDIS_STATUS Status;
char * tmep;
HighestAcceptableAddress.LowPart = -1;
HighestAcceptableAddress.HighPart = -1;
Status = NdisAllocateMemory(&tmep,uDataLen,0,HighestAcceptableAddress);
if (Status != NDIS_STATUS_SUCCESS) {
NdisFreeMemory(tmep,
uDataLen, //Maybe add a checksum length
0);
return; }
Reset();
tmep = (char *) ExAllocatePool(NonPagedPool ,uDataLen);
for (i = 0 ; i<uDataLen; i ++) {
((unsigned char *)cur) = ((unsigned char *)pData) +i;
*(tmep+i) = ((int)cur) ^ 5;
}
i++;
*(tmep+i) = 0;
NdisMoveMemory(pData,tmep,uDataLen);
NdisFreeMemory(cur,
uDataLen, //Maybe add a checksum length
0);
}
i hope my many questions can help other developers :D Tag: test only Tag: 107428
Port Monitor: referencing external libraries in sample code
Hi,
I am new to Driver development. I am implementing the Port monitor for
our printer driver. Basically I am migrating from a previous Port Monitor(
visual studio project) which implements the MONITOR structure to the recent
MONITOR2 structure using the DDK environment. As can be seen, there is some
similarity in the MONITOR2 and MONITOR structure and some of the existing
functionality can be reused. So I planned to export the functions required by
MONITOR2 from the current port monitor library and use it in the DDK sample
port monitor(ddklocalmon).
For this I implemented the header file for the existing Port monitor and
compiled it as a static library. Added the function names to the .DEF file.
I included this library in the TARGETLIBS section of the Sources file in
localmon directory. Also added the path to the header file in the INCLUDES
section.
However when I added a call to the logerror() function in the imported
library, I get the following error on linking
Linking Executable - objchk_wxp_x86\i386\ddklocalmon.dll
errors in directory d:\doccreator\actino\p4root\jaws\niknak\win\localmon
d:\doccreator\actino\p4root\jaws\niknak\win\localmon\localmon.obj : error
LNK2019: unresolved external symbol _logerror@0 referenced in function
_LcmStartDocPort@20
d:\doccreator\actino\p4root\jaws\niknak\win\localmon\objchk_wxp_x86\i386\ddklocalmon.dll : error LNK1120: 1 unresolved externals
Questions:
1] Can someone please let me know what could have gone wrong with this
implementation.?
2] Is adding a reference to a Visual studio library to the DDK project
possible?
3] Have I added the library and header file to the correct sections in the
Sources file?
Please let me know if you need more explaination.
thanks
Mangesh Tag: test only Tag: 107425
Getting SID of process owner
Hi,
Getting SID of user account under which a process is running can be easily
done by user-mode code via WIN32 APIs: OpenProcess(), OpenProcessToken(),
GetTokenInformation(TokenUser).
But in device driver, if PID of a process is known, how difficult is it to
get owner SID?
Thanks,
Boris Tag: test only Tag: 107424
Errorcode c0000005 ndis passthru sample
hi,
iam changing the buffer with a original copy of it and always get the error
c0000005
does anyone have an idea?
i have googled a little bit but didnt find any answers
greetz
FAULTING_IP:
passthru+b7b
f7967b7b 833a00 cmp dword ptr [edx],0
EXCEPTION_RECORD: f7a05a48 -- (.exr 0xfffffffff7a05a48)
ExceptionAddress: f7967b7b (passthru+0x00000b7b)
ExceptionCode: c0000005 (Access violation)
ExceptionFlags: 00000000
NumberParameters: 2
Parameter[0]: 00000000
Parameter[1]: 0000007f
Attempt to read from address 0000007f Tag: test only Tag: 107417
Can more than 3 packets be transfered per microframe in iso?
For ISO transfer, we need to send 4 of 1024 per microframe for speed
needed. The protocol says that bit12-11 define the number of packets
per microframe. And it can only be as many as =92b10 for 3 packets per
microframe.
However, in USB 2.0 spec Table 5-5 =91High-speed Isochronous Transaction
Limits=92, it clearly shows that packets per microframe can be more than
3. (e.g., for 1024 bytes packet, it can be 7 ; for 64bytes packet
there can even be 73 packets per microframe).
Thanks Tag: test only Tag: 107416
RS232 Boot Start Driver
My Driver is BootStart Driver. RS232
When Windows Start then Driver load, then try Open COM PORT.
for instance,[ just algoritm ]
while(1)
{
handle = CreateFile("COM1"....);
if(handle == ERROR)
continue;
}
next work;
---
but this algoritm is occur Blue screen, sometimes.
I want,
first question
how can open to COM port at time?
(can't open com port at boot started. but my code is try open, always)
sencond question
How do know enumeration com port?
(if exist com2, com3, but my code is try open 1~N. it's bad.. i will com2,
com3 open)
sorry my English is bad :-)
thank you for reading~
best Tag: test only Tag: 107415
Automate a test that has included reboots
Suppose we want to add a test to a DTM suite that has one or more reboots.
Outside of DTM, the test add's itself back to the registry using the RunOnce
key to continue after reboot. When using DTM, what is the correct setup
(i.e. does DTM restart the test application following reboot)? Currently,
what I'm seeing is that if the test issues a reboot, DTM marks it as a
Control-C failure.
Thanks... Tag: test only Tag: 107414
Driver Installation in Vista using DpInst 2.01
Dear All,
I have a package which installs device driver on Vista for CardMan SmartCard
reader. Installation is fine if the hardware is pluged-in during installation.
The problem occurs, if the package is installed with out the hardware
pluged-in. After instalallation when the hardware is pluged-in, New Hardware
Found window pops up.
Is their a solution for this?
Also, Is their a method whein we can exit the installation if hardware is
not connected?
Kind Regards,
Chetan G S Tag: test only Tag: 107413
The origin of the popup messege when you plug a USB device?
Hi all,
I would like to use WinUsb with a Personal Health Care USB class device.
What would be the name of the device on the windows pop-up that appears when
you plug a new USB device?
What is the origin of that device name?
A registry entry? The device itself?
Thanks,
Assaf Tag: test only Tag: 107404
Does WinUsb would work with a Personal Health Care device?
Hi all,
I would like to use WinUsb (instead of writing a custom UWDF driver).
My device is of the class "Personal Health Care" (USB class - 0Fh),
Will it work with WinUsb?
Thanks,
Assaf Tag: test only Tag: 107403
Regarding "bTemporalCompression" in avshws of DDK
Hello, I am developing a PCI capture driver, and I use "avshws" as
sample to
develp the driver.
I can capture AVI with H.264 codec by AMCAP, and the avi file can play
well.
My problem is as following:
I would like to set bTemporalCompression(in KS_DATARANGE_VIDEO) to be
TRUE.
Then, the captured AVI frames will be not all marked as key frame.
I connect capture pin to dump filter. When I trace in avshws,
bTemporalCompression is really true. But when I trace into dump
filter, it
shows bTemporalCompression as FALSE.
In addition, in "IntersectHandler" function, the sample code doesn't
copy
"bTemporalCompression" and "bFixedSizeSamples" into
"Data"(PKS_DATAFORMAT_VIDEOINFOHEADER).
If I write following code:
FormatVideoInfoHeader->DataFormat.SampleSize = 0;
Then, I can see "bFixedSizeSamples" in "Dump" filter is updated to
FALSE.
Therefore, should I copy "bTemporalCompression" into somewhere to make
the flag enable?
Can somebody kindly help me to solve this problem?
My data range defines as following:
KS_DATARANGE_VIDEO
FormatH264_Capture = {
//
// KSDATARANGE
//
{
sizeof (KS_DATARANGE_VIDEO), // FormatSize
0, // Flags
DMAX_X * DMAX_Y * 2, // SampleSize
0, // Reserved
STATICGUIDOF (KSDATAFORMAT_TYPE_VIDEO), // aka.
MEDIATYPE_Video
0x34363248, 0x0000, 0x0010, 0x80, 0x00,
0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71, //aka.
MEDIASUBTYPE_YUY2,
STATICGUIDOF (KSDATAFORMAT_SPECIFIER_VIDEOINFO) //
FORMAT_VideoInfo
},
FALSE, // BOOL, bFixedSizeSamples (all samples same
size?)
TRUE, // BOOL, bTemporalCompression (all I frames?)
0, // Reserved (was StreamDescriptionFlags)
0, // Reserved (was MemoryAllocationFlags
// (KS_VIDEO_ALLOC_*))
//
// _KS_VIDEO_STREAM_CONFIG_CAPS
//
{
STATICGUIDOF( KSDATAFORMAT_SPECIFIER_VIDEOINFO ), // GUID
KS_AnalogVideo_None, //
AnalogVideoStandard
DMAX_X, DMAX_Y, // InputSize, (the inherent size of the
incoming signal
D_X,D_Y, // MinCroppingSize, smallest rcSrc cropping
rect
DMAX_X, DMAX_Y, // MaxCroppingSize, largest rcSrc cropping
rect allowed
8, // CropGranularityX, granularity of cropping
size
1, // CropGranularityY
8, // CropAlignX, alignment of cropping rect
1, // CropAlignY;
D_X, D_Y, // MinOutputSize, smallest bitmap stream can
produce
DMAX_X, DMAX_Y, // MaxOutputSize, largest bitmap stream can
produce
8, // OutputGranularityX, granularity of output
bitmap size
1, // OutputGranularityY;
0, // StretchTapsX (0 no stretch, 1 pix dup, 2
interp...)
0, // StretchTapsY
0, // ShrinkTapsX
0, // ShrinkTapsY
1428571, // MinFrameInterval, 100 nS units >>7 frames
per second
640000000, // MaxFrameInterval, 100 nS units
8 * 2 * 30 * D_X * D_Y, // MinBitsPerSecond;
8 * 2 * 30 * DMAX_X * DMAX_Y, // MaxBitsPerSecond;
},
//
// KS_VIDEOINFOHEADER (default format)
//
{
0, 0, D_X, D_Y, // RECT rcSource;
0, 0, 0, 0, // RECT rcTarget;
DMAX_X * DMAX_Y * 2 * 30, // DWORD dwBitRate;
0L, // DWORD dwBitErrorRate;
1428571, // REFERENCE_TIME
AvgTimePerFrame;
sizeof (KS_BITMAPINFOHEADER), // DWORD biSize;
DMAX_X, // LONG biWidth;
DMAX_Y, // LONG biHeight;
1, // WORD biPlanes;
16, // WORD biBitCount;
FOURCC_H264, // DWORD biCompression;
DMAX_X * DMAX_Y * 2, // DWORD biSizeImage;
0, // LONG biXPelsPerMeter;
0, // LONG biYPelsPerMeter;
0, // DWORD biClrUsed;
0 // DWORD biClrImportant;
}
}
My IntersectHandler is as following:
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)};
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)))
{
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
) {
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;
return STATUS_BUFFER_OVERFLOW;
}
//
// Verify that the provided structure is large enough to
// accept the result.
//
if (BufferSize < DataFormatSize)
{
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 =
KS_DIBSIZE (FormatVideoInfoHeader-
>VideoInfoHeader.bmiHeader);
FormatVideoInfoHeader->DataFormat.SampleSize = 0;
//
// REVIEW - Perform other validation such as cropping and
scaling checks
//
return STATUS_SUCCESS;
} // End of VIDEOINFOHEADER specifier
return STATUS_NO_MATCH;
}
Thanks!
Gordon Tag: test only Tag: 107401
Frame information of AVStream driver
Hello, I am developing a PCI capture driver, and I use "avshws" as
sample to
develp the driver.
I would like to transfer some frame informatiion from "avshws" driver
to user
mode filter(e.g. dump filter).
In "avssamp" sample, there are following codes in
"CVideoCapturePin::CaptureFrame:
FrameInfo -> ExtendedHeaderSize = sizeof (KS_FRAME_INFO);
FrameInfo -> PictureNumber = (LONGLONG)m_FrameNumber;
FrameInfo -> DropCount = (LONGLONG)m_DroppedFrames;
Could I get "FrameInfo -> PictureNumber" in user mode filter? Further
more,
could I get whole "FrameInfo" structure in user mode filter?
By the way, if I need to transfer user defined information, how should
I do?
Could I define my FrameInfo structure, and let user mode filter get
the
structure?
Thanks!
Gordon Tag: test only Tag: 107400