Hi:

Could you tell me in Wince500, which function should I use if I want to
write some debug information into a file?

Re: which function should I use if I want to write sth into a file? by Anthony

Anthony
Mon Jun 27 02:37:52 CDT 2005

Simply use createfile to create and open a file and then use writefile to
write it.
closehandle at the end will close the file

--
----------------------------------------------------------------
Anthony Pellerin
ADENEO (ADESET)
Windows Embedded Consultant
<apellerin AT adeneo DOT adetelgroup DOT com>
http://www.adeneo.adetelgroup.com
Tél : +33 (0)4.72.18.57.77
Fax : +33 (0)4.72.18.57.78
----------------------------------------------------------------


"xuhaoz" <xuhaoz@126.com> wrote in message
news:u8QwG$seFHA.3880@tk2msftngp13.phx.gbl...
> Hi:
>
> Could you tell me in Wince500, which function should I use if I want to
> write some debug information into a file?
>
>



Re: which function should I use if I want to write sth into a file? by xuhaoz

xuhaoz
Mon Jun 27 20:15:29 CDT 2005

Hi:


I'm sorry , I haven't express my question clearly, actually , I want to
write debug information into a file when I am debuging a driver. Please
again tell me how to do this , thank you.



"Anthony Pellerin" <apellerin_nospam@adeneo.adetelgroup.com> wrote in
message news:%23sxbisueFHA.1504@TK2MSFTNGP15.phx.gbl...
> Simply use createfile to create and open a file and then use writefile to
> write it.
> closehandle at the end will close the file
>
> --
> ----------------------------------------------------------------
> Anthony Pellerin
> ADENEO (ADESET)
> Windows Embedded Consultant
> <apellerin AT adeneo DOT adetelgroup DOT com>
> http://www.adeneo.adetelgroup.com
> Tél : +33 (0)4.72.18.57.77
> Fax : +33 (0)4.72.18.57.78
> ----------------------------------------------------------------
>
>
> "xuhaoz" <xuhaoz@126.com> wrote in message
> news:u8QwG$seFHA.3880@tk2msftngp13.phx.gbl...
> > Hi:
> >
> > Could you tell me in Wince500, which function should I use if I want to
> > write some debug information into a file?
> >
> >
>
>



Re: which function should I use if I want to write sth into a file? by Anthony

Anthony
Tue Jun 28 00:59:14 CDT 2005

So what's the problem? You're free to create in your driver init function,
write in it whatever you want, whenever you want and close the handle when
you want. Am I wrong?

--
----------------------------------------------------------------
Anthony Pellerin
ADENEO (ADESET)
Windows Embedded Consultant
<apellerin AT adeneo DOT adetelgroup DOT com>
http://www.adeneo.adetelgroup.com
Tél : +33 (0)4.72.18.57.77
Fax : +33 (0)4.72.18.57.78
----------------------------------------------------------------


"xuhaoz" <xuhaoz@126.com> wrote in message
news:ODuUv63eFHA.1404@TK2MSFTNGP09.phx.gbl...
> Hi:
>
>
> I'm sorry , I haven't express my question clearly, actually , I want to
> write debug information into a file when I am debuging a driver. Please
> again tell me how to do this , thank you.
>
>
>
> "Anthony Pellerin" <apellerin_nospam@adeneo.adetelgroup.com> wrote in
> message news:%23sxbisueFHA.1504@TK2MSFTNGP15.phx.gbl...
>> Simply use createfile to create and open a file and then use writefile to
>> write it.
>> closehandle at the end will close the file
>>
>> --
>> ----------------------------------------------------------------
>> Anthony Pellerin
>> ADENEO (ADESET)
>> Windows Embedded Consultant
>> <apellerin AT adeneo DOT adetelgroup DOT com>
>> http://www.adeneo.adetelgroup.com
>> Tél : +33 (0)4.72.18.57.77
>> Fax : +33 (0)4.72.18.57.78
>> ----------------------------------------------------------------
>>
>>
>> "xuhaoz" <xuhaoz@126.com> wrote in message
>> news:u8QwG$seFHA.3880@tk2msftngp13.phx.gbl...
>> > Hi:
>> >
>> > Could you tell me in Wince500, which function should I use if I want to
>> > write some debug information into a file?
>> >
>> >
>>
>>
>
>



Re: which function should I use if I want to write sth into a file? by xuhaoz

xuhaoz
Tue Jun 28 01:32:21 CDT 2005

O, you means at that time the FileSystem has been set up, so I can use
createfile to open a file , am I right ?


"Anthony Pellerin" <apellerin_nospam@adeneo.adetelgroup.com> wrote in
message news:ed0$Ea6eFHA.2736@TK2MSFTNGP12.phx.gbl...
> So what's the problem? You're free to create in your driver init function,
> write in it whatever you want, whenever you want and close the handle when
> you want. Am I wrong?
>
> --
> ----------------------------------------------------------------
> Anthony Pellerin
> ADENEO (ADESET)
> Windows Embedded Consultant
> <apellerin AT adeneo DOT adetelgroup DOT com>
> http://www.adeneo.adetelgroup.com
> Tél : +33 (0)4.72.18.57.77
> Fax : +33 (0)4.72.18.57.78
> ----------------------------------------------------------------
>
>
> "xuhaoz" <xuhaoz@126.com> wrote in message
> news:ODuUv63eFHA.1404@TK2MSFTNGP09.phx.gbl...
> > Hi:
> >
> >
> > I'm sorry , I haven't express my question clearly, actually , I want to
> > write debug information into a file when I am debuging a driver. Please
> > again tell me how to do this , thank you.
> >
> >
> >
> > "Anthony Pellerin" <apellerin_nospam@adeneo.adetelgroup.com> wrote in
> > message news:%23sxbisueFHA.1504@TK2MSFTNGP15.phx.gbl...
> >> Simply use createfile to create and open a file and then use writefile
to
> >> write it.
> >> closehandle at the end will close the file
> >>
> >> --
> >> ----------------------------------------------------------------
> >> Anthony Pellerin
> >> ADENEO (ADESET)
> >> Windows Embedded Consultant
> >> <apellerin AT adeneo DOT adetelgroup DOT com>
> >> http://www.adeneo.adetelgroup.com
> >> Tél : +33 (0)4.72.18.57.77
> >> Fax : +33 (0)4.72.18.57.78
> >> ----------------------------------------------------------------
> >>
> >>
> >> "xuhaoz" <xuhaoz@126.com> wrote in message
> >> news:u8QwG$seFHA.3880@tk2msftngp13.phx.gbl...
> >> > Hi:
> >> >
> >> > Could you tell me in Wince500, which function should I use if I want
to
> >> > write some debug information into a file?
> >> >
> >> >
> >>
> >>
> >
> >
>
>



Re: which function should I use if I want to write sth into a file? by Anthony

Anthony
Tue Jun 28 03:43:54 CDT 2005

Right

--
----------------------------------------------------------------
Anthony Pellerin
ADENEO (ADESET)
Windows Embedded Consultant
<apellerin AT adeneo DOT adetelgroup DOT com>
http://www.adeneo.adetelgroup.com
Tél : +33 (0)4.72.18.57.77
Fax : +33 (0)4.72.18.57.78
----------------------------------------------------------------


"xuhaoz" <xuhaoz@126.com> wrote in message
news:uZNlxr6eFHA.3880@tk2msftngp13.phx.gbl...
> O, you means at that time the FileSystem has been set up, so I can use
> createfile to open a file , am I right ?
>
>
> "Anthony Pellerin" <apellerin_nospam@adeneo.adetelgroup.com> wrote in
> message news:ed0$Ea6eFHA.2736@TK2MSFTNGP12.phx.gbl...
>> So what's the problem? You're free to create in your driver init
>> function,
>> write in it whatever you want, whenever you want and close the handle
>> when
>> you want. Am I wrong?
>>
>> --
>> ----------------------------------------------------------------
>> Anthony Pellerin
>> ADENEO (ADESET)
>> Windows Embedded Consultant
>> <apellerin AT adeneo DOT adetelgroup DOT com>
>> http://www.adeneo.adetelgroup.com
>> Tél : +33 (0)4.72.18.57.77
>> Fax : +33 (0)4.72.18.57.78
>> ----------------------------------------------------------------
>>
>>
>> "xuhaoz" <xuhaoz@126.com> wrote in message
>> news:ODuUv63eFHA.1404@TK2MSFTNGP09.phx.gbl...
>> > Hi:
>> >
>> >
>> > I'm sorry , I haven't express my question clearly, actually , I want to
>> > write debug information into a file when I am debuging a driver. Please
>> > again tell me how to do this , thank you.
>> >
>> >
>> >
>> > "Anthony Pellerin" <apellerin_nospam@adeneo.adetelgroup.com> wrote in
>> > message news:%23sxbisueFHA.1504@TK2MSFTNGP15.phx.gbl...
>> >> Simply use createfile to create and open a file and then use writefile
> to
>> >> write it.
>> >> closehandle at the end will close the file
>> >>
>> >> --
>> >> ----------------------------------------------------------------
>> >> Anthony Pellerin
>> >> ADENEO (ADESET)
>> >> Windows Embedded Consultant
>> >> <apellerin AT adeneo DOT adetelgroup DOT com>
>> >> http://www.adeneo.adetelgroup.com
>> >> Tél : +33 (0)4.72.18.57.77
>> >> Fax : +33 (0)4.72.18.57.78
>> >> ----------------------------------------------------------------
>> >>
>> >>
>> >> "xuhaoz" <xuhaoz@126.com> wrote in message
>> >> news:u8QwG$seFHA.3880@tk2msftngp13.phx.gbl...
>> >> > Hi:
>> >> >
>> >> > Could you tell me in Wince500, which function should I use if I want
> to
>> >> > write some debug information into a file?
>> >> >
>> >> >
>> >>
>> >>
>> >
>> >
>>
>>
>
>



Re: which function should I use if I want to write sth into a file? by xuhaoz

xuhaoz
Tue Jun 28 04:26:27 CDT 2005

Thank you very much.
:-)
"Anthony Pellerin" <apellerin_nospam@adeneo.adetelgroup.com> wrote in
message news:eu6WG27eFHA.3280@TK2MSFTNGP09.phx.gbl...
> Right
>
> --
> ----------------------------------------------------------------
> Anthony Pellerin
> ADENEO (ADESET)
> Windows Embedded Consultant
> <apellerin AT adeneo DOT adetelgroup DOT com>
> http://www.adeneo.adetelgroup.com
> Tél : +33 (0)4.72.18.57.77
> Fax : +33 (0)4.72.18.57.78
> ----------------------------------------------------------------
>
>
> "xuhaoz" <xuhaoz@126.com> wrote in message
> news:uZNlxr6eFHA.3880@tk2msftngp13.phx.gbl...
> > O, you means at that time the FileSystem has been set up, so I can use
> > createfile to open a file , am I right ?
> >
> >
> > "Anthony Pellerin" <apellerin_nospam@adeneo.adetelgroup.com> wrote in
> > message news:ed0$Ea6eFHA.2736@TK2MSFTNGP12.phx.gbl...
> >> So what's the problem? You're free to create in your driver init
> >> function,
> >> write in it whatever you want, whenever you want and close the handle
> >> when
> >> you want. Am I wrong?
> >>
> >> --
> >> ----------------------------------------------------------------
> >> Anthony Pellerin
> >> ADENEO (ADESET)
> >> Windows Embedded Consultant
> >> <apellerin AT adeneo DOT adetelgroup DOT com>
> >> http://www.adeneo.adetelgroup.com
> >> Tél : +33 (0)4.72.18.57.77
> >> Fax : +33 (0)4.72.18.57.78
> >> ----------------------------------------------------------------
> >>
> >>
> >> "xuhaoz" <xuhaoz@126.com> wrote in message
> >> news:ODuUv63eFHA.1404@TK2MSFTNGP09.phx.gbl...
> >> > Hi:
> >> >
> >> >
> >> > I'm sorry , I haven't express my question clearly, actually , I want
to
> >> > write debug information into a file when I am debuging a driver.
Please
> >> > again tell me how to do this , thank you.
> >> >
> >> >
> >> >
> >> > "Anthony Pellerin" <apellerin_nospam@adeneo.adetelgroup.com> wrote in
> >> > message news:%23sxbisueFHA.1504@TK2MSFTNGP15.phx.gbl...
> >> >> Simply use createfile to create and open a file and then use
writefile
> > to
> >> >> write it.
> >> >> closehandle at the end will close the file
> >> >>
> >> >> --
> >> >> ----------------------------------------------------------------
> >> >> Anthony Pellerin
> >> >> ADENEO (ADESET)
> >> >> Windows Embedded Consultant
> >> >> <apellerin AT adeneo DOT adetelgroup DOT com>
> >> >> http://www.adeneo.adetelgroup.com
> >> >> Tél : +33 (0)4.72.18.57.77
> >> >> Fax : +33 (0)4.72.18.57.78
> >> >> ----------------------------------------------------------------
> >> >>
> >> >>
> >> >> "xuhaoz" <xuhaoz@126.com> wrote in message
> >> >> news:u8QwG$seFHA.3880@tk2msftngp13.phx.gbl...
> >> >> > Hi:
> >> >> >
> >> >> > Could you tell me in Wince500, which function should I use if I
want
> > to
> >> >> > write some debug information into a file?
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>
> >
> >
>
>



Re: which function should I use if I want to write sth into a file? by Steve

Steve
Tue Jun 28 09:18:07 CDT 2005

Maybe maybe not. However you can guarantee that by creating a loader
application to load the driver while testing instead of relying on the
"built-in" key. If it's a removable card driver you can just insert the card
after the rest of the system has booted.

--
Steve Maillet
EmbeddedFusion
www.EmbeddedFusion.com
smaillet at EmbeddedFusion dot com



Re: which function should I use if I want to write sth into a file? by Zhongwei

Zhongwei
Tue Jun 28 09:46:10 CDT 2005

You can create the file in your driver init function, then write a function
to write the file and redefine RETAILMSG and DEBUGMSG so you can have all
debug messages of certain driver or only certain functions in your file.

#ifdef RETAILMSG
#undef RETAILMSG
#define RETAILMSG YourFunction
#endif

--
Zhongwei Wang
Applied Data Systems
www.applieddata.net
Application - Ready embedded systems
Microsoft Windows Embedded Partner
Gold Level Member



Re: which function should I use if I want to write sth into a file? by xuhaoz

xuhaoz
Tue Jun 28 19:54:57 CDT 2005

Hi, thank you all:

Yes, I can understand you .:-)
And actually I really need to insert the card , and write as
zhongweiwang and Anthony told me , that's can solve the problem I think.





"Steve Maillet (eMVP)" <nospam1@EntelechyConsulting.com> wrote in message
news:e$qs5w%23eFHA.256@TK2MSFTNGP14.phx.gbl...
> Maybe maybe not. However you can guarantee that by creating a loader
> application to load the driver while testing instead of relying on the
> "built-in" key. If it's a removable card driver you can just insert the
card
> after the rest of the system has booted.
>
> --
> Steve Maillet
> EmbeddedFusion
> www.EmbeddedFusion.com
> smaillet at EmbeddedFusion dot com
>
>



Re: which function should I use if I want to write sth into a file? by xuhaoz

xuhaoz
Tue Jun 28 21:46:25 CDT 2005

Hi:

I have another question to ask .

If I made a hardware with SD card interface, and it is not only a SD. Then
when I insert my hardware to PDA,

question is comming, how does PDA know which driver to load? How can I let
SD hostcontroller to load my driver instead of the SDMemory.dll?





"Steve Maillet (eMVP)" <nospam1@EntelechyConsulting.com> wrote in message
news:e$qs5w%23eFHA.256@TK2MSFTNGP14.phx.gbl...
> Maybe maybe not. However you can guarantee that by creating a loader
> application to load the driver while testing instead of relying on the
> "built-in" key. If it's a removable card driver you can just insert the
card
> after the rest of the system has booted.
>
> --
> Steve Maillet
> EmbeddedFusion
> www.EmbeddedFusion.com
> smaillet at EmbeddedFusion dot com
>
>



Re: which function should I use if I want to write sth into a file? by Anthony

Anthony
Wed Jun 29 02:05:55 CDT 2005

I think you should write your own driver (something like sdmemory.dll) and
set the registry so that your DLL is loaded by SD bus driver when your own
card is inserted (based on its ID).

This should be enough

--
----------------------------------------------------------------
Anthony Pellerin
ADENEO (ADESET)
Windows Embedded Consultant
<apellerin AT adeneo DOT adetelgroup DOT com>
http://www.adeneo.adetelgroup.com
Tél : +33 (0)4.72.18.57.77
Fax : +33 (0)4.72.18.57.78
----------------------------------------------------------------


"xuhaoz" <xuhaoz@126.com> wrote in message
news:OYctMSFfFHA.3936@TK2MSFTNGP14.phx.gbl...
> Hi:
>
> I have another question to ask .
>
> If I made a hardware with SD card interface, and it is not only a SD. Then
> when I insert my hardware to PDA,
>
> question is comming, how does PDA know which driver to load? How can I let
> SD hostcontroller to load my driver instead of the SDMemory.dll?
>
>
>
>
>
> "Steve Maillet (eMVP)" <nospam1@EntelechyConsulting.com> wrote in message
> news:e$qs5w%23eFHA.256@TK2MSFTNGP14.phx.gbl...
>> Maybe maybe not. However you can guarantee that by creating a loader
>> application to load the driver while testing instead of relying on the
>> "built-in" key. If it's a removable card driver you can just insert the
> card
>> after the rest of the system has booted.
>>
>> --
>> Steve Maillet
>> EmbeddedFusion
>> www.EmbeddedFusion.com
>> smaillet at EmbeddedFusion dot com
>>
>>
>
>



Re: which function should I use if I want to write sth into a file? by xuhaoz

xuhaoz
Wed Jun 29 04:08:15 CDT 2005

Hi:

Which ID? you means I should write register like this : ?

[HKEY_LOCAL_MACHINE\Drivers\SDCARD\ClientDrivers\Custom\MANF-<manufacturer
ID>-CARDID-<card ID>-FUNC-<function number>]




"Anthony Pellerin" <apellerin_nospam@adeneo.adetelgroup.com> wrote in
message news:OOMMBkHfFHA.3296@TK2MSFTNGP10.phx.gbl...
> I think you should write your own driver (something like sdmemory.dll) and
> set the registry so that your DLL is loaded by SD bus driver when your own
> card is inserted (based on its ID).
>
> This should be enough
>
> --
> ----------------------------------------------------------------
> Anthony Pellerin
> ADENEO (ADESET)
> Windows Embedded Consultant
> <apellerin AT adeneo DOT adetelgroup DOT com>
> http://www.adeneo.adetelgroup.com
> Tél : +33 (0)4.72.18.57.77
> Fax : +33 (0)4.72.18.57.78
> ----------------------------------------------------------------
>
>
> "xuhaoz" <xuhaoz@126.com> wrote in message
> news:OYctMSFfFHA.3936@TK2MSFTNGP14.phx.gbl...
> > Hi:
> >
> > I have another question to ask .
> >
> > If I made a hardware with SD card interface, and it is not only a SD.
Then
> > when I insert my hardware to PDA,
> >
> > question is comming, how does PDA know which driver to load? How can I
let
> > SD hostcontroller to load my driver instead of the SDMemory.dll?
> >
> >
> >
> >
> >
> > "Steve Maillet (eMVP)" <nospam1@EntelechyConsulting.com> wrote in
message
> > news:e$qs5w%23eFHA.256@TK2MSFTNGP14.phx.gbl...
> >> Maybe maybe not. However you can guarantee that by creating a loader
> >> application to load the driver while testing instead of relying on the
> >> "built-in" key. If it's a removable card driver you can just insert the
> > card
> >> after the rest of the system has booted.
> >>
> >> --
> >> Steve Maillet
> >> EmbeddedFusion
> >> www.EmbeddedFusion.com
> >> smaillet at EmbeddedFusion dot com
> >>
> >>
> >
> >
>
>



Re: which function should I use if I want to write sth into a file? by Anthony

Anthony
Wed Jun 29 04:49:28 CDT 2005

That's what I meant, but I've never tried it.

--
----------------------------------------------------------------
Anthony Pellerin
ADENEO (ADESET)
Windows Embedded Consultant
<apellerin AT adeneo DOT adetelgroup DOT com>
http://www.adeneo.adetelgroup.com
Tél : +33 (0)4.72.18.57.77
Fax : +33 (0)4.72.18.57.78
----------------------------------------------------------------


"xuhaoz" <xuhaoz@126.com> wrote in message
news:%23Jn$inIfFHA.3448@TK2MSFTNGP12.phx.gbl...
> Hi:
>
> Which ID? you means I should write register like this : ?
>
> [HKEY_LOCAL_MACHINE\Drivers\SDCARD\ClientDrivers\Custom\MANF-<manufacturer
> ID>-CARDID-<card ID>-FUNC-<function number>]
>
>
>
>
> "Anthony Pellerin" <apellerin_nospam@adeneo.adetelgroup.com> wrote in
> message news:OOMMBkHfFHA.3296@TK2MSFTNGP10.phx.gbl...
>> I think you should write your own driver (something like sdmemory.dll)
>> and
>> set the registry so that your DLL is loaded by SD bus driver when your
>> own
>> card is inserted (based on its ID).
>>
>> This should be enough
>>
>> --
>> ----------------------------------------------------------------
>> Anthony Pellerin
>> ADENEO (ADESET)
>> Windows Embedded Consultant
>> <apellerin AT adeneo DOT adetelgroup DOT com>
>> http://www.adeneo.adetelgroup.com
>> Tél : +33 (0)4.72.18.57.77
>> Fax : +33 (0)4.72.18.57.78
>> ----------------------------------------------------------------
>>
>>
>> "xuhaoz" <xuhaoz@126.com> wrote in message
>> news:OYctMSFfFHA.3936@TK2MSFTNGP14.phx.gbl...
>> > Hi:
>> >
>> > I have another question to ask .
>> >
>> > If I made a hardware with SD card interface, and it is not only a SD.
> Then
>> > when I insert my hardware to PDA,
>> >
>> > question is comming, how does PDA know which driver to load? How can I
> let
>> > SD hostcontroller to load my driver instead of the SDMemory.dll?
>> >
>> >
>> >
>> >
>> >
>> > "Steve Maillet (eMVP)" <nospam1@EntelechyConsulting.com> wrote in
> message
>> > news:e$qs5w%23eFHA.256@TK2MSFTNGP14.phx.gbl...
>> >> Maybe maybe not. However you can guarantee that by creating a loader
>> >> application to load the driver while testing instead of relying on the
>> >> "built-in" key. If it's a removable card driver you can just insert
>> >> the
>> > card
>> >> after the rest of the system has booted.
>> >>
>> >> --
>> >> Steve Maillet
>> >> EmbeddedFusion
>> >> www.EmbeddedFusion.com
>> >> smaillet at EmbeddedFusion dot com
>> >>
>> >>
>> >
>> >
>>
>>
>
>