Size limits in win9x?
What is max. size of WDM driver in win98? I remember, there is 64k limit for NdisMapFile,
and other limitations. Do they all exist in WinMe?
Thanks in advance if anybody can enlighten me.
- PA Tag: Win XP checked SP1a Tag: 31868
FilterGraphics
Hi,
How could I use FilterGraphics in the OemUni sample to write each page of a
printjob to a seperate bitmap file?
Thanks!
Ivan Tag: Win XP checked SP1a Tag: 31867
how to initialize and terminate multithread in dllmain
Hi, all
I am trying write a dll which will have two thread A and B.
I want to initalize A and B when DLL_PROCESS_ATTACH, to terminate A and B
when DLL_PROCESS_DETACH.
When initalizing, A create thread B, and wait B finish.
When terminating, A notify B, and wait B finish too.
Thanks,
Kai Tag: Win XP checked SP1a Tag: 31862
UpdateDriverForPlugAndPlayDevices(): ERROR
I failed to use UpdateDriverForPlugAndPlayDevices(). The
error code is 0xe0000203. I can not find this error code
in MSDN.
What does it means?
What reason may cause this error?
Thanks in advance.
Tjm Tag: Win XP checked SP1a Tag: 31861
Good device driver books?
Howdy,
I'm a windows application developer, but it looks like forces larger than
myself are going to force me to try and do some device driver programming.
I really don't know squat about programming device drivers.
Can anyone suggest some good books and/or web pages on the basics of device
driver programming for windows (98/NT/2000/XP)?
Thanks
Jim Tag: Win XP checked SP1a Tag: 31855
Keyboard
Hi,
I need write configuration data "eb 00 00" to keyboard.
Is this code correct?
UCHAR port = 0x60;
WRITE_PORT_UCHAR(&port, 0xEB);
WRITE_PORT_UCHAR(&port, 0x00);
WRITE_PORT_UCHAR(&port, 0x00);
Thanks. Tag: Win XP checked SP1a Tag: 31814
sequence of dispatch routines
Hi,
I looked at the SniffUSB (usbsnoop(y)) project and I can't figure out
why the dispatchroutines of the filter driver are carried out before
the dispatch routines of the function driver.
It is a lower level filter driver, so I would expect that an IRP will
be completed by a functiondriver routine before the filter driver can
dispatch the given IRP.
Could some-one give me a clue on this, I would really appreciate it.
Thanx Tag: Win XP checked SP1a Tag: 31813
NDISUIO, problem reading packets
Hello,
I was wondering if someone could help me, I am using
the standard NDISUIO sample of the Windows XP DDK in
a WIndows 2000 FREE build environment.
I have managed to install it successfully under WIndows 98
and 2000 and XP but run into the following problems:
- Under Windows 2000 none of the adapters bind
- Under Windows 98 I can't seem to retrieve the packets
that are sent back using an MJ_READ command.
The packets I get back do have the correct Header
information (802.1X EAPOL) and the sizes are correct.
60 bytes for the EAPOL Identity. But the data returned
using the IRPS is full of hex 0xAFAFAFAF.
Retrieving and setting OIDS works perfectly.
Has anyone else run into these problems?
I do remember someone stating that MJ_READ and MJ_WRITE
not working with a Windows 98 driver and is this what
I am experiencing? I don't know what is going wrong under
Windows 2000 but maybe the inf file is incorrect.
Thanks
Tom Rixom Tag: Win XP checked SP1a Tag: 31808
need some help with VideoPortGetBusData
HI all,
I am very new to this field of device driver
I am using windows 2000 ddk kit and developing this driver on windows
2000 only.
Please help me out in getting the base address of the adapter device.
I am using Matrox graphic chip G200.
i want to write a miniport driver for this chip.
If I look into device manager, it gives me information that this
device is on pci bus 1, device 0.
So to get the base address of this device I am using
VideoPortGetBusData, according to document it should return the length
of the data return.
So I am checking it.
If I use it as follows it allways returns 0.
PCI_COMMON_CONFIG PciData;
vpStatus = VideoPortGetBusData( hwDeviceExtension,
PCIConfiguration,
0,
&PciData,
0,
PCI_COMMON_HDR_LENGTH);
VideoDebugPrint((0,"\nvpStatus is 0x%x \n",vpStatus));
Please let me know were am I going wrong............
Also I have tried with be EisaConfiguration.
For EisaConfiguration it returns same 0......
vpStatus = VideoPortGetBusData( hwDeviceExtension,
EisaConfiguration,
0,
&EisaData,
0,
PCI_COMMON_HDR_LENGTH);
VideoDebugPrint((0,"\nvpStatus is 0x%x \n",vpStatus));
BUt for CMOS it returns 64.
It fills up the Pcidata buffer.........
vpStatus = VideoPortGetBusData( hwDeviceExtension,
Cmos,
0,
&PciData,
0,
PCI_COMMON_HDR_LENGTH);
VideoDebugPrint((0,"\nvpStatus is 0x%x \n",vpStatus));
I am not getting what exactlly it means..........
Any of information regarding this will be very helpfull for me to go
ahead.. Tag: Win XP checked SP1a Tag: 31800
intermediate driver and driver I/O
I need to transfer data from user space to intermediate NDIS driver.
Is possible to do it with driver I/O ?
(with adding Dos symbolic link and registering
->MajorFunction[IRP_MJ_CREATE] = DriverDispatch....
->MajorFunction[IRP_MJ_WRITE] = DriverDispatch....
...
...
Or there is other prefered mechanism ?
Thanks !
Peter Tag: Win XP checked SP1a Tag: 31799
How to use SoftIce
I am a Newbie here. I have SoftIce. What I want to do is search for
a text string in memory. Suppose you have a simple text editor open
with a unique string typed into the editor. Now, you want to search
for that unique string in memory using SoftIce. What are the specific
commands I need to search all memory on my computer? A situation
where this is needed is suppose you have a script that is encrypted.
However, a program must read the encrypted script and decrypt it and
store the plain-text script somewhere in memory.
Any suggests is welcom. Tag: Win XP checked SP1a Tag: 31772
WDM use of IoCreateDevice
I believe it is correct for AddDevice to call
IoCreateDevice and IoCreateSymbolicLink and then call
IoAttachDeviceToDeviceStack for the AddDevice physical
device object and the IoCreateDevice functional device
object.
But if I need to additionally call IoCreateDevice and
IoCreateSymbolicLink for each physical device found and
passed via IRP_MJ_PNP IRP_MN_START_DEVICE, is it also
necessary to pass those IoCreateDevice functional device
objects to IoAttachDeviceToDeviceStack?
If yes, what physical device argument should be used for
IoAttachDeviceToDeviceStack? IRP_MJ_PNP only passes a
functional device object argument, from the AddDevice call
to IoCreateDevice, not a physical device object.
Thanks. Tag: Win XP checked SP1a Tag: 31771
NDIS Driver debugging presentation at the MS Dev conference in November
List,
At the upcoming Driver Developer's Conference at
Microsoft's main campus, located in Redmond, WA (November
11- 14), the NDIS team will be presenting a session on
Debugging NDIS drivers.
This is your opportunity to tell us about anything
specific you would like to see demonstrated in this
presentation. Want to see how we track down pool
corruption? This is your chance to ask for it. How can you
determine if an NDIS Packet has been completed twice? We
can show you how. Need to track down that memory leak? We
have some of the best leak detector's in the business.
Email to me (jamesmat@microsoft.com) the issues you would
like to see debugged and explained, and we'll talk about
them at DevCon.
See you there!
Jim Mateer
Program Manager
Core Networking
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and
confers no rights. Tag: Win XP checked SP1a Tag: 31767
1394 Isoch operations
After IsochAllocateResources, when should I call Request_Talk or
Request_Listen?
Should I call Request_Talk ( or Request_Listen) everytime after
attaching buffers or only after Allocating buffers. I DONOT have any
start time requirement.
Now I am implementing :
Method in use:
--------------
1. REQUEST_ISOCH_ALLOCATE_RESOURCES
2a. REQUEST_ISOCH_ATTACH_BUFFERS
2b. REQUEST_ISOCH_TALK (or) REQUEST_ISOCH_LISTEN
(later REQUEST_ISOCH_DETACH_BUFFERS...sometimes it happens before talk
or listen request)
Repeat 2a and 2b
Repeat 2a and 2b
Repeat 2a and 2b
Repeat 2a and 2b
3. REQUEST_ISOCH_FREE_RESOURCES
Can I do like this
--------------------
1. REQUEST_ISOCH_ALLOCATE_RESOURCES
2b. REQUEST_ISOCH_TALK (or) REQUEST_ISOCH_LISTEN
2a. REQUEST_ISOCH_ATTACH_BUFFERS (later REQUEST_ISOCH_DETACH_BUFFERS)
Repeat 2a
Repeat 2a
Repeat 2a
Repeat 2a
3. REQUEST_ISOCH_FREE_RESOURCES
I think second method should work. But since first method is working,
I didnot modify. I think this is waste of processing power to call
talk/listen after each attach. How others are implementing?
Thanks. Tag: Win XP checked SP1a Tag: 31764
Determine Processor Numbers
Hello,
I am trying to use KeSetTargetProcessorDpc but do not know how to get the
processor number for each processor in a system. Can I used
KeQueryActiveProcessors and determine the processor number from the bit
number being set in KAFFINITY returned from the KeQueryActiveProcessors
call?
Much appreciated.
-HT Tag: Win XP checked SP1a Tag: 31760
Using SetupDiSetDeviceRegistryProperty to change driver on a particular device
A while back I spent a lot of time on NTDEV asking about changing the PnP
IDs in a SCSI Bus filter so the PnP system would load a different class
driver on a device. That worked fine for me, once I understood which IRPs
to muck with. I didn't get around to running verifier on it, but from
recent posts, running verifier could be a problem for me. Without Verifier,
I could change all the instances of DISK to DIAG, for a particular PDO, and
the system thought I had a DiagDevice. My Inf installs my DiagClas driver,
I can enumerate the DiagDevices with the interface GUID the DiagDevice class
driver exports, and everyone is happy.
During that discussion, one of the MS storage guys suggested that
SetupDiSetDeviceRegistryProperty, with the SPDRP_SERVICE property, could be
used to change the driver for a specific device. For another use, I don't
want to use the filter, so I'm trying to do this, with mixed results.
The registry entry gets changed OK, and stopping and restarting the device
causes my custom class driver to load, but it's not causing the PnP system
to think it's something new, the system still thinks that it's a disk, so
partmgr still attaches to it. Maybe I could use it that way, except that
enumerating the interface GUIDs for disk and my diag driver doesn't find
anything at all. So somehow this different driver in the stack for this one
devnode has not only failed to produce a DiagDevice, it causes some
impairment of the normal disk interface. I tried
SetupDiSetDeviceInterfaceDefault with the DiagClas interface GUID in the
SP_DEVICE_INTERFACE_DATA for the device, but that resulted in a 0xE0000225,
which is ERROR_NO_SUCH_DEVICE_INTERFACE, in SetupAPI.h.
Removing and re-enumerating results in my class driver not being loaded
again. This isn't a surprise, since my custom class driver isn't signed,
and probably never will be, so I expect the system to load the signed disk
driver in the absence of my filter.
So at this point, all I've done is substituted my custom class driver for
disk.sys, and that's not what I want to do. I want to remove the device as
a disk, and load it as a DiagDevice.
So my question devolves to:
Constraining to user-mode only, what else do I need to do to create a
DiagDevice, instead of a disk with a different class driver? Remember that
I can already do this OK with a filter, I'm trying to do it without using
the filter. Since SPDRP_HARDWAREID and SPDRP_COMPATIBLEIDS are R/W, should
I be changing those, too? Anything else I should change?
Thanks,
Phil
--
Philip D. Barila Windows DDK MVP
Seagate Technology, LLC
(720) 684-1842
As if I need to say it: Not speaking for Seagate.
E-mail address is pointed at a domain squatter. Use reply-to instead. Tag: Win XP checked SP1a Tag: 31759
How to set GUID?
Hi,
I am developing USB Printer driver. I just came to know that, to enumerate
the device we have to use SetupDiEnumDeviceInterfaces().
In this we need to pass a specific GUID.
What is that GUID?
How to set a specific GUID for a specific printer?.
what are the API's?
Thanks in advance,
Vikram. Tag: Win XP checked SP1a Tag: 31743
=?iso-8859-1?Q?Handel_to_=22\\.\Display1=22?=
Hi there,
Isn't it possible to create/open a handle to the graphic
card?
There is a symbolic link named "\\.\Display1" that links
to the named Function Device Object (FDO) of the graphic
card (\Device\Video0), but when I try the following:
HANDLE hHandle = CreateFile(
"\\\\.\\Display1",
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL,
OPEN_EXISTING,
0,
NULL);
"hHandel" is set to "invalid handle" (0xffffffff) and
GetLastError() returns "Access is denied" (5).
All I want is to get a handle to the graphic card so that
I can send some IOCTL's to it.
Isn't it possible?
Thanks and regards,
Kent. Tag: Win XP checked SP1a Tag: 31735
SDK CreateFile() failing to open device
In the test_myDriver.cpp application I have the code
----------
char *sLinkName = "\\\\.\\myDevice0";
return CreateFile(sLinkName, GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
NULL);
-------------
Unfortunately in debug (on MS Visual C++ 6.0), CreateFile
() is failing to get a handle to myDevice and whenever I
start the driver using Numega EzDriverInstaller or the
Hardware Installation Wizard the OS (WinXP) crashes and
sometimes I get the Blue Screen (sometimes the machine
goes automatically into reboot.) If it means anything, I
am running myDriver on the host machine (ain't got the
funding for a dedicated target machine).
Can anyone offer any suggestions? Thanks.
Antranik Tag: Win XP checked SP1a Tag: 31734
WritePort function (KbdFilter driver)???
Hello,
How I must write routine that writes value to the keyboard
port "WritePort" in upper fiter driver, may somebody show
me sample code.
WritePort(IN PVOID Context,
UCHAR Value,
BOOLEAN WaitForACK)
{
//??????????????
}
NTSTATUS
InitializationRoutine(IN PVOID InitializationContext,
IN PVOID SynchFuncContext,
IN PI8042_SYNCH_READ_PORT ReadPort,
IN PI8042_SYNCH_WRITE_PORT WritePort,
OUT PBOOLEAN TurnTranslationOn)
{
//some code
}
Thanks. Tag: Win XP checked SP1a Tag: 31732
Printing on USB port...
Hi All
I have a custom printer driver( not unidriver ) for which I am developing a
USB port monitor. As a homework I tried opening the USB port( USB001 ) from
a console application and CreateFile failed. But same thing worked for LPT1.
I wanted to know if there are seperate set of steps to be followed for USB.
If yes, how do I do it in my port monitor?
If I am missing something, please point me in the right direction.
Thanks and Regards
Vikram Tag: Win XP checked SP1a Tag: 31731
Access VGA port SDA and SCL lines
HI,
I am using INTEL 82845G grapghic controller (which support DDC2BI
protocol)and working on windows 2000 operating system.
I am developing a software which will interact with the monitor
through VGA port's SDA(system data line) and SCL(system clock line)
data lines.
According to access.bus protocol, pin 12 and pin 15 of a VGA port
(D_SUB connector) are for SDA and SCl data lines. And they have given
a protocoll about the data which should be sent to these data lines.
Now my problem is how to send the data these lines through program.
setSDA(), getSDA() .... should be the underline functions which will
interact with the hardware (VGA port), which I guess should be
implemented in the driver , now how to access these functions through
my software?
If I have to write a driver, I can use VideoPortDDCMonitorHelper
function , but here also I have to supply the address were I want to
send the data. I have to write the functions like
typedef struct _I2C_CALLBACKS {
PVIDEO_WRITE_CLOCK_LINE WriteClockLine;
PVIDEO_WRITE_DATA_LINE WriteDataLine;
PVIDEO_READ_CLOCK_LINE ReadClockLine;
PVIDEO_READ_DATA_LINE ReadDataLine;
} I2C_CALLBACKS, *PI2C_CALLBACKS;
VOID I2CWriteClock(PVOID HwDeviceExtension, UCHAR data)
{
const ULONG nbitClock = 3;
const ULONG Clock = 1 << nbitClock;
PHW_DEVICE_EXTENSION hwDeviceExtension = HwDeviceExtension;
ULONG ul;
P2_DECL;
ul = VideoPortReadRegisterUlong(DDC_DATA);
ul &= ~Clock;
ul |= (data & 1) << nbitClock;
VideoPortWriteRegisterUlong(DDC_DATA, ul);
}
Can anybody over there guid me , how to write these functions and the
addresses which I should supply so that it will get written on VGA
port's 12'th and 15'th pin.
for eg. this is sample code from 3dlab's driver, Now if I want to use
same code, what will be the value of DDC_DATA, DDC_DATA is actually a
virtual address of the DDC_control registor. Will it be same for all
graphic chips?
VOID I2CWriteClock(PVOID HwDeviceExtension, UCHAR data)
{
const ULONG nbitClock = 3;
const ULONG Clock = 1 << nbitClock;
PHW_DEVICE_EXTENSION hwDeviceExtension = HwDeviceExtension;
ULONG ul;
P2_DECL;
ul = VideoPortReadRegisterUlong(DDC_DATA);
ul &= ~Clock;
ul |= (data & 1) << nbitClock;
VideoPortWriteRegisterUlong(DDC_DATA, ul);
}
Also I want to know who supply the PVIDEO_PORT_CONFIG_INFO ConfigInfo
parameter in the Find Adapter function?
As to get the base affress I need AdapterInterface = PCIBus, but in my
case, this whole struture is something like not accesseble.
Please help
There must be some predefined mapping of physical registers to the
virtual registers, does any bbody is having idea about this mapping
and how DDC control register will be mapped? Tag: Win XP checked SP1a Tag: 31730
Urgent: Help Needed
Hi,
I have debug build and release build of same driver. How
will identify
which binary is debug build and which is release? If this
is not the proper newsgroup where I should post this
question then let me know where I should post the
question?
Thanks,
Vinay Tag: Win XP checked SP1a Tag: 31725
Where should KDevice::CreateLink() be called from?
In order to create a symbolic link to myDevice should
pmyDevice->CreateLink() (Class myDevice derived from base
class KDevice) be called from myDriver::DriverEntry() or
from the device Constructor myDevice::myDevice()? The
SoftIce DriverWorks documentation does not specify.
Thanks.
Antranik Tag: Win XP checked SP1a Tag: 31705
driver compile problem
Hi,
I am writing a WDM video capture driver by Win2000 DDK and
VC6.0. My environment is Windows98 se.
I put my source code under c:\xxxxxxx\wdm.nt directory,
then build the source code.
The generated .sys works well under Win98/ME, but it crash
the win2k/xp immediately when it starts.
Later I rename the directory to c:\xxxxxxx\wdm1.nt, (one
more character), it works well on all Windows OS.
My question is:
Does it have any relationship between the source code
directory name and generated .sys file?
Or it is VC linker's problem? Tag: Win XP checked SP1a Tag: 31703
Blocking in IRP_MJ_WRITE, KeDelayExecutionThread, threads
I have a question about KeDelayExecutionThread().
Do I understand the documentation correctly: If I call
KeDelayExecutionThread() to block in my IRP_MJ_WRITE handler, and the
thread which called WriteFile() is terminated by TerminateThread(),
will Ke... return immediately, no matter what I specify for the
Alertable parameter?
Thorsten Tag: Win XP checked SP1a Tag: 31702
Error msg upon adding printer
Hi,
I am trying to install my custom printer driver via the Add Printer Wizard.
Upon clicking on Finish, I get an error message saying:
"Printer Driver not installed. Operation could not be completed."
My .inf file installs 3 files: a graphic DLL, a UI DLL and a print
processor.
Error messages in setupAPI.log complained about the files not having
digital signature information. This also happens to samples that come
with the DDK.
Does anyone know why I get the error message and how I can fix it ?
Is it a must to have the DLLs properly implemented ? My goal at this stage
is to install my print driver that does nothing. Regardless of what it does,
I
want to be able to install it at least.
Many thanks,
Michael. Tag: Win XP checked SP1a Tag: 31700
USB Bulk In&OUT each need two handles?
Hi
If my usb device has two endpoints - Bulk_IN and Bulk_OUT. I try to use
the bulkusb sample code within windows 2000 ddk to communicate with my usb
device. According to the sample code, it seems that I need to use two GUID
based string plus the "\PIPEXX" string to CreateFile() in test application
and get back two handles, one for Bulk_IN and the other for Bulk_OUT, if I
need to bulk-in & bulk-out data to device. My question is that can I use one
handle to bulk-in and bulk-out data ? If yes, which way is the best way and
what can I do?
ps.
I try to use GUID based string but not plus the "\PIPEXX" string (for
example, "\PIPE00") and CreateFile() is successful. The handle I got can
used to send DeviceIoControl(), but can't used to WriteFile() ( or
ReadFile() maybe) and gets the error code ERROR_INVALID_HANDLE.
Ricky Tag: Win XP checked SP1a Tag: 31699
Power Management fails with the USB 2.0 host controller
Hi,
We have USB to Serial port converter. We have written
windows-2000/XP WDM driver for that device.
The 2000/XP WDM driver is working fine with all the serial
port applications.
When we receive PowerDeviceD1,PowerDeviceD2 or
PowerDeviceD3 we are stopping the all the USB
transactions. And configuring the device (Setting the
registers and starting the USB transsactions) when the we
receive PowerDeviceD0.
When the systems comes out of the standby mode, my device
(Application) works fine with the
1.1 hostcontroller.
But the same thing is not happenning with the 2.0
hostcontroller. i.e My device doesn't work
when system comes out of standby mode.
I Debugged this issue and I found that VendorCommands (For
Configureing the device registers) and Usb Bulk requests
are failing when we are processing the PowerDeviceD0. That
is why device is not working properly.
URB status is 0x80000300 with VIA2.0 Hostcontroller
URB status is 0xc0000005 with NEC2.0 Hostcontroller
Operating system used windows-2000.
Does anyone have any idea why this not work?
Thanks in advance
B. Madhukar Reddy Tag: Win XP checked SP1a Tag: 31693
usermode memory management
In Kernel space, after we can allocate memory, we can also get a table
from debugger to see what is the size of memory allocated, how many
allocations done, tag of allocation, how many allocations are not
freed/leakage.
Do we have any mechanism that give same type of info in user mode Apps
when I use virtualAlloc() and virtualFree() functions. I want to make
sure I am not causing memory leaks in user mode App and how to check
that.
Thanks. Tag: Win XP checked SP1a Tag: 31671
NDIS Intermediate driver for CE
To whom it may concern,
I am desperately looking to find example code to write an
NDIS Intermediate driver for CE. I found IMSamp.exe,
which contains examples for desktop platforms. However,
my understanding is that the NDIS IM driver for CE is
different. Thus, any help that you can give me will be
greatly appreciated.
We have purchased MSDN Universal support under
bryan.glancey@mobilearmor.com.
Sincerely,
Jeff Ayers Tag: Win XP checked SP1a Tag: 31645
Question regarding netvmini NDIS driver!
Hello,
I am a NDIS newbie, I was trying to understand the NDIS device driver and
write my own. For that I am going through the netvmini ndis driver source
code, in the DriverEntry routine, the global variables are being
initialized, and the comment says that "GlobalData structure is used to
track the multiple instances of the same adapter". What does this mean?
In which scenarios we might be having multiple instances of the same adapter
running?
Also, why do we initialize the GlobalData before registering the unload
handler (I know the comment says that "unload handler has a more global
scope"??)?
Any help in this regards would be highly appreciated.
Regards,
Tar Tag: Win XP checked SP1a Tag: 31640
NDIS IM & Miniports & Bluescreens & how to support
Hello,
There is a well known problem between NDIS IM and Miniport drivers where the
addition of the IM causes the Miniport to bluescreen. The solution is
always upgrade the miniport to the latest, which has solved the problem. My
problem as a vendor shipping an IM is when our product is installed the
bluescreen happens so it is our products fault. Our support folks don't
like having to tell customers to go get the latest driver from their NIC
vendor.
When I have looked at the fault it typically is a pointer dereference of an
information buffer in a get or set oid. Does anyone have any idea what the
underlying problem is with the minport. Why does it work without the IM?
Is there anyway for the IM to protect against such problems?
Thanks in advanced.
Regards,
Michael Wright Tag: Win XP checked SP1a Tag: 31632
NDISUIO problem, can't retrieve NDIS packets
Hello,
I am using the NDISUIO sample and have successfully installed it under
WIndows 98.
I have got everything working, binding, querying OIDS and so forth but as
soon as I try
to read packets I get the right size for the data packet but the data itself
is full of 0xAF(HEX).
I have used both the MJ_READ method and a IOCTL command to retrieve the
buffers
into user space but both give the same result. I think it is going wrong
when retreiving the
actual NDIS buffer but the code for this is all Microsoft.
Can someone point in the right direction? Maybe I am building the sample
incorrectly?
I build it using the Windows XP DDK, Windows 2000 FREE build with the
following source:
--------------------------------------------------------
TARGETNAME=aa_ndis
TARGETPATH=obj
TARGETTYPE=DRIVER
C_DEFINES=$(C_DEFINES) -DNDIS50=1 -DNDIS_WDM=1 -DBINARY_COMPATIBLE
# C_DEFINES=$(C_DEFINES) -DDBG_SPIN_LOCK=1
C_DEFINES=$(C_DEFINES) -DWIN9X=1
C_DEFINES=$(C_DEFINES) -DDBG=1 -DSENDDBG=1
PRECOMPILED_INCLUDE=precomp.h
PRECOMPILED_PCH=precomp.pch
PRECOMPILED_OBJ=precomp.obj
USE_MAPSYM=1
TARGETLIBS=\
$(DDK_LIB_PATH)\ndis.lib
SOURCES=\
ndisuio.rc \
ntdisp.c \
ndisbind.c \
recv.c \
send.c \
debug.c
MISCFILES=ndisuio.sld
------------------------------------------------------
Tom Rixom
Alfa & Ariss Tag: Win XP checked SP1a Tag: 31629
Windows DDK (XP SP1)
Hi,
I upgraded my PScript printer driver plug-in to the latest
DDK i.e., XP SP1 DDK and all my balloon tips are not
working now. After some debugging I found out that
registration for the tootip control is failing i.e., my
SendMesssage command with TTM_ADDTOOL fails and return
false. There is no error registered, when I called
GetLastError() it returns success. Same code worked when I
compiled under older windows 2000 DDK.
Also attached is the code snippet.
Thanks,
Athar Ahmad.
Sr. Software Engineer.
MINOLTA-QMS Inc.
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
////////////////////////
static LRESULT RegisterBalloonTips(HWND hDlg)
{
//Ensure that the DLL containing the tooltip control is
loaded
INITCOMMONCONTROLSEX InitCtrls;
InitCtrls.dwSize = sizeof(INITCOMMONCONTROLSEX);
InitCtrls.dwICC = ICC_WIN95_CLASSES;
BOOL InitCtrlsOk = InitCommonControlsEx(&InitCtrls);
//Create the tooltip control
hwndBalloonTip = CreateWindowEx(NULL, TOOLTIPS_CLASS,
NULL, WS_EX_TOOLWINDOW | WS_POPUP | TTS_NOPREFIX |
TTS_BALLOON | WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT, hDlg, NULL, ghInstance,
NULL);
SetWindowPos(hwndBalloonTip, HWND_TOPMOST,0, 0, 0, 0,
SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
//Activate the tooltip control
SendMessage(hwndBalloonTip, TTM_ACTIVATE, (WPARAM) TRUE,
(LPARAM) 0);
//Force multi-line ballloon tip
SendMessage(hwndBalloonTip, TTM_SETMAXTIPWIDTH, 0,
MAX_BALLOON_TIP_WIDTH);
//Preset the return code
LRESULT TTMOk = TRUE;
//Set arguments shared among tools
ToolInfo.cbSize = sizeof(TOOLINFO);
ToolInfo.uFlags = TTF_IDISHWND | TTF_TRACK ;
ToolInfo.hwnd = hDlg;
ToolInfo.hinst = NULL;
ToolInfo.lParam = 0;
ToolInfo.lpszText = LPSTR_TEXTCALLBACK;
//Register tools with tooltip control
ToolInfo.uId = (UINT_PTR)GetDlgItem(hDlg, IDC_WIDTH);
TTMOk = (SendMessage (hwndBalloonTip, TTM_ADDTOOL,
(WPARAM) 0, (LPARAM) &ToolInfo) == TRUE) ? TTMOk : FALSE;
//Register tools with tooltip control
ToolInfo.uId = (UINT_PTR)GetDlgItem(hDlg, IDC_HEIGHT);
TTMOk = (SendMessage (hwndBalloonTip, TTM_ADDTOOL,
(WPARAM) 0, (LPARAM) &ToolInfo) == TRUE) ? TTMOk : FALSE;
return TTMOk;
} Tag: Win XP checked SP1a Tag: 31624
DDK Kernel Driver
I have ran a RunTime function _Strdate(), which retrieves
date in sd.c file compiled with Microsoft Compiler. It
ran properly. But when I linked that sd.obj file to my
driver, then it resolved those linker errors e.g., for
_strdate() function . the exec. file sd ran upto my
expect. . Before linking my driver with this sd.obj, my
driver ran upto my expect. Now after when I linked out
sd.obj to my kernel driver , It imported the _strdate()
into my driver, then my driver couldn't even load ??? Tag: Win XP checked SP1a Tag: 31616
How to call a driver from another one?
Dear all,
I wrote a driver A which control my private board.
Now I want to use driver B to control driver A to work something.
(I don't want to merge driver A and B to one.)
Can I do that?
Which function can I find in DDK?
Could you give me some suggestions?
Thanks. Tag: Win XP checked SP1a Tag: 31598
How does Windows detect devices on the 1394 bus?
Maybe a stupid question, but here it goes:
I am aware that plugging or unplugging a device on the 1394 bus will result
in a bus reset, and subsequently all devices and hosts will announce their
presence on the bus. But does Windows also poll the bus?
What if - hypothetically - a device was able to dynamically change its
identity (by changing its serial number or whatever)? How does Windows
detect the new device?
Best regards,
Martin Tag: Win XP checked SP1a Tag: 31597
IEEE 1394 sound card driver: where to start?
Dear experts!
I am trying to figure out what precisely needs to be done to make an IEEE
1394 device appear as a sound card to audio applications. This device is a
new piece of hardware, which uses IEC61883-6 protocol for streaming audio
and AV/C Audio Subunit for connection management and controlling. Please
bear with me as I am not really a software designer although I have some
experience with debugging and modifying NT kernel drivers. I am now trying
to go through a huge pile of documentation on the MSDN site, but I have a
feeling that this will take forever unless someone could guide me.
Also, is there a difference between Windows XP home and pro editions for the
purpose of IEEE 1394 driver development?
Thanks,
/Mikhail Tag: Win XP checked SP1a Tag: 31585
regarding NDISUIO control codes
hi all,
i am facing a problem wrt NDISUIO protocol available alongwith XPDDK.
These are the defnitions defined in nuiouser.h
****************************************************************************
****
define FSCTL_NDISUIO_BASE FILE_DEVICE_NETWORK
#define _NDISUIO_CTL_CODE(_Function, _Method, _Access) \
CTL_CODE(FSCTL_NDISUIO_BASE, _Function, _Method, _Access)
#define IOCTL_NDISUIO_OPEN_DEVICE \
_NDISUIO_CTL_CODE(0x200, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_NDISUIO_QUERY_OID_VALUE \
_NDISUIO_CTL_CODE(0x201, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_NDISUIO_SET_OID_VALUE \
_NDISUIO_CTL_CODE(0x205, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_NDISUIO_SET_ETHER_TYPE \
_NDISUIO_CTL_CODE(0x202, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_NDISUIO_QUERY_BINDING \
_NDISUIO_CTL_CODE(0x203, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_NDISUIO_BIND_WAIT \
_NDISUIO_CTL_CODE(0x204, METHOD_BUFFERED, FILE_ANY_ACCESS)
****************************************************************************
********
now my problem is that in _NDISUIO_CTL_CODE(0x200, METHOD_BUFFERED,
FILE_ANY_ACCESS)
where does this Function value 0x200 coming from ,
and also i want to define my own IOCTL code for Closing the device , what
should be the code.
...where do all these function hexadecimalk values coming from
TIA
tarun Tag: Win XP checked SP1a Tag: 31584
Hotplug.dll
I'm using Windows 2000 Professional with SP3, SP4. I
sometimes get a error message on double clicking the
unplug or eject tray icon. "An error occured while windows
was working with control panel file c:\winnt\system32
\hotplug.dll"
why?
thnx
Anand. Tag: Win XP checked SP1a Tag: 31582
MiniportHalt
I have an Intermediate Driver that works on Dell machines. On a new machine
the MiniportHalt handler is called right after Miniport Initialize Handler.
MPInitialize returns SUCCESS.
I need suggestions on how to find out why MPHalt is being called.
Larry C Tag: Win XP checked SP1a Tag: 31574
WHQL driver issue
If the driver has passed Windows 2000 and XP WHQL test,
then we send the log to Microsoft to get catlog file.
Can the catlog file be used in both Windows 2000 and XP?
Or there are two catlog files , one for Windows 2000 and
another for Windows XP ?
Best regards.
Wayne Tag: Win XP checked SP1a Tag: 31573
scanning after installing driver/inf??
Hi,
I have a setup program that will pre-install the inf &
cat file (SetupCopyOEMInf) and the driver into the
required directories. Also, I have a way to detect that
the hardware is installed (Setup calls). Finally, I need
to do a hardware scan so that the driver will get updated
automatically. What are the SetupDi calls that I have to
make to achive this?
The CM_Reenumerate_DevNode_Ex() call that devcon uses
does not work under 98 & ME!! I hope there is a generic
call that works on all flavors (XP/2K/ME/98)??
Regards
HV Tag: Win XP checked SP1a Tag: 31554
usb SUN keyboard driver?
I do not know if i'm in the correct newsgroup (if not: sorry).
I've the following question:
I'm trying to enable the SUN specific keys (front, copy,
paste, etc.) of a SUN type-6 usb keyboard which is
connected to a windows XP machine. I've already played with
mapping of the scan codes in the registry, but i don't know
how to reach the SUN specific keys.
Is it possible to enable these buttons via scan code
mapping in the registry or do i have to write a driver?
In the 'USB HID to PS/2 Scan Code Translation Table' the
PS/2 make and break scan codes for the SUN specific keys
are unassigned, is this relevant? Tag: Win XP checked SP1a Tag: 31535
Real newbie question: RtlCopyMemory
Hi
just one newbie question:
I tried the following to copy three buffers 'in a row':
FIRSTBUFFER firstbuffer;
SECBUFFER secbuffer;
THIRDBUFFER thirdbuffer;
RtlCopyMemory(buffer,&firstbuffer,sizeof(firstbuffer));
RtlCopyMemory(buffer + sizeof _
(firstbuffer),&secbuffer,sizeof(secbuffer));
RtlCopyMemory(buffer + sizeof(firstbuffer) + sizeof
(secbuffer),&thirdbuffer,sizeof(thirdbuffer));
When I run this code in my driver, the system crashes.
Why?
Thanks
Sam Tag: Win XP checked SP1a Tag: 31528
Usb
Hello,
I am working in c++ application. I have to read data from USB mass
storage device connected on the usb port. I don't know how to identify
the USB device.
I am using CreateFile Function for opening the device.
HANDLE CreateFile(
LPCTSTR lpFileName, // file name
DWORD dwDesiredAccess, // access mode
DWORD dwShareMode, // share mode
LPSECURITY_ATTRIBUTES lpSecurityAttributes, // SD
DWORD dwCreationDisposition, // how to create
DWORD dwFlagsAndAttributes, // file attributes
HANDLE hTemplateFile // handle to template
file
);
What will be the first parameter? How i'll get the name of the device
connected to the usb port?
Thanks in Advance
Rgds
Ritu Tag: Win XP checked SP1a Tag: 31523
Suspend /Resume doesn't work with the 2.0 hostcontroller
Hi,
We have USB to Serial port converter. We have written
windows-2000/XP WDM driver for that device.
The 2000/XP WDM driver is working fine with all the serial
port applications.
When we receive PowerDeviceD1,PowerDeviceD2 or
PowerDeviceD3 we are stopping the all the USB
transactions. And configuring the device (Setting the
registers and starting the USB transsactions) when the we
receive PowerDeviceD0.
When the systems comes out of the standby mode, my device
(Application) works fine with the
1.1 hostcontroller.
But the same thing is not happenning with the 2.0
hostcontroller. i.e My device doesn't work
when system comes out of standby mode.
I Debugged this issue and I found that VendorCommands (For
Configureing the device registers) and Usb Bulk requests
are failing when we are processing the PowerDeviceD0. That
is why device is not working properly.
The status of the URB when the USB Bulk or Vendor requests
failed:
URB status is 0x80000300 with VIA2.0 Hostcontroller
URB status is 0xc0000005 with NEC2.0 Hostcontroller
Does anyone have any idea why this not work?
Thanks in advance
B. Madhukar Reddy Tag: Win XP checked SP1a Tag: 31519
Hi,
where I may download Windows XP checked/debug service pack
1a?