Ariane Soft PPL2 Pocket Programming DataMite

Go Back   ArianeSoft Forums > PPL - Pocket Programming Language > Support

Reply
 
Thread Tools Search this Thread Display Modes
  #11  
Old 07-01-2010, 08:03 AM
sdkfz250 sdkfz250 is offline
Member
 
Join Date: Jul 2009
Posts: 36
Default

Jupp,

Thanks so much for your help.

I changed registry.ppl accordingly. The first change you proposed was already in there. The second change not.

However, when I start compiled RegestryTest on my HTC I still get no last number displayed.

The only positive result is that the program does no longer freeze my device.

Maybe someone else has an idea.

Best regards

Michael

Last edited by sdkfz250; 07-01-2010 at 10:06 AM.
Reply With Quote
  #12  
Old 07-01-2010, 05:09 PM
juppmaifeld juppmaifeld is offline
Member
 
Join Date: Aug 2009
Posts: 43
Default

Hi Michael,

this code should solve your problem:

#include "console.ppl"
#include "registry.ppl"

func WinMain
InitConsole;
ShowConsole;

Writeln("");
Writeln("Open an read HKEY_LOCAL_MACHINE, \\SYSTEM ...");
Writeln("");


k$ = Reg_OpenKey(HKEY_LOCAL_MACHINE, "\\System\\State");

Reg_GetKeys(k$, &Keys$);
ForEach (Keys$)
Writeln(Keys$);
end;
Reg_CloseKey(k$);

Writeln("");
Writeln("");

k$ = Reg_OpenKey(HKEY_LOCAL_MACHINE, "\\System\\State\\Phone");

Reg_GetValues(k$, &Value$);

ForEach (Value$)
writeln(Value$ + ": " + Reg_GetKeyValue(k$, Value$, FALSE));
end;

Reg_CloseKey(k$);

return (true);
end;

It did work on my IPAQ under WinMobile 5.0


Jupp
Reply With Quote
  #13  
Old 07-05-2010, 08:28 AM
sdkfz250 sdkfz250 is offline
Member
 
Join Date: Jul 2009
Posts: 36
Default

Jupp,

your code worked perfectly on my device.

Thank you very much for your help.

Cheers

Michael
Reply With Quote
  #14  
Old 07-05-2010, 01:46 PM
sdkfz250 sdkfz250 is offline
Member
 
Join Date: Jul 2009
Posts: 36
Default

Sorry Jupp,

one small remaining question/problem.

When I run the program the output of "Last Incoming Caller Number" is converted from +49177333... into 3407915.

Do you know how I can get the right string format?

Thanks in advance.

Michael
Reply With Quote
  #15  
Old 07-06-2010, 06:12 AM
c4esar c4esar is offline
Member
 
Join Date: Mar 2009
Location: Germany
Posts: 41
Default

Hi sdk!

[Edit]
The problem might be that in
Reg_GetKeyValue(k$, Value$, FALSE));
the FALSE means you're not expecting to receive a String value.
I suppose the CallerID might be a String.
So please try it with TRUE instead of FALSE.
[/Edit]

I'd like to ask which version of PPL you are using for this project.
Because the registry-functions didn't work out with 1.62 for me, only with 1.53pro.
I already reported this as a bug with mantis, but if it works for you I'll have to take that back.
My problem with 1.62 has been that the only HKEY I could use was HKEY_CLASSES_ROOT (I had a little project that read out the whole registry and wrote it into a tiny sqlite-db).
Wonder what I've been doing wrong....

c4esar

Last edited by c4esar; 07-06-2010 at 06:53 AM.
Reply With Quote
  #16  
Old 07-06-2010, 06:43 AM
sdkfz250 sdkfz250 is offline
Member
 
Join Date: Jul 2009
Posts: 36
Default

Hi C4esar,

I am working with the 1.53 version and I am glad that I have not changed to 1.62.

However, my remaining problem is the string conversion problem. I am sure that this can be fixed.

Michael
Reply With Quote
  #17  
Old 07-06-2010, 06:46 AM
c4esar c4esar is offline
Member
 
Join Date: Mar 2009
Location: Germany
Posts: 41
Default

Hi Michael!

Please see my edit above...


c4esar
Reply With Quote
  #18  
Old 07-06-2010, 10:14 AM
sdkfz250 sdkfz250 is offline
Member
 
Join Date: Jul 2009
Posts: 36
Default

Great C4esar,

This was the problem. Thank you for your help.

Bests

Michael
Reply With Quote
  #19  
Old 07-06-2010, 04:57 PM
juppmaifeld juppmaifeld is offline
Member
 
Join Date: Aug 2009
Posts: 43
Default

Hi Michael,

sorry for not responding to your last question so far. At the moment I am on vacation on a campground in Bavaria in the south of Germany and it was a little tricky to got the Internet connection running. As it looks like your problem has already been solved. That's good. I tested the code I provided on my Ipaq ppc where the "...\\Phone" key has only D-values. That's the reason why I used Reg_GetKeyValue(k$, Value$, FALSE)).

Jupp


PS: Concerning PPL 1.6x we should ask Kornalius whether there is a chance that the ppl community will get a better running version in the near future. I would really appreciate that but in the moment in my opinion it rather looks like that ppl 1.x and ppl 2.x for mobile devices will not survive.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:35 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright (c) ArianeSoft Inc.
Copyright © 2009 www.ppl-lang.com - All rights reserved
Web Design by BR Web Consulting Ltd