Winlog screen displayed
I need to know when the Winlogon screen is displayed. I want this as
it is at this point that my app is going to know that all services are
up and running. Winlogon Notification will only send an event after a
user logs in and I need to know that we are ready to accept a user to
log in. If a user is not going to login to this machine by using the
Winlogon Notification I will never know that we are in a run state
according to my app. The event before this is Startup and this is too
early in the boot process for me to say we are ready to go.
Do any of you know how I can tell that the logon screen is there? Is
there a service that I can check that will start right about the time
of the logon screen? I know that if the machine is set to auto logon
a user then I will not get a logon screen but I can then use the
Winlogon StartShell to know that we are ready to go.
Thanks
Bob Tag: WIN DDK for x64 build Tag: 60620
WM_DEVICECHANGE/DBT_DEVICEARRIVAL is so slo-o-ow
WM_DEVICECHANGE (with DBT_DEVICEARRIVAL) works fine but is so slo-o-ow in
CD/DVD-rom case. It is not unusual to wait about 10 seconds between
injecting the tray and the moment apps finally recieves
WM_DEVICECHANGE/DBT_DEVICEARRIVAL notification. Is there any way for
user-mode app to get "earlier" notification about media insert/tray inject
event?
Many thanks!
Igor. Tag: WIN DDK for x64 build Tag: 60610
SCSI_PASS_THROUGH_DIRECT and SCSI_PASS_THROUGH documentation is wr
I used following links to extract information:
SCSI_PASS_THROUGH_DIRECT
http://msdn.microsoft.com/library/en-us/storage/
hh/storage/structs-scsibus_64c46eef-e5bc-4e81-a479-2bdbd93605e7.xml.asp
SCSI_PASS_THROUGH
http://msdn.microsoft.com/library/en-us/storage/
hh/storage/structs-scsibus_6d017ae1-d61d-49b8-bfaf-b6b15341732b.xml.asp
Look at SCSI_IOCTL_DATA_IN description for DataIn parameter - funny, but in
both cases description is different but should be always same.
In my opinion should be SCSI_IOCTL_DATA_IN -Read data from the device.
Is not it?
Furthermore I looked into latest MSDN Library from January, 2005 but found
even more funny things, for both IOCTL documentation saying that
SCSI_IOCTL_DATA_IN is â??Write data to the deviceâ??:) Is this correct? Tag: WIN DDK for x64 build Tag: 60601
Inter-Driver Communication
Does anyone have any ideas about how I can
Send a IOCTL message from one driver to another video driver.
I only have access to the code from the sending driver.
Thanks in advance,
Anders Tag: WIN DDK for x64 build Tag: 60586
Printer driver on Serial port
I'm using the Language Monitor in the DDK. My problem is when I install the
printer on a serial port (COM), I can't use that port with any other
applications. Is there a way to modifiy the Language Monitor to free the
port when there are no jobs printing?
--
Mario Tag: WIN DDK for x64 build Tag: 60573
Does my driver cause "Access Violation in svchost.exe" ?
Hi,
I have an Ndis driver for Windows XP. It seems to work fine.
But the Windbg might catch an "access violation in svchost.exe" error during
the XP shutdown every thundreds times.
Is the error caused by my Ndis driver? Or, it's a bug of svchost.exe?
Below lists the windbg messages:
=====================================================================
*** An Access Violation occurred in C:\WINDOWS\System32\svchost.exe -k
netsvcs:
The instruction at 00650066 tried to read from an invalid address, 00650066
*** enter .exr 0189F9DC for the exception record
*** enter .cxr 0189F9F8 for the context
*** then kb to get the faulting stack
Break instruction exception - code 80000003 (first chance)
*** WARNING: symbols timestamp is wrong 0x41109494 0x4060f0f2 for ntdll.dll
ntdll!DbgSsHandleKmApiMsg+0x14e:
001b:7c921230 cc int 3
kd> Tag: WIN DDK for x64 build Tag: 60571
Problems unloading a driver
Hi,
I am trying to write an unloadable driver, to achieve that I have created a
minimal, presumably unloadable driver, Loading and initializing the driver
succeeds BUT unloading ( using 'ControlService(SERVICE_CONTROL_STOP)' ) fails
with the following error: "The requested control is not valid for this
service.", What may cause such an error? I have added the required
DeviceCreate and DeviceClose ICTL Handlers but it had no effectâ?¦
// The CreateClose IOCTL I have added...
NTSTATUS DispatchCreateClose(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
{
Irp->IoStatus.Status = STATUS_SUCCESS;
Irp->IoStatus.Information=0;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return STATUS_SUCCESS;
}
Any help, pointers or samples would be appreciatedâ?¦
Following is the short code with which I am experiancing the problem:
The Driver:
**********
#pragma code_seg("INIT")
// This handler is NEVER called...
VOID __stdcall Unload(IN PDRIVER_OBJECT DriverObject) {
UNICODE_STRING uszDeviceString;
DbgPrint("Simple C++ Driver - Unload.\n");
IoDeleteDevice(DriverObject->DeviceObject);
RtlInitUnicodeString(&uszDeviceString, L"\\DosDevices\\ProcDrv");
IoDeleteSymbolicLink(&uszDeviceString);
TerminateCppRunTime();
}
NTSTATUS __stdcall DriverEntry(IN PDRIVER_OBJECT DriverObject
, IN PUNICODE_STRING
RegistryPath) {
DbgPrint("Simple C++ Driver - DriverEntry\nCompiled at " __TIME__ "
on " __DATE__ "\n");
NTSTATUS Status = InitializeCppRunTime();
if (STATUS_SUCCESS != Status)
goto ErrorExit;
UNICODE_STRING uszDriverString, uszDeviceString;
RtlInitUnicodeString(&uszDriverString, L"\\Device\\ProcDrv");
RtlInitUnicodeString(&uszDeviceString, L"\\DosDevices\\ProcDrv");
DbgPrint("C++ runtime was initialized successfuly...\n");
PDEVICE_OBJECT pDeviceObject = NULL;
Status = IoCreateDevice(DriverObject, 0, &uszDriverString,
FILE_DEVICE_UNKNOWN, 0, FALSE,
&pDeviceObject);
if (STATUS_SUCCESS != Status)
goto ErrorExit;
DbgPrint("Device created successfuly...\n");
Status = IoCreateSymbolicLink(&uszDeviceString, &uszDriverString);
if(Status != STATUS_SUCCESS) {
Unload(DriverObject);
goto ErrorExit;
}
DbgPrint("Link created successfuly...\n");
DriverObject->DriverUnload = Unload;
goto SafeExit;
ErrorExit:
TerminateCppRunTime();
SafeExit:
DbgPrint("DriverEntry retruns 0x%.8x\n", Status);
return Status;
}
#pragma code_seg()
The driver Loading/Unloading routine
*******************************
BOOL WaitForState(SC_HANDLE hDriver,
DWORD dwDesiredState,
SERVICE_STATUS* pss) {
while (1) {
if(FALSE == ::QueryServiceStatus(hDriver, pss))
return FALSE;
// If the driver reaches the desired state
if (pss->dwCurrentState == dwDesiredState)
break;
DWORD dwWaitHint = pss->dwWaitHint / 10;
if (dwWaitHint < 1000) dwWaitHint = 1000; // At most once a second
if (dwWaitHint > 10000) dwWaitHint = 10000; // At least every 10 seconds
::Sleep(dwWaitHint);
} // while
return TRUE;
}
int _tmain(int argc, _TCHAR* argv[]) {
// Start the driver
SC_HANDLE hSCM = ::OpenSCManager(NULL, NULL,
SC_MANAGER_ALL_ACCESS);
SC_HANDLE hDriver= ::CreateService(hSCM, "ProcDrv", "ProcDrv",
SERVICE_ALL_ACCESS,
SERVICE_KERNEL_DRIVER,
SERVICE_DEMAND_START,
SERVICE_ERROR_NORMAL,
argv[1], NULL,
NULL, NULL,
NULL, NULL);
if(0 == hDriver && (::GetLastError() == ERROR_SERVICE_EXISTS ||
::GetLastError() == ERROR_SERVICE_MARKED_FOR_DELETE) &&
(0 == (hDriver = ::OpenService(hSCM, "ProcDrv", SERVICE_ALL_ACCESS))))
return 0;
SERVICE_STATUS serviceStatus = { 0 };
BOOL bResult = ::StartService(hDriver, 0, NULL);
if (bResult)
bResult = WaitForState(hDriver, SERVICE_RUNNING, &serviceStatus);
else
bResult = (::GetLastError() == ERROR_SERVICE_ALREADY_RUNNING);
if (!bResult) {
::DeleteService(hDriver);
::CloseServiceHandle(hDriver);
} else {
// Stop the driver, returns "The requested control is not valid for this
service."
if(TRUE == (bResult = ::ControlService(hDriver,
SERVICE_CONTROL_STOP,
&serviceStatus)))
bResult = WaitForState(hDriver, SERVICE_STOPPED, &serviceStatus);
::DeleteService(hDriver);
::CloseServiceHandle(hDriver);
}
::CloseServiceHandle(hSCM);
return 0;
}
Nadav.
http://www.sophin.com Tag: WIN DDK for x64 build Tag: 60569
Isoch Read/Write with loopback (newbie)
I am developing a driver for ISP1582/1583 for very high speed
application ( ~200M). I build my driver based on isousb from WinDDK
2k3. My platform is WinXP Sp2.
Now, the PC recognizes my board, but when I try using the testing
application from isousb to read/write, it does not work. It seems that
the testing application from DDK uses the name PIPE04 and PIPE05
directly to open the handle to the pipe. Is there any other way to
overcome this problem ?
I tried using the simple way, which is open a handle to the device
using GUID with CreateFile(), then using ReadFile() and WriteFile()
but that fails as well, GetLastError() return 22 - ERROR_BAD_COMMAND
[The device does not recognize the command.]
I will have to write a loopback mode application as well. The loopback
will only depend on user-mode application. Am I right ?
Pls enlighten me on this part. Thanks a lot ! Tag: WIN DDK for x64 build Tag: 60563
Isoch Read/Write with loopback (newbie)
I am developing a driver for ISP1582/1583 for very high speed
application ( ~200M). I build my driver based on isousb from WinDDK
2k3. My platform is WinXP Sp2.
Now, the PC recognizes my board, but when I try using the testing
application from isousb to read/write, it does not work. It seems that
the testing application from DDK uses the name PIPE04 and PIPE05
directly to open the handle to the pipe. Is there any other way to
overcome this problem ?
I tried using the simple way, which is open a handle to the device
using GUID with CreateFile(), then using ReadFile() and WriteFile()
but that fails as well, GetLastError() return 22 - ERROR_BAD_COMMAND
[The device does not recognize the command.]
I will have to write a loopback mode application as well. The loopback
will only depend on user-mode application. Am I right ?
Pls enlighten me on this part. Thanks a lot ! Tag: WIN DDK for x64 build Tag: 60562
Serenum loads in Win XP, bu not on 2K; same inf !!!
Hi,
This is the snippet of .inf file.
...
[ComPort.XXX.NT]
AddReg=ComPort.XXX.AddReg
CopyFiles=ComPort.XXX.NT.Copy
Include=msports.inf
Needs=SerialEnumerator.NT
[ComPort.XXX.AddReg]
HKR,,PortSubClass,1,01
[ComPort.XXX.NT.Copy]
serxxx.sys
[ComPort.XXX.NT.HW.AddReg]
HKR,,"UpperFilters",0x00010000,"serenum"
[ComPort.XXX.NT.HW]
AddReg=ComPort.XXX.NT.HW.AddReg
...
The same inf file loads serenum as upperfilter in Windows XP, but not
on Windows 2000. Any ideas on what could be wrong? Appreciate any help.
Thanks in advance.
Ravi... Tag: WIN DDK for x64 build Tag: 60560
Can i create Multiple VLANs using MUX
Hi,
Can I create Multiple VLANs using the MUX Sample Driver.
Recently very strange behaviuor is occuring.
I installed and uninstalled the MUX 2-3 times and they are appearing as
MUX Sample Driver # 2 , 3 , 4 , 5 etc.
But I can actually set the OID_GEN_VLAN_ID in only 1 of them using NDISUIO.
Pls Explain ??
What I meas is that why doesnt NDISUIO protocol binds to all Virtual
Miniport Drivers(IM) but only one of them ??
Can I enumerate all the Virtual Network Adapters that the MUX creates ?
TIA
Regards
Tarun Tag: WIN DDK for x64 build Tag: 60549
setting "custom" dvd book type
I am curious if anybody can help me with the following info:
1) what CDB/SCSI command is to be used to set DVD book type?
2) how to determine whether this particular dvd-writer supports changing
book type?
Many thanks!
Igor. Tag: WIN DDK for x64 build Tag: 60548
Multiple monitor video
What APIs are available to query and/or manipulate the multi-monitor support
in WinXP? Specifically, I want to be able to determine if multiple screens
are configured, and toggle on/off screens other than the primary.
The second can be achieved through the UI by going into the Display
Properties applet, choosing the settings tab, right clicking the second (or
other) screen, choosing "Attached", then clicking OK. I'm hoping there's a
straightforward way to do that simple action programmatically.
Erik J Sawyer
Appro Systems Tag: WIN DDK for x64 build Tag: 60546
How to detect mouse double click and simultaneous click
Hi everyone,
I would like to detect mouse double click and (almost) simultaneous click of
two or more buttons in moufiltr. Do I need a timer for that or I can do it
by detecting the bits in ButtonFlags in the same or consecutive
MOUSE_INPUT_DATA?
Thanks in advance.
Liang Fu Tag: WIN DDK for x64 build Tag: 60544
Winsock 2 & Ethernet fragmentation
Hi , I'm writing this code in VC using Winsock 2, the Ethernet frames I
receive
are fragmented to 1524 byte due to Ethernet limitations,
my code is based on this simple TCP sniffer
http://www.sol-biotech.com/code/Sockets/Main.cpp
Is there any way I can instruct Winsock to assemble the frame before I'm
sending it to the application layer, I want to avoid the overhead of
reassembling the frames
Thank you,
Sharon.G Tag: WIN DDK for x64 build Tag: 60542
windows xp pro x64 compatible hardware
Is there a list of compatible hardware for win xp pro x64 edition? I built an
athlon 64 system but most of my hardware does not work and I am not finding
current drivers on manufacturer websites and the previous drivers don't seem
to work. Any suggestions? Tag: WIN DDK for x64 build Tag: 60541
Who will free Irp from IoBuildDeviceIoControlRequest?
From MSDN DDK document,
IRPs created using IoBuildDeviceIoControlRequest must be completed by
calling IoCompleteRequest and not by merely deallocating the IRP with
IoFreeIrp. IoBuildDeviceIoControlRequest queues the IRPs it creates in the
IRP queue of the current thread. Freeing these IRPs without completing them
might result in a system crash when the thread terminates as the thread
attempts to deallocate the IRP's memory.
However, from DDK examples and likes from other sources, I didn't see any
FreeIrp or CompleteIrp for this reason. Seems to me the IRP is not freed
anywhere through the code.
Who frees this IRP? Tag: WIN DDK for x64 build Tag: 60536
Kernel Polling for Correctable Machine Checks
Is it possible to disable the Windows kernel polling for correctable machine
checks on an AMD processor? I have other functionality that does the polling
for these types of errors so they can be logged to a BMC and I am getting
race conditions where some of the errors are caught by the OS and some
are caught by my functionality. I'd like to be able to disable the OS and
allow my functionality to handle all of the correctable errors.
Thanks.
Bob Tag: WIN DDK for x64 build Tag: 60530
Driver for USB Flash Drive wanted - Desperate pl. HELP
Hi,
Sorry for spamming to most popular news groups :) I am desperate and I dont
think a lot of people visit drivers news groups.
I bought a Jetway iVogue 512 MB Flash USB drive recently. It did not come
with driver for Windows 98. Could not locate Manufacturer website though I
googled all I could.
Can some one tell me how to get a Manufacturer/ Generic driver for this
device ? Appreciate any help.
Thanks
Sanchez Tag: WIN DDK for x64 build Tag: 60526
ddraw.lib
Hi All,
I have a driver for WIN CE 4.2 OS, Mydriver.dll. In this driver I need to
use direct draw objects. So, included ddraw.lib under the linker options.
When I run the dll module, I get the following error:
ddraw.lib(ddmain.obj) : error LNK2005: _DllMain already defined in
MyDriver.obj
MyDriver.dll has the entry point as DllMain and ddraw.lib also has the entry
point as DllMain and hence the multiply defined symbols. How can I overcome
this? I cannot do away with ddraw.lib.
Thanks in Advance,
Johns Tag: WIN DDK for x64 build Tag: 60523
RtlPrefixUnicodeString WindXPDDKSp1
I'm trying to use RtlPrefixUnicodeString in my driver on XP.
Can someone *please* tell me:
1. Why my project, built within the standard Build Environment shells
provided with the DDK install, can't find ntddk.h
2. Why the ddk doco doesn't tell me which lib to link to use
RtlPrefixUnicodeString
3. Why linking with ntdll.lib causes my driver to fail loading.
Regards,
Mark Tag: WIN DDK for x64 build Tag: 60519
COM port application snooping
I have a few devices that connect to PC using COM ports. I want to
develop a protocol. Application will open the COM port(non-exclusive
access) and send a protocol message. When it receives proper
response(if at all) application knew the device and continues to talk.
If the data is not expected response, may be this COM port is in use by
some other application. So how can I snoop data and take it if it for
my application and 'not capture' it if it is not for my application.
I am not sure if I can achive it at user level itself. Do I need to dig
into driver level. Is upper filter driver needed on all COM ports?
Please give guidance on how I can accomplish this simple(for my boss),
but not so simple. People who worked on embedded devices think COM port
is piece of cake, but dont believe PC side complexities.
Atleast educate me complexity here. I saw posts on virtual COM ports,
but here I am not looking for any virtual COM ports, only existing
ports. May be this snooping is needed on virtual COM also because from
PC application all are same, but I dont need to develop any virtual
ports.
Thanks,
Raj Tag: WIN DDK for x64 build Tag: 60517
Asking TDI send packets without calling TdiBuildSendDatagram
Hi,
I previously used TDI to send UDP packet, by calling TdiBuildSendDatagram,
passing destination information. TDI will build the UDP packet for me. Now
I'd like to build the packet myself. Is it possible that I can pass the
constructed UDP packet to TDI, just ask TDI to send it? (By going through
DDK, it looks like I can construct the IRP and make the TDI_SEND_DATAGRAM
request. Is that the correct way?)
Thanks, Tag: WIN DDK for x64 build Tag: 60501
Monitor CDROM read/write operations using filter driver
Hello
I want to monitor read and write operations from CDROM (on win xp and
2000).
>From what I've read so far, I understand that I need an upper filter
driver over scsiport.sys, and to monitor writing for example I need to
check for IOCTL_SCSI_PASS_THROUGH.
Is this correct? Any guidance on how to do it?
Does this method monitor writing from all burning programs?
Can anyone supply me with information about ASPI, IMAPI and why CD
writing is done through the SCSI bus and not through the cdrom driver?
Thanks,
Sharon Tag: WIN DDK for x64 build Tag: 60498
Find out the source port of socket created using ZwCreateFile
Hi,
I am using ZwCreateFile to create a raw udp socket, with dynamic source
port. After creating the socket, how can I find out what the source port is?
//code looks like:
Status = ZwCreateFile (
(PHANDLE)&AddressHandle,
GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE,
&ObjectAttributes, // object attributes.
&IoStatusBlock, // returned status information.
0, // block size (unused).
0, // file attributes.
FILE_SHARE_READ | FILE_SHARE_WRITE, // share access.
FILE_CREATE, // create disposition.
0, // create options.
EaBuffer, // EA buffer.
Length); // EA length.
Thanks Tag: WIN DDK for x64 build Tag: 60497
Trying to send multiple small IRPs -- thread hangs?
I have a problem with my driver which is a disk filter. I have to break
up read/write requests into multiple smaller requests to send to the
disk driver. IoMakeAssociatedIrp() is exactly what I need, but the DDK
states that IoMakeAssociatedIrp() can only be used by the top-most
driver (FSDs).
Heeding the DDK's warning, I have instead written code that calls
IoBuildSynchronousFsdRequest() to build an IRP to be sent synchronously
to the disk driver. The code is essentially copied verbatim from the DDK
samples:
KEVENT ke;
PIRP Irp;
KeInitializeEvent(&ke, NotificationEvent, FALSE);
Irp = IoBuildSynchronousFsdRequest(...);
stat = IoCallDriver(NextDevice, Irp);
if (stat == STATUS_PENDING)
KeWaitForSingleObject(&ke, Executive, KernelMode, FALSE, NULL);
For some reason all threads that go down this code path end up hanging
in IoCancelIrp() when they try to terminate. My event gets set to
indicate that the IRP has completed, but the IRP is still queued to the
thread. Since the kernel does not BSOD, I presume IoFreeIrp() isn't
actually called.
My question is two-fold:
1) Is there any reason why IoMakeAssociatedIrp() wouldn't work? I don't
see any intrinsic reason for the DDK's stern warning against using this
in a lower-level driver.
2) If IoMakeAssociatedIrp() is out of the question, why is my driver
causing threads to hang?
TIA
-Matt Tag: WIN DDK for x64 build Tag: 60496
multicast configuration on windows
What are the configurations I need to setup to respond to multicast packets ?
I am working on Windows 2003 server, I start a ping to 224.0.0.1, I dont get
response back from my own server or the other windows server which is in the
same subnet. But I am getting responses back from linux hosts which are also
on the same subnet.
Thanks Tag: WIN DDK for x64 build Tag: 60488
TDI driver calling ClientEventReceive handler problem
I have a TDI driver (for a message-oriented protocol, not TCP/IP) which I am
trying to run with a WinSock interface by using a helper DLL. The basic
functions such as bind, accept, connect, recv and send are working, but I
have found a problem when testing the select function which is not
indicating when data is available for reading. The driver in its original
form did not provide for the registration of a ClientEventReceive handler,
so I have had to change the code to cater for this. Now, when data is
received and I call the handler, it is always returning
STATUS_DATA_NOT_ACCEPTED: this is with a test program where a single byte of
data is available and the ReceiveFlags parameter is set to
TDI_RECEIVE_NORMAL | TDI_RECEIVE_ENTIRE_MESSAGE. I have traced into the
handler code and can see that it is checking AfdPollListHead which indicates
that there is nothing on the list, though of course without access to the
AFD source code it is impossible to tell whether this is really relevant to
my problem.
Does anyone have any ideas about what might cause this problem? Am I right
to assume that the WinSock select depends on the ClientEventReceive handler
accepting the data?
Thanks,
Geoff Oakes Tag: WIN DDK for x64 build Tag: 60487
Hyper-Threading Technology
I have a problem with my PCI device driver ( Windows XP).
It does not work properly on computers with Hyper-Threading Technology CPU.
Even if I canceled Hyper-Threading option in the BIOS Setup!
The computer has stuck after a few hours of work.
That not happened on computers without Hyper-Threading.
This is an example of my code:
affinity = KeQueryActiveProcessors();
vector = HalGetInterruptVector(deviceExtension->InterfaceType,
deviceExtension->BusNumber,
deviceExtension->InterruptLevel,
deviceExtension->InterruptVector,
&irql,
&affinity );
What I do wrong?
Thanks.
Victoria Tag: WIN DDK for x64 build Tag: 60485
VirtualPC & SoftIce
Hi,
I am tring to install Numegas SoftIce debugger on a VirtualPC WinXP, the
installation succeed BUT when I try to start SoftIce ( Concerning it was
installed in Manual startup mode ) I get Catastrophic CPU faliure and the
VirtualPC restart...
I wonder... Is it possible to install SoftIce on VirtualPC? if so, what am I
doing wrong? what should i do to enable SoftIce on VirtualPC ???
Any help, samples or pointers will be appreciated.
Nadav
http://www.sophin.com Tag: WIN DDK for x64 build Tag: 60483
x64 driver
Hi,
I am developing storage driver.
migrating for WindowsXP x64 edition from 32bit.
I got link errors:
1>addev.obj : error LNK2001: unresolved external symbol
__imp_KeGetCurrentIrql
1>isr.obj : error LNK2001: unresolved external symbol __imp_KeGetCurrentIrql
1>r592.obj : error LNK2019: unresolved external symbol
__imp_KeGetCurrentIrql referenced in function R592_CreateClose
1>pnp.obj : error LNK2001: unresolved external symbol __imp_KeGetCurrentIrql
1>control.obj : error LNK2001: unresolved external symbol
__imp_KeGetCurrentIrql
1>power.obj : error LNK2001: unresolved external symbol
__imp_KeGetCurrentIrql
1>addev.obj : error LNK2019: unresolved external symbol
__imp_KeInitializeSpinLock referenced in function R592_AddDevice
1>objchk_wnet_amd64\amd64\rimsptsk.sys : error LNK1120: 2 unresolved
externals
I'm usging Windows DDK 3190.1289.
and using "Windows Server 2003 Free x64 Build Environment" instead of
WindowsXP x64.(because WindowsXP x64 not found in menu )
Anyone have any help ?
----
ishikawa Tag: WIN DDK for x64 build Tag: 60478
ServiceMain
Hi...
I am trying to call the API StartService(), which I assume in turn will
call back my â??ServiceMainâ?? function. In the Servicemain function all I am
doing is â??RegisterServiceCtrlHandlerâ?? followed by a SetServiceStatus() with
the current state as SERVICE_RUNNING. Thatâ??s itâ?¦ However, with this my
StartService() call fails with the following error â??The service did not
respond to the start or control request in a timely fashionâ??
Not sure whatâ??s missingâ?¦â?¦
Thanks... Tag: WIN DDK for x64 build Tag: 60476
CDRW
I recently replace my CDROM hard drive with a CDRW 52x32x52 Rosewill and I am
having problems. It does not display under "My Computer" nor does it
automatically start working on a CD when you put in a software program,
however if I put a CD in the CDROM drive, then go to "MY COMPUTER" it shows
the 'D' drive and I have to double click to start my program running. WHY IS
THIS? Tag: WIN DDK for x64 build Tag: 60466
NDIS Miniport Serial Driver
Hi, i currently have two modems attached on serial ports which i would
like to run TCP/IP over when a link is established.
Although i can get one machine to accept a connection and one to dial
in, i ideally want a bi-directional link... that is either side can
initiate a connection. From my exeperiments once a port is listening
for incoming calls an outgoing connection cannot be made. This is
purely with the available services on our XP machines.
I have played about with the windows DDK and have seen the virtual
serial port driver which emulates the responses of a Hayes AT modem.
One of my thoughts is to have the modem appear as a network device
under the network and dialup connections folder. When an incoming call
is accepted the network device would be available, and appear
disconnected at all other times. I would control the logical link
(dialing and link detection) in the driver layer.
>From my short searches on newsgroups it seems this question is similair
to other peoples. Even if the bidirectional dial in / dial out can be
done by other means, i am still interested in creating a network device
which controls a device on the serial port for our propriatory radio
modems.
Many thanks for your time,
Chris Tag: WIN DDK for x64 build Tag: 60462
NDIS_TASK_TCP_LARGE_SEND
NDIS_TASK_TCP_LARGE_SEND structure member definition from
MSDN Home > MSDN Library > Win32 and COM Development > Driver
Development Kit > Network Devices and Protocols > Reference > NDIS >
Structures Used by NDIS Drivers
MinSegmentCount
A miniport driver set this to the minimum number of segments that a large
TCP packet must be divisible by before the transport can offload it to a NIC
for segmentation. The transport will not offload a large packet to the
miniport driver for segmentation unless the miniport driver can create at
least MinSegmentCount segments from the packet. If a large TCP packet does
not meet the minimum-segment requirement, the TCP/IP transport itself
segments the packet into smaller packets.
The 1st sentence and the 2nd does not seem to match each other.
Is it the expected minimum segment count input from TCP/IP transport
to NIC before segmentation offload (my interpretation from 1st sentence)
or is it the expected minimum segments that the NIC segmentation
offload can create for a given packet passed from TCP/IP transport
(my interpretation from 2nd sentence)?
Regardless, I am not quite sure why this parameter is important.
How does any value other than 1 make sense? Anyone can explain?
Doesn't "MaxSegmentCount" by NIC offload engine make more sense?
If PDU is larger than MaxOffloadSize*MaxSegmentCount, the NIC offload
engine won't be able to do the right segmentation. TCP/IP transport
should not offload in this case.
Thanks!
Heng-Hsin Tag: WIN DDK for x64 build Tag: 60457
network connection icons
I am trying to figure out when and how network connection icons are created
while a network device driver is installed. I see that this is directly
related to the keys in the registry at
HKLM\CurrentControlSet\Control\Network\{}, but what cases them to be created?
The reason why I am interested is because I have a MUX IM based driver that
keeps creating new entries upon installation and de-installation and I would
like that to stop.
--
davidg Tag: WIN DDK for x64 build Tag: 60433
Is it possible to use named pipes in a kernel mode device driver?
Hi,
please forgive me if that's a stupid question, but I'm currently starting to
write my first device driver.
I'm trying to use named pipes in the devide driver code and therefore had to
include kernel32.lib. The code is compiled and linked fine, but upon driver
installation XP says that it cannot load the driver. If I remove
kernel32.lib from TARGETLIBS, the driver is loaded without problems.
Any help greatly appreciated.
Thanks
Michael Tag: WIN DDK for x64 build Tag: 60432
Smartcard Device Path exerciser test fail
Hi,
I have two questions if anyone could help...
1) I have a smartcard driver that does not implement the IRP_MJ_READ or
IRP_MJ_WRITE, however in the device path exerciser test, it pounds the driver
with zwwritefile and zwreadfile requests. This of course gets rejected by
the OS as I do not register any IRP_MJ_WRITE or IRP_MJ_READ handling
routines. The test then says the DevPathExer has stopped making progress...
Attempting to resume thread. Is this normal or do I need to do something
about the WRITE and READ?
2) Also after the above occurs, the test will think the thread is hung and
continue to the next case. the next case sends a zwDeviceIoControl command
(which I can't find any info on) and hangs... in my windbg, I can see the
message telling me an IRP dispatch handler has returned without passing down
or completing this IRP or someone forgot to return STATUS_PENDING. When I
do a !IRP, it tells me Irp is active with 2 stacks 2 is current but not much
more info. It seems to be the IRP_MJ_DEVICE_CONTROL, but in my code that
handles that call, all I do is pass the IRP to the smartcarddevcicecontrol
API which is suppose to handle, complete, pass on...etc... the IRP for
smartcard readers. Thus I'm not understanding why I'm getting the error.
Anyone have any ideas?
Thanks! Tag: WIN DDK for x64 build Tag: 60431
_CL_ setting in DDK's setenv.bat
Curious about these explicit settings in the DDK's setenv.bat (3790):
set _ML_=/Zvc6
set _CL_=/Ztmp
set _LINK_=/Tmp
There seems to be no documentation of any of them anywhere, and the only
reference appears to be in "i386mk.inc" in the entire DDK. I believe they
have stayed like that for a while.
Now that it gives a warning (warning D4002 : ignoring unknown option
'/Ztmp') for each and every single user-mode component that I build with
PREfast, I've come to a point that I'd like to understand better the intent
behind these settings and what to do to get rid of the warning without
introducing problems down the road (yep, I cannot bear with any dust in the
code, and am living in a glass house 8-)
Thanks in advance for any insight. Apologize if this is a wrong forum for
the question, or if it was answered before (I did look left and right before
the post).
Regards,
-Brian Tag: WIN DDK for x64 build Tag: 60430
Printer driver installation from Windows 2003 Clustere server to W
Windows 2003 Clustered server has a new method to install printer drivers.
Previously, the admin had to install the printer drivers to the each node of
the clustered server and delete the printers. Then he/she could install the
printer driver to the clustered server. The new way is to install the
printer driver to the
clustered server directly from an outside the machine (no nodes for the
clustered
server).
Installing the printer driver to the Windows 98 client fails if I use the
new installation method. The installation process does not know where to
find
some/all driver files. But the old installation method does not have any
problems.
Is Microsoft aware of this issue? Is Windows 98 client officially not
supported by
Windows 2003 Clustered server? Is there a workaround or solution?
Please let me know.
Thank you. Tag: WIN DDK for x64 build Tag: 60428
Printer Driver for Windows 2003 Clustered Server
Printer drivers installed on NT4.0 client from the Windwos 2003 Clustered
server has a serious performance problem with displaying the Properties
and Printing Preferences.
When I opened the Properties on NT4.0 client, "General", "Sharing",
"Ports", "Advanced", "Color Management", and "Security" pages open
fine. But the vendor specific pages load extremely slow. It takes about
one to two minutes to open a page. Then when I press "OK" or "Cancel"
button, it also takes the same long time to close the Properties window.
Samething happens to opening the Printing Preferences page.
I checked other vendor's drivers by installing them to Windows 2003 Clustered
server and NT4.0 client environment. The same thing happens. Opening the
vendor specific pages takes a long time.
Could you please let me know if Microsoft is aware of this problem and if
there is a walk-around or a solution?
Thank you.
SL Tag: WIN DDK for x64 build Tag: 60426
Changing the name of a driver's DriverEntry entry point?
The DDK says that this is possible, but I can't figure out how to do this. I
tried to override the options to the linker, providing a new '/entry:'
option, but the utility simply puts it's own "/entry:DriverEntry" at the end,
after my change.
The line that sets the driver's entry point is in makefile.new, but I can't
figure out a way to override that setting (sets DRIVER_ENTRY macro) either
from the command-line or from the SOURCES file.
Any help would be greatly appreciated. Thanks in advance.
Brian Tag: WIN DDK for x64 build Tag: 60414
MOUSE_INPUT_DATA
Hi everyone,
According to www.microsoft.com/whdc/device/input/mcompat.mspx mouse data
packet formats are of 3 bytes (standard PS/2) and 4 bytes (3 and 5 button
wheel mouse). The definition of MOUSE_INPUT_DATA in DDK is of 24 bytes:
typedef struct MOUSE_INPUT_DATA {
USHORT UnitId;
USHORT Flags;
union {
ULONG Buttons;
struct {
USHORT ButtonFlags;
USHORT ButtonData;
};
};
ULONG RawButtons;
LONG LastX;
LONG LastY;
ULONG ExtraInformation;
} MOUSE_INPUT_DATA, *PMOUSE_INPUT_DATA;
What is the connection between them?
Thanks,
Liang Fu Tag: WIN DDK for x64 build Tag: 60412
USB PC-to-PC
I know USB is master/slave bus. Is there a way for talk between PCs
over USB..I saw Netchip development board that makes a PC as slave, but
is there any hub-like that allows two masters to talk and this acting
as slave and bridge on both sides? Tag: WIN DDK for x64 build Tag: 60407
what is class in INF for USB device
We are developing a USB device which has no class. It is generic USB
that follows standard and uses USB as communication pipe with bulk and
Isoch end point.
What shoould be the class of this device in client driver INF? Can I
use 'USB' as class in INF file.
Thanks,
Raj Tag: WIN DDK for x64 build Tag: 60406
connecting a virtual smart card reader
Dear devs
I am actually working on a virtual smart card reader with non-existing
hardware. I could manage to write a device driver, which is now listed
active in my device manager tree and does not claim any errors.
I thought when I get this working, it would be listed in the smart card
selection GUI also. But this is not true!
I also have an USB card reader driver installed (from Schlumberger)
which ist listed in both windows. Also when the reader itself is not
connected to the system. This is exactly the effect I wanted for my driver.
The same is true for the SCardListReaders function. When I use a
NULL-Context it lists all readers that were ever introduced to the
system (including mine). But when I use the real Context Handle it only
lists the readers connected to the system, with exception of the
Schlumberger reader which does not have to be connected.
How can I manage to get my reader "virtually" connected like the
Schlumberger one?
And how is the name I use in SCardIntroduceReader related to the
driver/device?
cheers,
Vic Tag: WIN DDK for x64 build Tag: 60399
Mouse drivers and Microsoft IntelliMouse
Hi every one,
I just began to learn device driver development and I thought computer mouse
was probably the simplest device to start with. My first question to you is
(1) Why none of the books that teach device driver development (I have
collected most of them) use either non-realistic examples (where no real
hardware is involved) or examples require a piece of expensive hardware (at
least to a reader like me who does not write driver for living), but not use
mouse or keyboard as examples?
There is probably a reason for that, I would like to hear your comments.
I bought a Microsoft IntelliMouse with tiltable wheel for horizontal scroll.
Is really cool and I would like to understand how it works. I would guess it
sends a larger data packet to accommodate the additional horizontal scroll
data. I wonder how the driver works and how an application program with
horizontal scroll ability (such as Excel) uses this data and carries out
horizontal scroll. I checked
www.microsoft.com/whdc/device/input/default.mspx but only found information
(such as data packet formats, etc.) for other MS IntelliMouse (without
horizontal scroll). My second question is
(2) Does Microsoft publish information on the IntelliMouse with horizontal
scroll and where can I find it?
Thanks,
Liang Fu Tag: WIN DDK for x64 build Tag: 60397
concurrent read and iocontrol
I have an multi-threaded application that calls ReadFile in one thread
and DeviceIoControl in another thread on the same driver. In the
situation that troubles me, the first thread is blocked in the
synchronous read, while the second asynchronously issues the ioctl.
Now the ioctl thread is apparently blocked until the synchronous read
returns. Before the read returns the ioctl dispatch routine in the
driver never even gets called (indicating that it is not a homemade
lock contention).
Is this normal in XP, or did I do something stupid in my driver (read
routine)?
Thanks for any suggestions!
Arne Tag: WIN DDK for x64 build Tag: 60392
Hi,
Is the DDK downloadable? I'm looking for a kit where I can generate
"Windows Server 2003 Free x64 Build Environment" .