I hav Windows Xp Sp2 and I am using Windows DDK 2600.
My device driver source contains link to ntstrsafe.lib and and #define
<ntstrsafe.h>
But I am unable to find these files in the DDK 2600 ,
I get a compaliation error "No such file or directory"
Is there any equivalent header file and library in Windows DDK 2600 ?
Device driver built in Windows XP will it work on windows 2000 and
Windows 2003 ?
Please guide me
> Device driver built in Windows XP will it work on windows 2000 and
> Windows 2003 ?
A driver will not necessarily work on downlevel platforms. But this is
more a question of which APIs and build settings you use than which
DDK/WDK you use. Using appropriate build settings, you can build drivers
for OS releases older than the your DDK/WDK version.
--Johannes
--
Johannes Passing - http://int3.de/
Drivers built by XP build env will _not_ generically work on w2k. To make a
w2k-compatible driver, use w2k build env.
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
ma...@storagecraft.com
http://www.storagecraft.com
"Beginner to device driver" <ranu...@gmail.com> wrote in message
news:45a9567e-40b2-48d0...@e6g2000prf.googlegroups.com...
On Mar 17, 4:59 pm, "Maxim S. Shatskih" <ma...@storagecraft.com>
wrote:
> Forget DDK 2600, use WDK 6001 and the XP build env in it.
>
> Drivers built by XP build env will _not_ generically work on w2k. To make a
> w2k-compatible driver, use w2k build env.
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> ma...@storagecraft.comhttp://www.storagecraft.com
>
> "Beginner to device driver" <ranu2...@gmail.com> wrote in messagenews:45a9567e-40b2-48d0...@e6g2000prf.googlegroups.com...
>
>
>
> > I am a beginner to device driver
>
> > I hav Windows Xp Sp2 and I am using Windows DDK 2600.
> > My device driver source contains link to ntstrsafe.lib and and #define
> > <ntstrsafe.h>
>
> > But I am unable to find these files in the DDK 2600 ,
> > I get a compaliation error "No such file or directory"
>
> > Is there any equivalent header file and library in Windows DDK 2600 ?
>
> > Device driver built in Windows XP will it work on windows 2000 and
> > Windows 2003 ?
>
> > Please guide me- Hide quoted text -
>
> - Show quoted text -
But the w2k build env can be hosted on an XP OS.
OK now I understand using different build evnironment I can build
device drivers compatible with different OS .
Have some silly question
1) Wat about Vista ?
2) Do I need to make any changes in code to make the driver compatible
with different OS or use the same code with different environment ?
On Mar 17, 9:33 pm, "Ben Voigt [C++ MVP]" <r...@nospam.nospam> wrote:
> Maxim S. Shatskih wrote:
> > Forget DDK 2600, use WDK 6001 and the XP build env in it.
>
> > Drivers built by XP build env will _not_ generically work on w2k.
> > To make a w2k-compatible driver, use w2k build env.
>
> But the w2k build env can be hosted on an XP OS.
>
>
>
>
>
> > "Beginner to device driver" <ranu2...@gmail.com> wrote in message
> >news:45a9567e-40b2-48d0...@e6g2000prf.googlegroups.com...
> >> I am a beginner to device driver
>
> >> I hav Windows Xp Sp2 and I am using Windows DDK 2600.
> >> My device driver source contains link to ntstrsafe.lib and and
> >> #define <ntstrsafe.h>
>
> >> But I am unable to find these files in the DDK 2600 ,
> >> I get a compaliation error "No such file or directory"
>
> >> Is there any equivalent header file and library in Windows DDK 2600 ?
>
> >> Device driver built in Windows XP will it work on windows 2000 and
> >> Windows 2003 ?
>
Most w2k/XP drivers run on Vista unchanged, the only major new thing in Vista
kernel land is NDIS6. NDIS5 miniports and IMs will run, but thru wrappers and
thus slower.
>2) Do I need to make any changes in code to make the driver compatible
>with different OS or use the same code with different environment ?
Build to the oldest API using the oldest build env - namely w2k. This will
work.
If you really want to use later features, you have 2 ways:
- discover the features in runtime by RtlIsNtDdiVersionAvailable (the modern
proper GetVersion call) and MmGetSystemRoutineAddress.
- use the new features under the NTDDI_VERSION macro and rebuild the code using
different build envs - so, the SYS file built by w2k build env will be for w2k
only, the SYS file built by XP build env will be for XP only, and so on.
Advantage of way 1 - single binary for all OSes. Advantage of way 2 - more
proper use of the new kernel features.
Well I downloaded Windows Vista WDK 6000 as I couldn find a separate
WDK for XP .
Shall I install Windows Vista WDK 6000 in XP and build drivers ? Will
it work fine ?
Or I need to install this in Windows vista only ?
On Mar 18, 3:58 pm, "Maxim S. Shatskih" <ma...@storagecraft.com>
wrote:
WDK 6000 is a bit obsolete too, use 6001 (the Server 2008 WDK).
>Shall I install Windows Vista WDK 6000 in XP and build drivers ? Will
>it work fine ?
Yes. It can be installed from XP up and requires .NET 2.0 (provided on the same
disc).
It has several build envs - for w2k/XP/WNET aka 2003/WLH aka Vista or 2008 -
and for several CPU types - x86, x64, amd64.
So, it works from XP up, and can build from w2k up.
and VMware image
I just put some DbgBreakPoints in code and tried to debug it and I got
following error
"
Debugger is not using correct symbols
In order for this command to work properly symbol path should point
to .pdb files that have full type information"
I downloaded WindowsXP-SP2-Symbols where do I need to install this ?
in local machine or vmware image ?
and hw do i link to .pdb files ?
On Mar 19, 5:58 pm, Beginner to device driver <ranu2...@gmail.com>
wrote:
> > ma...@storagecraft.comhttp://www.storagecraft.com- Hide quoted text -
--
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
"Beginner to device driver" <ranu...@gmail.com> wrote in message
news:60bc0156-524e-4790...@s13g2000prd.googlegroups.com...
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
ma...@storagecraft.com
http://www.storagecraft.com
"Beginner to device driver" <ranu...@gmail.com> wrote in message
news:60bc0156-524e-4790...@s13g2000prd.googlegroups.com...
well I was trying to debug 1 scenario where in
I have an application that does DeviceIoControl to write data to usb
device (which fails)
DeviceIOControl is internally taken care by device driver ...
As soon I as call DeviceIocontrol I want to start debugging device
driver or display DbgPrint() coments
Is it possible?
Thanks again for helping me out
On Mar 19, 6:50 pm, "Maxim S. Shatskih" <ma...@storagecraft.com>
wrote:
> Read about .symfix command in WinDbg docs and use it to download the
> symbols from MS.
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> ma...@storagecraft.comhttp://www.storagecraft.com
>
> "Beginner to device driver" <ranu2...@gmail.com> wrote in messagenews:60bc0156-524e-4790...@s13g2000prd.googlegroups.com...
> > > ma...@storagecraft.comhttp://www.storagecraft.com-Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
Is this your driver which you have just built? yes, surely.
On Mar 20, 4:00 pm, "Maxim S. Shatskih" <ma...@storagecraft.com>
wrote:
unable to resolve y is this happening ...
the strange thing is that
This happns only in Japanese Xp ..
On Mar 20, 6:08 pm, Beginner to device driver <ranu2...@gmail.com>
wrote:
> > ma...@storagecraft.comhttp://www.storagecraft.com- Hide quoted text -
Well, what does your DriverEntry do, and what does it return?
--
Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.
// ****** set up the dispatch table ******
for (index=0, dispatch=driverObject->MajorFunction ;
index <= IRP_MJ_MAXIMUM_FUNCTION ;
index++, dispatch++)
{
*dispatch = DispatchAny;
}
driverObject->DriverUnload = DriverUnload;
driverObject->DriverExtension->AddDevice=AddDevice;
driverObject->MajorFunction[IRP_MJ_CREATE] = DriverOpen;
driverObject->MajorFunction[IRP_MJ_CLOSE] = DriverClose;
driverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] =
DriverIoControl;
driverObject->MajorFunction[IRP_MJ_PNP] = DriverPnp;
driverObject->MajorFunction[IRP_MJ_POWER] = DriverPower;
return STATUS_SUCCESS;
AddDevice takes care of creating filter device object.
Bug check analysis is as follow:
*******************************************************************************
*
*
* Bugcheck
Analysis *
*
*
*******************************************************************************
Unknown bugcheck code (0)
Unknown bugcheck description
Arguments:
Arg1: 00000000
Arg2: 00000000
Arg3: 00000000
Arg4: 00000000
Debugging Details:
------------------
PROCESS_NAME: Idle
FAULTING_IP:
nt!RtlpBreakWithStatusInstruction+0
80528da8 cc int 3
EXCEPTION_RECORD: ffffffff -- (.exr 0xffffffffffffffff)
ExceptionAddress: 80528da8 (nt!RtlpBreakWithStatusInstruction)
ExceptionCode: 80000003 (Break instruction exception)
ExceptionFlags: 00000000
NumberParameters: 3
Parameter[0]: 00000000
Parameter[1]: 8054bf4c
Parameter[2]: 000003f8
ERROR_CODE: (NTSTATUS) 0x80000003 - {EXCEPTION} Breakpoint A
breakpoint has been reached.
DEFAULT_BUCKET_ID: DRIVER_FAULT
BUGCHECK_STR: 0x0
STACK_TEXT:
8054adac 8054226d 00000001 81fa8e02 00000030 nt!
RtlpBreakWithStatusInstruction
8054adac f873c062 00000001 81fa8e02 00000030 nt!KeUpdateSystemTime
+0x165
8054ae50 80542cc0 00000000 0000000e 00000000 intelppm!AcpiC1Idle+0x12
8054ae54 00000000 0000000e 00000000 00000000 nt!KiIdleLoop+0x10
STACK_COMMAND: kb
FOLLOWUP_IP:
nt!RtlpBreakWithStatusInstruction+0
80528da8 cc int 3
SYMBOL_STACK_INDEX: 0
SYMBOL_NAME: nt!RtlpBreakWithStatusInstruction+0
FOLLOWUP_NAME: MachineOwner
MODULE_NAME: nt
IMAGE_NAME: ntkrnlpa.exe
DEBUG_FLR_IMAGE_TIMESTAMP: 41107b0c
BUCKET_ID: MANUAL_BREAKIN
Followup: MachineOwner
---------
On Mar 23, 6:43 am, Tim Roberts <t...@probo.com> wrote:
> Beginner to device driver <ranu2...@gmail.com> wrote:
>
>
>
> >When I start the device driver from command prompt I get error 1058
> >and while debugging i observed that it enters into driverentry and
> >then unloads ...
>
> Well, what does your DriverEntry do, and what does it return?
> --
> Tim Roberts, t...@probo.com
> Providenza & Boekelheide, Inc.
>My driverentry does only this
>
>
> // ****** set up the dispatch table ******
>
> for (index=0, dispatch=driverObject->MajorFunction ;
> index <= IRP_MJ_MAXIMUM_FUNCTION ;
> index++, dispatch++)
> {
> *dispatch = DispatchAny;
> }
>
> driverObject->DriverUnload = DriverUnload;
> driverObject->DriverExtension->AddDevice=AddDevice;
> driverObject->MajorFunction[IRP_MJ_CREATE] = DriverOpen;
> driverObject->MajorFunction[IRP_MJ_CLOSE] = DriverClose;
> driverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] =
>DriverIoControl;
> driverObject->MajorFunction[IRP_MJ_PNP] = DriverPnp;
> driverObject->MajorFunction[IRP_MJ_POWER] = DriverPower;
>
> return STATUS_SUCCESS;
This is a PnP driver. You said you were starting it from the command line.
How were you doing that?
but I even tried with code using StartService api call ,even then I
face the same problem .....
On Mar 28, 5:41 am, Tim Roberts <t...@probo.com> wrote:
> Tim Roberts, t...@probo.com
> Providenza & Boekelheide, Inc.- Hide quoted text -
Right. The "sc" command is just a way to access the StartService API. PnP
drivers cannot be started as services. They must be loaded by PnP when
some bus driver enumerates them.
What kind of a driver is this?