I need to do parameter range checking in and to check the return value
of functions.I have not done it before.so please guide me.

Re: parameter range checking by Dean

Dean
Tue Apr 10 08:13:00 CDT 2007

What are you talking about? This question seems like programming 101. You
read the input parameters and decide if they are in a valid range, do
something reasonable if they are not. Same thing on checking return values
of functions you call - see if they return a valid result or some type of
error. If it's not valid, do something reasonable. All depends on your
application, we can't help you with that...

--
Dean Ramsier - eMVP
BSQUARE Corporation


"nihar" <niharrou@gmail.com> wrote in message
news:1176201125.825538.11750@e65g2000hsc.googlegroups.com...
>I need to do parameter range checking in and to check the return value
> of functions.I have not done it before.so please guide me.
>



Re: parameter range checking by nihar

nihar
Tue Apr 10 23:39:19 CDT 2007

On Apr 10, 6:13 pm, "Dean Ramsier" <ramsiernos...@nospam.com> wrote:
> What are you talking about? This question seems like programming 101. You
> read the input parameters and decide if they are in a valid range, do
> something reasonable if they are not. Same thing on checking return values
> of functions you call - see if they return a valid result or some type of
> error. If it's not valid, do something reasonable. All depends on your
> application, we can't help you with that...
>
> --
> Dean Ramsier - eMVP
> BSQUARE Corporation
>
> "nihar" <nihar...@gmail.com> wrote in message
>
> news:1176201125.825538.11750@e65g2000hsc.googlegroups.com...
>
>
>
> >I need to do parameter range checking in and to check the return value
> > of functions.I have not done it before.so please guide me.- Hide quoted text -
>
> - Show quoted text -

Thanks for your reply.in the stream interface driver we have the read
and write functions.but in some drivers read,write are also done by
the ioctl functions.so what is the advantage here of using ioctl
function.


Re: parameter range checking by SteffenK

SteffenK
Wed Apr 11 04:24:01 CDT 2007

Hi nihar,

what you are use is totally up to you :) If you do it using read and write,
then you can use ReadFile and WriteFile to interact, else you have to use
IOControl...

--
Viele Grü�e / Best regards
Steffen Kaufmann

www.garz-fricke.com



Re: parameter range checking by nihar

nihar
Wed Apr 11 05:52:06 CDT 2007

On Apr 11, 2:24 pm, Steffen.K <Steff...@discussions.microsoft.com>
wrote:
> Hi nihar,
>
> what you are use is totally up to you :) If you do it using read and writ=
e,
> then you can use ReadFile and WriteFile to interact, else you have to use
> IOControl...
>
> --
> Viele Gr=FC=DFe / Best regards
> Steffen Kaufmann
>
> www.garz-fricke.com

Thanks.so is it means in using read,write or using ioctl for
read,write dont have any difference in performance or any other aspect?


Re: parameter range checking by Dean

Dean
Wed Apr 11 09:06:14 CDT 2007

Read and Write have a defined interface that is intended for reading/writing
a stream of data. Often you will want to do something that doesn't reallly
fit what those APIs do. The IOCTL interface allows you to implement pretty
much anything you want. The majority of drivers use the ioctl interface
because they aren't just reading/writing a stream of data. Use whatever
works, there is no internal advantage either way.

--
Dean Ramsier - eMVP
BSQUARE Corporation


"nihar" <niharrou@gmail.com> wrote in message
news:1176288726.954306.304510@e65g2000hsc.googlegroups.com...
On Apr 11, 2:24 pm, Steffen.K <Steff...@discussions.microsoft.com>
wrote:
> Hi nihar,
>
> what you are use is totally up to you :) If you do it using read and
> write,
> then you can use ReadFile and WriteFile to interact, else you have to use
> IOControl...
>
> --
> Viele Grüße / Best regards
> Steffen Kaufmann
>
> www.garz-fricke.com

Thanks.so is it means in using read,write or using ioctl for
read,write dont have any difference in performance or any other aspect?



Re: parameter range checking by nihar

nihar
Mon Apr 23 05:25:55 CDT 2007

On Apr 11, 7:06 pm, "Dean Ramsier" <ramsiernos...@nospam.com> wrote:
> Read and Write have a defined interface that is intended for reading/writ=
ing
> a stream of data. Often you will want to do something that doesn't reall=
ly
> fit what those APIs do. The IOCTL interface allows you to implement pret=
ty
> much anything you want. The majority of drivers use the ioctl interface
> because they aren't just reading/writing a stream of data. Use whatever
> works, there is no internal advantage either way.
>
> --
> Dean Ramsier - eMVP
> BSQUARE Corporation
>
> "nihar" <nihar...@gmail.com> wrote in message
>
> news:1176288726.954306.304510@e65g2000hsc.googlegroups.com...
> On Apr 11, 2:24 pm, Steffen.K <Steff...@discussions.microsoft.com>
> wrote:
>
> > Hi nihar,
>
> > what you are use is totally up to you :) If you do it using read and
> > write,
> > then you can use ReadFile and WriteFile to interact, else you have to u=
se
> > IOControl...
>
> > --
> > Viele Gr=FC=DFe / Best regards
> > Steffen Kaufmann
>
> >www.garz-fricke.com
>
> Thanks.so is it means in using read,write or using ioctl for
> read,write dont have any difference in performance or any other aspect?

Hello,
What is strem interface driver wizard? and how to use. What is
the path to find it.