Ariane Soft PPL2 Pocket Programming DataMite

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-18-2010, 09:37 AM
sdkfz250 sdkfz250 is offline
Member
 
Join Date: Jul 2009
Posts: 36
Default accessing short message events or incoming call events from PPL

Maybe a stupid question but is it possible to identify incoming messages or calls in a PPL program? Is there a variable keeping this information? Maybe this could be the starting point for a mobile shell project.

Any code example would help a PPL beginner
Reply With Quote
  #2  
Old 05-20-2010, 09:48 PM
Nicknack Nicknack is offline
Senior Member
 
Join Date: Nov 2006
Location: Germany
Posts: 527
Default

do you mean phone calls and SMS? I have searched the web, but it doesn't seem to be easy accomplished. anyway it would be a nice contribution.
Reply With Quote
  #3  
Old 05-21-2010, 07:04 AM
sdkfz250 sdkfz250 is offline
Member
 
Join Date: Jul 2009
Posts: 36
Default

I have seen that PPL comes with a Phone.lib which could be included. However I can't find nothing regarding SMS.

SdKfz250
Reply With Quote
  #4  
Old 05-21-2010, 11:17 AM
Nicknack Nicknack is offline
Senior Member
 
Join Date: Nov 2006
Location: Germany
Posts: 527
Default

the problem is the most functions are only supported for managed code and PPL is only compatible with native code. I have found a way to notify incoming calls via SNAPI, but I don't have snapi.h, where all the needed registry keys are listed and documented. maybe somebody else can upload it?
didn't find a solution for incoming SMS yet.
Reply With Quote
  #5  
Old 05-27-2010, 03:16 PM
sdkfz250 sdkfz250 is offline
Member
 
Join Date: Jul 2009
Posts: 36
Default

Maybe this link is helpful.

http://code.google.com/p/iphonetoday...eToday/snapi.h
Reply With Quote
  #6  
Old 05-27-2010, 05:59 PM
Nicknack Nicknack is offline
Senior Member
 
Join Date: Nov 2006
Location: Germany
Posts: 527
Default

oh must have overlooked it on google, good eye this will be helpful
Reply With Quote
  #7  
Old 06-28-2010, 01:45 PM
sdkfz250 sdkfz250 is offline
Member
 
Join Date: Jul 2009
Posts: 36
Default

Nicknack,

Do you have a simple example how to access and read registry keys on a WM5 phone using PPL by using snapi?

I tried it by my own but was not successful.

Many thanks

Sdkfz250
Reply With Quote
  #8  
Old 06-29-2010, 08:05 PM
Nicknack Nicknack is offline
Senior Member
 
Join Date: Nov 2006
Location: Germany
Posts: 527
Default

please post your current code, this makes it easier for me to help
Reply With Quote
  #9  
Old 06-30-2010, 10:01 AM
sdkfz250 sdkfz250 is offline
Member
 
Join Date: Jul 2009
Posts: 36
Default

Thanks Nicknack,

I tried the RegistryTest Example from the Demo folder on my HTC 3300 with WM5.

When I start no output is displayed and the HTC hangs.

Here ist the code:

//*************************************************
// Registry demo written by Alain Deschenes (c) ArianeSoft Inc.

#include "console"
#include "registry"

////////////////////////////////////////////////////////////////////////////////
// PhoneLastIncomingCallerNumber
// Gets the last incoming call's phone number (Caller ID).
#define SN_PHONELASTINCOMINGCALLERNUMBER_ROOT HKEY_LOCAL_MACHINE
#define SN_PHONELASTINCOMINGCALLERNUMBER_PATH TEXT("System\\State\\Phone")
#define SN_PHONELASTINCOMINGCALLERNUMBER_VALUE TEXT("Last Incoming Caller Number")


func WinMain
InitConsole;
ShowConsole;

new(hKey$, tint);


Writeln("");
Writeln("Using the simplified registry functions...");
Writeln("");
k$ = Reg_OpenKey(HKEY_LOCAL_MACHINE, "System\\State\\Phone");
Reg_GetKeys(k$, &Keys$);
ForEach (Keys$)
Writeln(Keys$);
end;
Reg_CloseKey(k$);

return (true);
end;
//************************************************** **


Do you have any idea what the problem is? Thanks for your help.

Michael
Reply With Quote
  #10  
Old 06-30-2010, 08:49 PM
juppmaifeld juppmaifeld is offline
Member
 
Join Date: Aug 2009
Posts: 43
Default

Hi sdkfz250,

I had a similar problem with Reg_GetKeys(k$, &Keys$) and registry.ppl.
I solved the problem by doing the following:

Change in registry.ppl

#declareapi RegEnumKey regdll RegEnumKeyEx 8 1

to

#declareapi RegEnumKeyEx regdll RegEnumKeyEx 8 1

and also change in

func Reg_GetKeys(HKEY$, Keys$)

the call

RegEnumKey(HKEY$, i$++, &v$, &sz$);

to

RegEnumKeyEx(HKEY$, i$++, &v$, &sz$, NULL,NULL,NULL,NULL);

This worked for me on an IPAQ with WinMobile 5.0.

Hope this helps.

Jupp
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 10:57 PM.


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