Reg: New intermediate driver

Hi,
i have to create a new intermediate driverfor my application, i am planning porting inti this driver into the existing protocol and miniport driver.
My question here is,

can i use OS related functions such as thread , winapi’s in my driver?
can i develop my concepts in ANSI C style(independent module) and finally porting it in the form NDIS driver or i have to use only NDIS APIs to build this driver?
am using Visual stduio 6.0 is my devlopment tool and i will use ddk development fro build?

Thanks,
Balaji S

From what I understand from your post,

>can i use OS related functions such as thread , winapi’s in my driver?

What OS related functions? if from WinApi you meant that Win32 APIs from kernl32 and user32 lib than no you can not use them at kernel.

>can i develop my concepts in ANSI C style(independent module) and finally porting it in the form NDIS driver or i have to use only NDIS APIs to build this driver?

you can write it in C, even in C++ but based on what I read in this forum, C++ is not recommended for starters.

When you develop a user mode app, you use windows API but you can create your own modules as well. isn’t it. Same is true for driver also. You will use APIs exported at kernel level but obviously you can create function too.

>i will use ddk development fro build?

you mean WDk ?

Thanks
Aditya

HI,
Thanks for your reply.
i understand from your reply that, i should not use win32 apis and i can use kernel level apis for my implementation.
yes ,it is wdk only.
i used thread functions define in process.h function, ccan i go head with that or i should not use.

i want to develop one timer application, in that i will call another function once the tiemr expired. how can i implemnt in device driver level.

thanks,
balaji s

No, you cannot use process.h in the kernel.


Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

wrote in message news:xxxxx@ntdev…
> HI,
> Thanks for your reply.
> i understand from your reply that, i should not use win32 apis and i can
> use kernel level apis for my implementation.
> yes ,it is wdk only.
> i used thread functions define in process.h function, ccan i go head with
> that or i should not use.
>
> i want to develop one timer application, in that i will call another
> function once the tiemr expired. how can i implemnt in device driver
> level.
>
> thanks,
> balaji s
>
>
> Information from ESET NOD32 Antivirus, version of virus
> signature database 4351 (20090820)

>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>

Information from ESET NOD32 Antivirus, version of virus signature database 4351 (20090820)

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

Hi,
Thanks don.
but i would like to know what are the kernel level api’s to buid the timer functions.
i want to develop the timer function that when the timer is expired it should call another function, so what is the way to implement

Look at NdisSetTimer and NdisSetTimerEx


Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

wrote in message news:xxxxx@ntdev…
> Hi,
> Thanks don.
> but i would like to know what are the kernel level api’s to buid the timer
> functions.
> i want to develop the timer function that when the timer is expired it
> should call another function, so what is the way to implement
>
>
> Information from ESET NOD32 Antivirus, version of virus
> signature database 4351 (20090820)

>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>

Information from ESET NOD32 Antivirus, version of virus signature database 4351 (20090820)

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

hi,
Can i get example code that have used the Ndissettimer function.
can i get any details about the implementaion constraints of network device driver

Thanks,
Balaji S

Look in the WDK samples, that is what they are there for. If you can’t
search and find things in the samples you are doomed.


Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

wrote in message news:xxxxx@ntdev…
> hi,
> Can i get example code that have used the Ndissettimer function.
> can i get any details about the implementaion constraints of network
> device driver
>
> Thanks,
> Balaji S
>
>
> Information from ESET NOD32 Antivirus, version of virus
> signature database 4351 (20090820)

>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>

Information from ESET NOD32 Antivirus, version of virus signature database 4351 (20090820)

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

Thanks,
actually in the Ndisinitializedriver apsi . one parameter anmed function context. what i ahve to pass to that arguments

thanks,
balaji s

I also replyed to your “Timers in IM Driver” question.

First, get the passthru sample from the WDK.
Second, read about NdisSetTimerxx, NdisWaitEvent, and the other time realted functions.

What is ‘Ndisinitializedriver’ you speak of?

Larry C

hey,
am using NDISintializetimer and Keinitializetimer functions in my code , but i get error like this
ram files\inc\ddk\w2k\ntddk.h(370) : error C2146: syntax error : missing ‘;’ before identifier ‘Lock’
program files\inc\ddk\w2k\ntddk.h(370) : error C2501: ‘PULONG_PTR’ : missing storage-class or type specifiers
program files\inc\ddk\w2k\ntddk.h(370) : error C2501: ‘Lock’ : missing storage-class or type specifiers
program files\inc\ddk\w2k\ntddk.h(826) : error C2146: syntax error : missing ‘;’ before identifier ‘KSPIN_LOCK’
program files\inc\ddk\w2k\ntddk.h(826) : fatal error C1004: unexpected end of file found

i ahve included header files, but still am getting

Thanks,
Balaji s

You should be using the WDK and not an obsolete DDK.
How are you building the driver? You should be using the build utility. You
previously said that you were using VS6. How are you using this?

Bill Wandel

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]
On Behalf Of xxxxx@hcl.in
Sent: Thursday, August 20, 2009 11:50 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Reg: New intermediate driver

hey,
am using NDISintializetimer and Keinitializetimer functions in my code , but
i get error like this ram files\inc\ddk\w2k\ntddk.h(370) : error C2146:
syntax error : missing ‘;’ before identifier ‘Lock’
program files\inc\ddk\w2k\ntddk.h(370) : error C2501: ‘PULONG_PTR’ : missing
storage-class or type specifiers program files\inc\ddk\w2k\ntddk.h(370) :
error C2501: ‘Lock’ : missing storage-class or type specifiers program
files\inc\ddk\w2k\ntddk.h(826) : error C2146: syntax error : missing ‘;’
before identifier ‘KSPIN_LOCK’
program files\inc\ddk\w2k\ntddk.h(826) : fatal error C1004: unexpected end
of file found

i ahve included header files, but still am getting

Thanks,
Balaji s


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Balaji,

You are moving way too fast without doing your homework.

It looks like you haven’t read the available documentation, haven’t examined
the WDK samples deeply enough and haven’t taken the time to learn the basics
of Windows drivers and tools.

This list isn’t a substitute for that.

Do your homework. As last resort, ask the list.

Thomas F. Divine

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@hcl.in
Sent: Thursday, August 20, 2009 11:50 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Reg: New intermediate driver

hey,
am using NDISintializetimer and Keinitializetimer functions in my code , but
i get error like this
ram files\inc\ddk\w2k\ntddk.h(370) : error C2146: syntax error : missing ‘;’
before identifier ‘Lock’
program files\inc\ddk\w2k\ntddk.h(370) : error C2501: ‘PULONG_PTR’ : missing
storage-class or type specifiers
program files\inc\ddk\w2k\ntddk.h(370) : error C2501: ‘Lock’ : missing
storage-class or type specifiers
program files\inc\ddk\w2k\ntddk.h(826) : error C2146: syntax error : missing
‘;’ before identifier ‘KSPIN_LOCK’
program files\inc\ddk\w2k\ntddk.h(826) : fatal error C1004: unexpected end
of file found

i ahve included header files, but still am getting

Thanks,
Balaji s


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Hey ,
Thanks for your reply.
am just directly building in the VC++ 6.0 tool itself.
i have created the sample project and used this ndis api’s.

Building in Vc is not supported, you must use the DDK build procedure…

–Mark Cariddi
OSR, Open SYstems REsources, Inc

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@hcl.in
Sent: Thursday, August 20, 2009 12:04 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Reg: New intermediate driver

Hey ,
Thanks for your reply.
am just directly building in the VC++ 6.0 tool itself.
i have created the sample project and used this ndis api’s.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

You should be using the command line environment from the WDK. Building with
VC6 is not supported. Install the latest WDK and read the documentation.
This will tell you how to build the drivers. Start with the passthru sample.
The latest WDK is not the DDK that you are using.

Bill Wandel

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]
On Behalf Of xxxxx@hcl.in
Sent: Thursday, August 20, 2009 12:04 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Reg: New intermediate driver

Hey ,
Thanks for your reply.
am just directly building in the VC++ 6.0 tool itself.
i have created the sample project and used this ndis api’s.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

what tool we can use to create a .c file and how to create source and make file for my developed c file

thanks ,
Balaji

Use your favorite editor to produce the files then use the DDK Build utility to do the compile.

Larry C

Hi,
Thanks for your replies

You can use any tool you want to develop a .c file. Even NotePad will do.

Many of us DO use Visual Studio for EDITING driver files - but don’t use
Visual Studio for BUILDING a driver.

VC 6 is an old tool and doesn’t even support the data types needed for
current drivers (and even for current applications). For example, the
ULONG_PTR data type isn’t defined in VC 6.

I suggest you get WDK 6001.18002 and Visual Studio 2008.

Then practice by building and DEBUGGING existing WDK sample drivers - like
the PASSTHRU sample driver.

Good luck,

Thomas F. Divine

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@hcl.in
Sent: Thursday, August 20, 2009 12:14 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Reg: New intermediate driver

what tool we can use to create a .c file and how to create source and make
file for my developed c file

thanks ,
Balaji


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer