CE 5.0: I followed the instructions to clone the touch screen
calibration CalibrUi, but my changes in the resources and changes to
the code are not making it into the build. I don't understand how the
clone gets the resources and the compiled code into the build instead
of the original copies, so I'm having trouble tracking down why it
doesn't work.

Can anyone suggest where to look?

Re: Problem cloning calibrui by Bruce

Bruce
Mon May 12 14:49:33 PDT 2008

Did you sysgen?

--
Bruce Eitman (eMVP)
Senior Engineer
Bruce.Eitman AT EuroTech DOT com

EuroTech Inc.
www.EuroTech.com

<jigger@hermanhouse.com> wrote in message
news:f3a1f840-420a-46f3-be12-f0e31fb943ed@j22g2000hsf.googlegroups.com...
> CE 5.0: I followed the instructions to clone the touch screen
> calibration CalibrUi, but my changes in the resources and changes to
> the code are not making it into the build. I don't understand how the
> clone gets the resources and the compiled code into the build instead
> of the original copies, so I'm having trouble tracking down why it
> doesn't work.
>
> Can anyone suggest where to look?



Re: Problem cloning calibrui by Paul

Paul
Mon May 12 14:56:14 PDT 2008

Are they getting built? Give us a pointer to the instructions you are
following, so we can take a look at them. My guess is that things are set
up so that the calibrui component, modified by you, is supposed to be built
and copied to the flat release folder after the public code sysgen is done,
effectively just doing a build and overwriting the output file. If your
code never gets built, because you didn't modify one of your DIRS files to
add the calibrui cloned component to the build list or something like that,
nothing will happen.

Paul T.

<jigger@hermanhouse.com> wrote in message
news:f3a1f840-420a-46f3-be12-f0e31fb943ed@j22g2000hsf.googlegroups.com...
> CE 5.0: I followed the instructions to clone the touch screen
> calibration CalibrUi, but my changes in the resources and changes to
> the code are not making it into the build. I don't understand how the
> clone gets the resources and the compiled code into the build instead
> of the original copies, so I'm having trouble tracking down why it
> doesn't work.
>
> Can anyone suggest where to look?




Re: Problem cloning calibrui by jigger

jigger
Mon May 12 15:28:16 PDT 2008

On May 12, 5:56=A0pm, "Paul G. Tobey [eMVP]" <p space tobey no spam AT
no instrument no spam DOT com> wrote:
> Are they getting built? =A0Give us a pointer to the instructions you are
> following, so we can take a look at them. =A0My guess is that things are s=
et
> up so that the calibrui component, modified by you, is supposed to be buil=
t
> and copied to the flat release folder after the public code sysgen is done=
,
> effectively just doing a build and overwriting the output file. =A0If your=

> code never gets built, because you didn't modify one of your DIRS files to=

> add the calibrui cloned component to the build list or something like that=
,
> nothing will happen.
>
> Paul T.
>

The instructions are labeled "How to Replace the Calibrui Module" in
Plaftorm Builder help. In the instructions it sounds like calibrui.obj
gets built into gews.exe, but I don't get how that works. When I do
step 5 (check gwes to see if the resources are changed), my changes to
resources do not show up in gwes. However, I can see that the
resources are getting compiled into a RES file in the CalibRui project
folder.

Re: Problem cloning calibrui by Paul

Paul
Mon May 12 15:42:28 PDT 2008

Yes, it's building a different version of the library which GWES will link
with during sysgen. I don't like doing it that way, since it causes the
public version of the library to be 'damaged', in favor of your version, but
MS often assumes that you're only targeting one sort of device and that, if
you screw up those PUBLIC libraries, you won't care.

There are a couple of alternatives:

1. Keep doing what you're doing (why are you doing this, by the way? What's
wrong with the default calibration stuff?). In that case, to debug why
you're not getting the right thing, you need to be sure that your clone is
getting built, that the output files, resource and object, are getting put
in the right places in PUBLIC, and that you've done a Sysgen to actually
build GWES.EXE.

2. Change the cloned build configuration (set RELEASETYPE to platform in the
SOURCES file), to build a platform (or project), version of the calibrui
component, and build GWES.EXE yourself, overwriting the one generated by
Sysgen. This allows you to avoid messing with the Microsoft-provided PUBLIC
libraries, at the cost of having to have another element of the build, one
that builds GWES.EXE. If you decide to go this way, you'd need to use
sysgen_capture to capture the make instructions for GWES (check the help for
the sysgen_capture command line. I think you need something like
'sysgen_capture -p common gwes', executed from a new folder in your platform
build structure. This will give you a sources.x file or two, one of which
you'll rename to SOURCES, and modify to use your own CALIBRUI library,
rather than the PUBLIC one.

Paul T.

<jigger@hermanhouse.com> wrote in message
news:3ee55585-4dfe-4ced-befc-b493b60b4679@y38g2000hsy.googlegroups.com...
On May 12, 5:56 pm, "Paul G. Tobey [eMVP]" <p space tobey no spam AT
no instrument no spam DOT com> wrote:
> Are they getting built? Give us a pointer to the instructions you are
> following, so we can take a look at them. My guess is that things are set
> up so that the calibrui component, modified by you, is supposed to be
> built
> and copied to the flat release folder after the public code sysgen is
> done,
> effectively just doing a build and overwriting the output file. If your
> code never gets built, because you didn't modify one of your DIRS files to
> add the calibrui cloned component to the build list or something like
> that,
> nothing will happen.
>
> Paul T.
>

The instructions are labeled "How to Replace the Calibrui Module" in
Plaftorm Builder help. In the instructions it sounds like calibrui.obj
gets built into gews.exe, but I don't get how that works. When I do
step 5 (check gwes to see if the resources are changed), my changes to
resources do not show up in gwes. However, I can see that the
resources are getting compiled into a RES file in the CalibRui project
folder.



Re: Problem cloning calibrui by Steve

Steve
Mon May 12 17:39:22 PDT 2008

I once wrote an article on how to clone that one on a per platform basis...
I'll dig around my old files and see if I can find it. (It used to be stored
on the EmbeddedFusion site, but that's gone now and I'm not sure if I have
the original anywhere...)

"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:#UK$zFItIHA.3604@TK2MSFTNGP03.phx.gbl...
> Yes, it's building a different version of the library which GWES will link
> with during sysgen. I don't like doing it that way, since it causes the
> public version of the library to be 'damaged', in favor of your version,
> but MS often assumes that you're only targeting one sort of device and
> that, if you screw up those PUBLIC libraries, you won't care.
>
> There are a couple of alternatives:
>
> 1. Keep doing what you're doing (why are you doing this, by the way?
> What's wrong with the default calibration stuff?). In that case, to debug
> why you're not getting the right thing, you need to be sure that your
> clone is getting built, that the output files, resource and object, are
> getting put in the right places in PUBLIC, and that you've done a Sysgen
> to actually build GWES.EXE.
>
> 2. Change the cloned build configuration (set RELEASETYPE to platform in
> the SOURCES file), to build a platform (or project), version of the
> calibrui component, and build GWES.EXE yourself, overwriting the one
> generated by Sysgen. This allows you to avoid messing with the
> Microsoft-provided PUBLIC libraries, at the cost of having to have another
> element of the build, one that builds GWES.EXE. If you decide to go this
> way, you'd need to use sysgen_capture to capture the make instructions for
> GWES (check the help for the sysgen_capture command line. I think you
> need something like 'sysgen_capture -p common gwes', executed from a new
> folder in your platform build structure. This will give you a sources.x
> file or two, one of which you'll rename to SOURCES, and modify to use your
> own CALIBRUI library, rather than the PUBLIC one.
>
> Paul T.
>
> <jigger@hermanhouse.com> wrote in message
> news:3ee55585-4dfe-4ced-befc-b493b60b4679@y38g2000hsy.googlegroups.com...
> On May 12, 5:56 pm, "Paul G. Tobey [eMVP]" <p space tobey no spam AT
> no instrument no spam DOT com> wrote:
>> Are they getting built? Give us a pointer to the instructions you are
>> following, so we can take a look at them. My guess is that things are set
>> up so that the calibrui component, modified by you, is supposed to be
>> built
>> and copied to the flat release folder after the public code sysgen is
>> done,
>> effectively just doing a build and overwriting the output file. If your
>> code never gets built, because you didn't modify one of your DIRS files
>> to
>> add the calibrui cloned component to the build list or something like
>> that,
>> nothing will happen.
>>
>> Paul T.
>>
>
> The instructions are labeled "How to Replace the Calibrui Module" in
> Plaftorm Builder help. In the instructions it sounds like calibrui.obj
> gets built into gews.exe, but I don't get how that works. When I do
> step 5 (check gwes to see if the resources are changed), my changes to
> resources do not show up in gwes. However, I can see that the
> resources are getting compiled into a RES file in the CalibRui project
> folder.
>

Re: Problem cloning calibrui by jigger

jigger
Mon May 12 21:05:03 PDT 2008

> (why are you doing this, by the way? =A0What's wrong with the default cali=
bration stuff?).

Thanks for the response - and darn good question. Long story, but: I'm
playing around with a Compulab CM-X255 (PXA255 based COM). I am using
a hive based registry stored on the Compulab Hynix NAND flash drive.
After only about 100,000 registry writes the NAND flash is getting
corrupted and so the registry gets trashed. The Compulab flash driver
is supposed to have an anti-wear feature, so that the 100,000 writes
in theory should be a drop in the bucket: there is 128M of NAND and
the registry is tiny by comparison.

So, I'm trying a switch to RAM based registry and want a way to
"manually" load the touch screen calibration once windows has booted
and our application level program is running. I'll store the correct
calibration in a file on the NAND, but that should only get written to
once during initial calibration: the rest of the time it will just
read the NAND adn hopefully avoid the problem.

The hook into CalibrUi is to copy the new calibration values from the
registry to NAND during setup.

Thanks again - let me know if you have any good ideas.

Re: Problem cloning calibrui by Michel

Michel
Tue May 13 00:37:17 PDT 2008

Ah, if you want to do that cloning Calibrui is not going to help you
because the calibration data is loaded far before the CalibrUI is loaded
(IIRC). I solved this problem some time ago and a quick peek through my
sources shows that I created a thread in my touch PDD that waits for a
named event (name defined in registry
HKLM\HARDWARE\DEVICEMAP\TOUCH:"SettingsEvent"). At boot I start a
program (from the HKML\Init key) that loads a file with calib data from
the CF. It then writes those values to the registry and set's the event.
The touch driver than reloads the new values from the registry. If
there's no file with calib data on the CF, it invokes the calibrui by
calling TouchCalibrate();


Good luck,

Michel Verhagen, eMVP
Check out my blog: http://GuruCE.com/blog

GuruCE Ltd.
Microsoft Embedded Partner
http://GuruCE.com
Consultancy, training and development services.

jigger@hermanhouse.com wrote:
>> (why are you doing this, by the way? What's wrong with the default calibration stuff?).
>
> Thanks for the response - and darn good question. Long story, but: I'm
> playing around with a Compulab CM-X255 (PXA255 based COM). I am using
> a hive based registry stored on the Compulab Hynix NAND flash drive.
> After only about 100,000 registry writes the NAND flash is getting
> corrupted and so the registry gets trashed. The Compulab flash driver
> is supposed to have an anti-wear feature, so that the 100,000 writes
> in theory should be a drop in the bucket: there is 128M of NAND and
> the registry is tiny by comparison.
>
> So, I'm trying a switch to RAM based registry and want a way to
> "manually" load the touch screen calibration once windows has booted
> and our application level program is running. I'll store the correct
> calibration in a file on the NAND, but that should only get written to
> once during initial calibration: the rest of the time it will just
> read the NAND adn hopefully avoid the problem.
>
> The hook into CalibrUi is to copy the new calibration values from the
> registry to NAND during setup.
>
> Thanks again - let me know if you have any good ideas.

Re: Problem cloning calibrui by Bruce

Bruce
Tue May 13 05:32:44 PDT 2008

IIRC calibrui isn't all that useful for saving the data either. The exposed
code all runs prior to saving the data to the registry.

--
Bruce Eitman (eMVP)
Senior Engineer
Bruce.Eitman AT EuroTech DOT com

EuroTech Inc.
www.EuroTech.com

"Michel Verhagen (eMVP)" <michel@nospam.box> wrote in message
news:enqTtwMtIHA.1240@TK2MSFTNGP02.phx.gbl...
> Ah, if you want to do that cloning Calibrui is not going to help you
> because the calibration data is loaded far before the CalibrUI is loaded
> (IIRC). I solved this problem some time ago and a quick peek through my
> sources shows that I created a thread in my touch PDD that waits for a
> named event (name defined in registry
> HKLM\HARDWARE\DEVICEMAP\TOUCH:"SettingsEvent"). At boot I start a program
> (from the HKML\Init key) that loads a file with calib data from the CF. It
> then writes those values to the registry and set's the event. The touch
> driver than reloads the new values from the registry. If there's no file
> with calib data on the CF, it invokes the calibrui by calling
> TouchCalibrate();
>
>
> Good luck,
>
> Michel Verhagen, eMVP
> Check out my blog: http://GuruCE.com/blog
>
> GuruCE Ltd.
> Microsoft Embedded Partner
> http://GuruCE.com
> Consultancy, training and development services.
>
> jigger@hermanhouse.com wrote:
>>> (why are you doing this, by the way? What's wrong with the default
>>> calibration stuff?).
>>
>> Thanks for the response - and darn good question. Long story, but: I'm
>> playing around with a Compulab CM-X255 (PXA255 based COM). I am using
>> a hive based registry stored on the Compulab Hynix NAND flash drive.
>> After only about 100,000 registry writes the NAND flash is getting
>> corrupted and so the registry gets trashed. The Compulab flash driver
>> is supposed to have an anti-wear feature, so that the 100,000 writes
>> in theory should be a drop in the bucket: there is 128M of NAND and
>> the registry is tiny by comparison.
>>
>> So, I'm trying a switch to RAM based registry and want a way to
>> "manually" load the touch screen calibration once windows has booted
>> and our application level program is running. I'll store the correct
>> calibration in a file on the NAND, but that should only get written to
>> once during initial calibration: the rest of the time it will just
>> read the NAND adn hopefully avoid the problem.
>>
>> The hook into CalibrUi is to copy the new calibration values from the
>> registry to NAND during setup.
>>
>> Thanks again - let me know if you have any good ideas.



Re: Problem cloning calibrui by Rob

Rob
Tue May 13 08:01:01 PDT 2008

Hi,
I did the same recently.

First part : Calling Calibration & save it somewhere.
Create a simple exe user-project and add the following (this will create a
custom calibration app, behaving exactly the same as the one you are used to)
Somewhere in the top of the file the prototype goes :

// "secret",hidden API for CE ;-) :
BOOL WINAPI TouchCalibrate(void);

// the code starting the Calibration:

//*************************************************
HMODULE hCoreDLL = LoadLibrary(_T("coredll.dll"));
if (NULL==hCoreDLL)
{
RETAILMSG(1,(TEXT("Cannot load coredll !\r\n")));
return 0;
}
PTouchCalibrate pTouchCalibrate = (PTouchCalibrate)GetProcAddress(hCoreDLL,
_T("TouchCalibrate"));
if (pTouchCalibrate)
{
RETAILMSG(1,(TEXT("Start Calibration !\r\n")));
pTouchCalibrate();
}
else
{
RETAILMSG(1,(TEXT("Calibration not found in CoreDLL.dll!\r\n")));
return 0;
}
//*************************************************

After pTouchCalibrate() succeeds you can save the data that will be in
HKLM\\HARDWARE\\DEVICEMAP\\TOUCH to whereever you want (file?).


2nd Part : restoring the saved calibration data at boot.
Look for DdsiTouchPanelAttach() , and read the data from your file, and
place it back in registry.
(clone the driver, i made a PB-userproject of it, deliverring a DLL directly)

Thats it....
Gathered this info mostly from this newsgroup....
Hope it helps, it worked for me.

Greetings,
Rob.


















"jigger@hermanhouse.com" wrote:

> > (why are you doing this, by the way? What's wrong with the default calibration stuff?).
>
> Thanks for the response - and darn good question. Long story, but: I'm
> playing around with a Compulab CM-X255 (PXA255 based COM). I am using
> a hive based registry stored on the Compulab Hynix NAND flash drive.
> After only about 100,000 registry writes the NAND flash is getting
> corrupted and so the registry gets trashed. The Compulab flash driver
> is supposed to have an anti-wear feature, so that the 100,000 writes
> in theory should be a drop in the bucket: there is 128M of NAND and
> the registry is tiny by comparison.
>
> So, I'm trying a switch to RAM based registry and want a way to
> "manually" load the touch screen calibration once windows has booted
> and our application level program is running. I'll store the correct
> calibration in a file on the NAND, but that should only get written to
> once during initial calibration: the rest of the time it will just
> read the NAND adn hopefully avoid the problem.
>
> The hook into CalibrUi is to copy the new calibration values from the
> registry to NAND during setup.
>
> Thanks again - let me know if you have any good ideas.
>

Re: Problem cloning calibrui by Bruce

Bruce
Tue May 13 08:10:07 PDT 2008

That works until the user uses the control panel to calibrate.

--
Bruce Eitman (eMVP)
Senior Engineer
Bruce.Eitman AT EuroTech DOT com

EuroTech Inc.
www.EuroTech.com

"Rob" <Rob@discussions.microsoft.com> wrote in message
news:9376971A-94AD-4544-B57F-5FFBD0C76F8B@microsoft.com...
> Hi,
> I did the same recently.
>
> First part : Calling Calibration & save it somewhere.
> Create a simple exe user-project and add the following (this will create a
> custom calibration app, behaving exactly the same as the one you are used
> to)
> Somewhere in the top of the file the prototype goes :
>
> // "secret",hidden API for CE ;-) :
> BOOL WINAPI TouchCalibrate(void);
>
> // the code starting the Calibration:
>
> //*************************************************
> HMODULE hCoreDLL = LoadLibrary(_T("coredll.dll"));
> if (NULL==hCoreDLL)
> {
> RETAILMSG(1,(TEXT("Cannot load coredll !\r\n")));
> return 0;
> }
> PTouchCalibrate pTouchCalibrate =
> (PTouchCalibrate)GetProcAddress(hCoreDLL,
> _T("TouchCalibrate"));
> if (pTouchCalibrate)
> {
> RETAILMSG(1,(TEXT("Start Calibration !\r\n")));
> pTouchCalibrate();
> }
> else
> {
> RETAILMSG(1,(TEXT("Calibration not found in CoreDLL.dll!\r\n")));
> return 0;
> }
> //*************************************************
>
> After pTouchCalibrate() succeeds you can save the data that will be in
> HKLM\\HARDWARE\\DEVICEMAP\\TOUCH to whereever you want (file?).
>
>
> 2nd Part : restoring the saved calibration data at boot.
> Look for DdsiTouchPanelAttach() , and read the data from your file, and
> place it back in registry.
> (clone the driver, i made a PB-userproject of it, deliverring a DLL
> directly)
>
> Thats it....
> Gathered this info mostly from this newsgroup....
> Hope it helps, it worked for me.
>
> Greetings,
> Rob.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> "jigger@hermanhouse.com" wrote:
>
>> > (why are you doing this, by the way? What's wrong with the default
>> > calibration stuff?).
>>
>> Thanks for the response - and darn good question. Long story, but: I'm
>> playing around with a Compulab CM-X255 (PXA255 based COM). I am using
>> a hive based registry stored on the Compulab Hynix NAND flash drive.
>> After only about 100,000 registry writes the NAND flash is getting
>> corrupted and so the registry gets trashed. The Compulab flash driver
>> is supposed to have an anti-wear feature, so that the 100,000 writes
>> in theory should be a drop in the bucket: there is 128M of NAND and
>> the registry is tiny by comparison.
>>
>> So, I'm trying a switch to RAM based registry and want a way to
>> "manually" load the touch screen calibration once windows has booted
>> and our application level program is running. I'll store the correct
>> calibration in a file on the NAND, but that should only get written to
>> once during initial calibration: the rest of the time it will just
>> read the NAND adn hopefully avoid the problem.
>>
>> The hook into CalibrUi is to copy the new calibration values from the
>> registry to NAND during setup.
>>
>> Thanks again - let me know if you have any good ideas.
>>



Re: Problem cloning calibrui by Chris

Chris
Tue May 13 08:13:33 PDT 2008

Yes, IIRC we cloned calibrui and modified it to set an event when it had a
successful calibration, and elsewhere in the system was a thread waiting on
that event (can't recall where it lived) which in turn flushed the registry
to persist the new settings.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com


"Bruce Eitman [eMVP]" <bruce.eitman.nospam@EuroTech.com.nospam> wrote in
message news:uQi3yVPtIHA.1768@TK2MSFTNGP03.phx.gbl...
> IIRC calibrui isn't all that useful for saving the data either. The
> exposed code all runs prior to saving the data to the registry.
>
> --
> Bruce Eitman (eMVP)
> Senior Engineer
> Bruce.Eitman AT EuroTech DOT com
>
> EuroTech Inc.
> www.EuroTech.com
>
> "Michel Verhagen (eMVP)" <michel@nospam.box> wrote in message
> news:enqTtwMtIHA.1240@TK2MSFTNGP02.phx.gbl...
>> Ah, if you want to do that cloning Calibrui is not going to help you
>> because the calibration data is loaded far before the CalibrUI is loaded
>> (IIRC). I solved this problem some time ago and a quick peek through my
>> sources shows that I created a thread in my touch PDD that waits for a
>> named event (name defined in registry
>> HKLM\HARDWARE\DEVICEMAP\TOUCH:"SettingsEvent"). At boot I start a program
>> (from the HKML\Init key) that loads a file with calib data from the CF.
>> It then writes those values to the registry and set's the event. The
>> touch driver than reloads the new values from the registry. If there's no
>> file with calib data on the CF, it invokes the calibrui by calling
>> TouchCalibrate();
>>
>>
>> Good luck,
>>
>> Michel Verhagen, eMVP
>> Check out my blog: http://GuruCE.com/blog
>>
>> GuruCE Ltd.
>> Microsoft Embedded Partner
>> http://GuruCE.com
>> Consultancy, training and development services.
>>
>> jigger@hermanhouse.com wrote:
>>>> (why are you doing this, by the way? What's wrong with the default
>>>> calibration stuff?).
>>>
>>> Thanks for the response - and darn good question. Long story, but: I'm
>>> playing around with a Compulab CM-X255 (PXA255 based COM). I am using
>>> a hive based registry stored on the Compulab Hynix NAND flash drive.
>>> After only about 100,000 registry writes the NAND flash is getting
>>> corrupted and so the registry gets trashed. The Compulab flash driver
>>> is supposed to have an anti-wear feature, so that the 100,000 writes
>>> in theory should be a drop in the bucket: there is 128M of NAND and
>>> the registry is tiny by comparison.
>>>
>>> So, I'm trying a switch to RAM based registry and want a way to
>>> "manually" load the touch screen calibration once windows has booted
>>> and our application level program is running. I'll store the correct
>>> calibration in a file on the NAND, but that should only get written to
>>> once during initial calibration: the rest of the time it will just
>>> read the NAND adn hopefully avoid the problem.
>>>
>>> The hook into CalibrUi is to copy the new calibration values from the
>>> registry to NAND during setup.
>>>
>>> Thanks again - let me know if you have any good ideas.
>
>



Re: Problem cloning calibrui by Rob

Rob
Tue May 13 08:21:01 PDT 2008

What control panel ? ;-)
The original exe will be removed ofcourse, there can be only 1.....

Greetings,
Rob.





"Bruce Eitman [eMVP]" wrote:

> That works until the user uses the control panel to calibrate.
>
> --
> Bruce Eitman (eMVP)
> Senior Engineer
> Bruce.Eitman AT EuroTech DOT com
>
> EuroTech Inc.
> www.EuroTech.com
>
> "Rob" <Rob@discussions.microsoft.com> wrote in message
> news:9376971A-94AD-4544-B57F-5FFBD0C76F8B@microsoft.com...
> > Hi,
> > I did the same recently.
> >
> > First part : Calling Calibration & save it somewhere.
> > Create a simple exe user-project and add the following (this will create a
> > custom calibration app, behaving exactly the same as the one you are used
> > to)
> > Somewhere in the top of the file the prototype goes :
> >
> > // "secret",hidden API for CE ;-) :
> > BOOL WINAPI TouchCalibrate(void);
> >
> > // the code starting the Calibration:
> >
> > //*************************************************
> > HMODULE hCoreDLL = LoadLibrary(_T("coredll.dll"));
> > if (NULL==hCoreDLL)
> > {
> > RETAILMSG(1,(TEXT("Cannot load coredll !\r\n")));
> > return 0;
> > }
> > PTouchCalibrate pTouchCalibrate =
> > (PTouchCalibrate)GetProcAddress(hCoreDLL,
> > _T("TouchCalibrate"));
> > if (pTouchCalibrate)
> > {
> > RETAILMSG(1,(TEXT("Start Calibration !\r\n")));
> > pTouchCalibrate();
> > }
> > else
> > {
> > RETAILMSG(1,(TEXT("Calibration not found in CoreDLL.dll!\r\n")));
> > return 0;
> > }
> > //*************************************************
> >
> > After pTouchCalibrate() succeeds you can save the data that will be in
> > HKLM\\HARDWARE\\DEVICEMAP\\TOUCH to whereever you want (file?).
> >
> >
> > 2nd Part : restoring the saved calibration data at boot.
> > Look for DdsiTouchPanelAttach() , and read the data from your file, and
> > place it back in registry.
> > (clone the driver, i made a PB-userproject of it, deliverring a DLL
> > directly)
> >
> > Thats it....
> > Gathered this info mostly from this newsgroup....
> > Hope it helps, it worked for me.
> >
> > Greetings,
> > Rob.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > "jigger@hermanhouse.com" wrote:
> >
> >> > (why are you doing this, by the way? What's wrong with the default
> >> > calibration stuff?).
> >>
> >> Thanks for the response - and darn good question. Long story, but: I'm
> >> playing around with a Compulab CM-X255 (PXA255 based COM). I am using
> >> a hive based registry stored on the Compulab Hynix NAND flash drive.
> >> After only about 100,000 registry writes the NAND flash is getting
> >> corrupted and so the registry gets trashed. The Compulab flash driver
> >> is supposed to have an anti-wear feature, so that the 100,000 writes
> >> in theory should be a drop in the bucket: there is 128M of NAND and
> >> the registry is tiny by comparison.
> >>
> >> So, I'm trying a switch to RAM based registry and want a way to
> >> "manually" load the touch screen calibration once windows has booted
> >> and our application level program is running. I'll store the correct
> >> calibration in a file on the NAND, but that should only get written to
> >> once during initial calibration: the rest of the time it will just
> >> read the NAND adn hopefully avoid the problem.
> >>
> >> The hook into CalibrUi is to copy the new calibration values from the
> >> registry to NAND during setup.
> >>
> >> Thanks again - let me know if you have any good ideas.
> >>
>
>
>

Re: Problem cloning calibrui by Bruce

Bruce
Tue May 13 08:33:17 PDT 2008

You recall correctly. Of course what you missed was that it didn't work
very well. This is becuase that event fires before the data is saved. We
did jump through some hoops to get that thread to deal with it better
though, before getting rid of the calibrui clone and just setting the event
just before returning the last data from the touch driver.

--
Bruce Eitman (eMVP)
Senior Engineer
Bruce.Eitman AT EuroTech DOT com

EuroTech Inc.
www.EuroTech.com

"Chris Tacke, eMVP" <ctacke.at.opennetcf.dot.com> wrote in message
news:%23u27mvQtIHA.4716@TK2MSFTNGP06.phx.gbl...
> Yes, IIRC we cloned calibrui and modified it to set an event when it had a
> successful calibration, and elsewhere in the system was a thread waiting
> on that event (can't recall where it lived) which in turn flushed the
> registry to persist the new settings.
>
>
> --
>
> Chris Tacke, Embedded MVP
> OpenNETCF Consulting
> Giving back to the embedded community
> http://community.OpenNETCF.com
>
>
> "Bruce Eitman [eMVP]" <bruce.eitman.nospam@EuroTech.com.nospam> wrote in
> message news:uQi3yVPtIHA.1768@TK2MSFTNGP03.phx.gbl...
>> IIRC calibrui isn't all that useful for saving the data either. The
>> exposed code all runs prior to saving the data to the registry.
>>
>> --
>> Bruce Eitman (eMVP)
>> Senior Engineer
>> Bruce.Eitman AT EuroTech DOT com
>>
>> EuroTech Inc.
>> www.EuroTech.com
>>
>> "Michel Verhagen (eMVP)" <michel@nospam.box> wrote in message
>> news:enqTtwMtIHA.1240@TK2MSFTNGP02.phx.gbl...
>>> Ah, if you want to do that cloning Calibrui is not going to help you
>>> because the calibration data is loaded far before the CalibrUI is loaded
>>> (IIRC). I solved this problem some time ago and a quick peek through my
>>> sources shows that I created a thread in my touch PDD that waits for a
>>> named event (name defined in registry
>>> HKLM\HARDWARE\DEVICEMAP\TOUCH:"SettingsEvent"). At boot I start a
>>> program (from the HKML\Init key) that loads a file with calib data from
>>> the CF. It then writes those values to the registry and set's the event.
>>> The touch driver than reloads the new values from the registry. If
>>> there's no file with calib data on the CF, it invokes the calibrui by
>>> calling TouchCalibrate();
>>>
>>>
>>> Good luck,
>>>
>>> Michel Verhagen, eMVP
>>> Check out my blog: http://GuruCE.com/blog
>>>
>>> GuruCE Ltd.
>>> Microsoft Embedded Partner
>>> http://GuruCE.com
>>> Consultancy, training and development services.
>>>
>>> jigger@hermanhouse.com wrote:
>>>>> (why are you doing this, by the way? What's wrong with the default
>>>>> calibration stuff?).
>>>>
>>>> Thanks for the response - and darn good question. Long story, but: I'm
>>>> playing around with a Compulab CM-X255 (PXA255 based COM). I am using
>>>> a hive based registry stored on the Compulab Hynix NAND flash drive.
>>>> After only about 100,000 registry writes the NAND flash is getting
>>>> corrupted and so the registry gets trashed. The Compulab flash driver
>>>> is supposed to have an anti-wear feature, so that the 100,000 writes
>>>> in theory should be a drop in the bucket: there is 128M of NAND and
>>>> the registry is tiny by comparison.
>>>>
>>>> So, I'm trying a switch to RAM based registry and want a way to
>>>> "manually" load the touch screen calibration once windows has booted
>>>> and our application level program is running. I'll store the correct
>>>> calibration in a file on the NAND, but that should only get written to
>>>> once during initial calibration: the rest of the time it will just
>>>> read the NAND adn hopefully avoid the problem.
>>>>
>>>> The hook into CalibrUi is to copy the new calibration values from the
>>>> registry to NAND during setup.
>>>>
>>>> Thanks again - let me know if you have any good ideas.
>>
>>
>
>