Prev: Problem with Microsoft Update for BisonCam, NB Pro driver
Next: problem in porting 32 bit application in x64...
From: Don Burn on 17 Aug 2007 15:35 Jess, The WDK gives you: 1. Newer documentation 2. Significantly better tools (such as improved PreFast and StaticDV) 3. Improved samples 4. Improved compiler Also, an improved version of the WDF which is the new driver framework that many drivers should now be written in going forward. -- Don Burn (MVP, Windows DDK) Windows 2k/XP/2k3 Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr Remove StopSpam to reply "Jess Howe" <JessHowe(a)discussions.microsoft.com> wrote in message news:80977CC1-2B90-4A6A-A1C9-C12449DDD4C9(a)microsoft.com... > Don, > > Thanks for the reply. What features does the WDK give me that I don't > already have as a driver writer in the older DDK? All I see in the WDK > example are structs I've never heard of, and though I could figure them > out, > what motivation do I have to do so if the old DDK works? When I need > Vista > compatible stuff, I'll change over. > > Surely folks needed to open, read, and write com ports from the kernel > level > in the windows server 2003 days. > > Thanks again, > Jess > > "Don Burn" wrote: > >> Why would you want to use an obsolete version of the DDK? The WDK >> builds >> drivers fine for every OS the 2003 DDK did. >> >> >> -- >> Don Burn (MVP, Windows DDK) >> Windows 2k/XP/2k3 Filesystem and Driver Consulting >> Website: http://www.windrvr.com >> Blog: http://msmvps.com/blogs/WinDrvr >> Remove StopSpam to reply >> >> "Jess Howe" <JessHowe(a)discussions.microsoft.com> wrote in message >> news:7EEF9BA6-ADC8-49EE-A337-FBBBA475AA5B(a)microsoft.com... >> > Is there an example I can look at in the server 2003 ddk, or >> > elsewhere? I >> > started looking at the code in the wdk and it has a bunch of different >> > structs and types and I want my stuff to compile in the 2003 ddk. . . >> > >> > Thanks, >> > Jess >> > "Eliyas Yakub [MSFT]" wrote: >> > >> >> Take a look at the src\kmdf\toastmon sample from the Vista WDK. It >> >> demonstrates how to open a device in kernel and talk to it in a PNP >> >> friendly >> >> way. Just change the interface from toaster to >> >> GUID_DEVINTERFACE_COMPORT >> >> and >> >> see if you can open the device. >> >> >> >> -Eliyas >> >> >> >> >> >> >>
From: Eliyas Yakub [MSFT] on 17 Aug 2007 19:48 And you can download the WDK for free from connect.microsoft.com site. -Eliyas "Don Burn" <burn(a)stopspam.windrvr.com> wrote in message news:%23lYCKXQ4HHA.5796(a)TK2MSFTNGP05.phx.gbl... > Jess, > > The WDK gives you: > > 1. Newer documentation > 2. Significantly better tools (such as improved PreFast and StaticDV) > 3. Improved samples > 4. Improved compiler > > Also, an improved version of the WDF which is the new driver framework > that many drivers should now be written in going forward. > > > -- > Don Burn (MVP, Windows DDK) > Windows 2k/XP/2k3 Filesystem and Driver Consulting > Website: http://www.windrvr.com > Blog: http://msmvps.com/blogs/WinDrvr > Remove StopSpam to reply > > "Jess Howe" <JessHowe(a)discussions.microsoft.com> wrote in message > news:80977CC1-2B90-4A6A-A1C9-C12449DDD4C9(a)microsoft.com... >> Don, >> >> Thanks for the reply. What features does the WDK give me that I don't >> already have as a driver writer in the older DDK? All I see in the WDK >> example are structs I've never heard of, and though I could figure them >> out, >> what motivation do I have to do so if the old DDK works? When I need >> Vista >> compatible stuff, I'll change over. >> >> Surely folks needed to open, read, and write com ports from the kernel >> level >> in the windows server 2003 days. >> >> Thanks again, >> Jess >> >> "Don Burn" wrote: >> >>> Why would you want to use an obsolete version of the DDK? The WDK >>> builds >>> drivers fine for every OS the 2003 DDK did. >>> >>> >>> -- >>> Don Burn (MVP, Windows DDK) >>> Windows 2k/XP/2k3 Filesystem and Driver Consulting >>> Website: http://www.windrvr.com >>> Blog: http://msmvps.com/blogs/WinDrvr >>> Remove StopSpam to reply >>> >>> "Jess Howe" <JessHowe(a)discussions.microsoft.com> wrote in message >>> news:7EEF9BA6-ADC8-49EE-A337-FBBBA475AA5B(a)microsoft.com... >>> > Is there an example I can look at in the server 2003 ddk, or >>> > elsewhere? I >>> > started looking at the code in the wdk and it has a bunch of different >>> > structs and types and I want my stuff to compile in the 2003 ddk. . . >>> > >>> > Thanks, >>> > Jess >>> > "Eliyas Yakub [MSFT]" wrote: >>> > >>> >> Take a look at the src\kmdf\toastmon sample from the Vista WDK. It >>> >> demonstrates how to open a device in kernel and talk to it in a PNP >>> >> friendly >>> >> way. Just change the interface from toaster to >>> >> GUID_DEVINTERFACE_COMPORT >>> >> and >>> >> see if you can open the device. >>> >> >>> >> -Eliyas >>> >> >>> >> >>> >>> >>> > >
From: Jess Howe on 20 Aug 2007 17:24 Eliyas, I got the WDK and took a look at the toastmon example, but I don't see where it actually writes to (or reads from) the device that it detects. I see how it opens up the device and gets the device and file objects (and Pdo), but I don't see where it actually talks to it. Can you help me see where that is? My problem is that I can send down an IRP_MJ_WRITE to my serial port, but I just get junk out when it goes through. I tested out my total path and I know it works when I just open up a couple of hyperterminals and send text back and forth over a null modem cable. So I know my computers CAN talk to each other. I just need to be able to send data originating at the kernel mode level. Here is my code where I send down the irp: Offset.QuadPart = 0 ; Adapter->pWriteSerialIrp = IoBuildSynchronousFsdRequest( IRP_MJ_WRITE, Adapter->pCurrentDevice->pDeviceObject, &Adapter->cSerial_Write_Buf[Adapter->SWrite_OUT++], 1, &Offset, &event, &IoStatusBlock ); if (Adapter->pWriteSerialIrp == NULL) { status = STATUS_INSUFFICIENT_RESOURCES; goto End; } stack = IoGetNextIrpStackLocation( Adapter->pWriteSerialIrp ); Adapter->pWriteSerialIrp->IoStatus.Status = STATUS_NOT_SUPPORTED ; status = IoCallDriver( Adapter->pCurrentDevice->pDeviceObject, Adapter->pWriteSerialIrp ); if (status == STATUS_PENDING) { KeWaitForSingleObject( &event, Executive, KernelMode, FALSE, NULL ); status = IoStatusBlock.Status; } if ( !NT_SUCCESS(status) ) { DEBUGPR(TX_DBG, ("Failed to Write Serial Port\n")); } where Adapter->pCurrentDevice->pDeviceObject is my serial port top-level device object . Any ideas? I'm at a loss here. Any help is much appreciated. "Eliyas Yakub [MSFT]" wrote: > Take a look at the src\kmdf\toastmon sample from the Vista WDK. It > demonstrates how to open a device in kernel and talk to it in a PNP friendly > way. Just change the interface from toaster to GUID_DEVINTERFACE_COMPORT and > see if you can open the device. > > -Eliyas
From: Jess Howe on 21 Aug 2007 10:20
I figured it out guys. I was using the ntddser.h #defines (i.e. SERIAL_BAUD_57600) to set the baud rate in the SERIAL_BAUD_RATE structure for the IOCTL_SERIAL_SET_BAUD_RATE ioctl. I was supposed to be using the actual number of the baud rate instead. So, instead of setting the BaudRate member of the struct to SERIAL_BAUD_57600, I should have set it to 57600L. Once I started doing this, it worked like a charm. Whew. Thanks for your help in getting me excited about the WDK. I was previously under the impression that it only worked on Vista. Regards and thanks, Jess |