Code Contribution - Howto Hide TF3D CallerID - Windows Mobile Development and Hacking General

I discovered this yesterday, in writing a small app to hide TF3D Caller ID so My 3rd party caller ID would be the only one presented on an incoming call.
Here it is as is - limited testing sofar for me it works.
This is in C#:
Hey, I may have a contribution for you. That is Assuming you have not been able to Hide the TF3D (aka Manila) Caller ID on Diamond and TP devices in your custom caller ID code/apps.
As I said I wrote a small stub app to specifically Hide TF3D (Manila) caller ID so your custom / 3rd party Caller ID app would be the only one that appears. Actually Just figured it out yesterday; Have done some limited testing and appears to be working 100% so far. To that end, would like to provide you sample code that I used incase you find it useful.
Note: This is written in C# but the API's can be called in C++ as well.
Includes (from WM6 SDK) for c#:
using Microsoft.WindowsMobile;
using Microsoft.WindowsMobile.Status;
Code run from timer:
if (SystemState.PhoneIncomingCall)
{
//ShowWindow(FindWindow("", "Phone - Incoming"), SW_HIDE);
ShowWindow(FindWindow("PPG_GSMWorkerCls", "PPG_GSMWorker"), SW_HIDE);
ShowWindow(FindWindow("PhoneCanvasWorkerCls", "PhoneCanvasWorker"), SW_HIDE);
ShowWindow(FindWindow("manila", ""), SW_HIDE);
}
else if (SystemState.PhoneCallTalking)
{
ShowWindow(FindWindow("PhoneCanvasWorkerCls", "T - Mobile"), SW_HIDE); // <--Note sure if this is needed / but the Diamond Phone Status has the carrier in win title so did it anyway so only your (custom app status is visible)..
ShowWindow(FindWindow("PhoneCanvasWorkerCls", "PhoneCanvasWorker"), SW_HIDE);
ShowWindow(FindWindow("", "PhoneCanvasWorker"), SW_HIDE);
}
if ((!SystemState.PhoneCallTalking) && (!SystemState.PhoneIncomingCall))
{
//Show manila once hung up- to prevent any possible problems with manila(Just in case).
ShowWindow(FindWindow("manila", ""), SW_SHOW);
}
Hopefully you all have already worked this out and or can do it better then me here. But contributing as I know many have asked this before..
And for those who want the stub app I have attached the CAB here.
So far no battery issues that I known of.. Its as is, but will take any feedback for future updates if requested.

Bump.. So people dont miss this..

Which 3rd party app do you use?
BTW thanks for the contribution

What about video calls. I use S2U2, but it doesn't work with video calls, so the default Caller ID kicks in. What will happen if it's disabled, or is it disabled of video calls .

I use PhoneEx at the moment. I have not tested Video calls, well I can't as we dont have that option in the US. Also not sure if PhoneEx would support it either. So obviously someone could test this in that scenario and see what the results are.

is this program hide my caller id when i call anyone even if my operaor doesnt support this feature for my line

Related

SMS Notifier released – a great application for PPCPE users!

Finnish Aali Alikoski, Academic Developer Evangelist of Microsoft Finland, has just released a highly useful application, SMS Notifier, along with its source code.
The application offers some really nice and, up to now, to my knowledge, on the Pocket PC Phone Edition platform, unprecedenced functionality: it waits for unanswered incoming calls and, depending on the configuration settings, it either sends an SMS message to the caller (with configurable contents), possibly containing also the end time of current appointment (this is also configurable) or adds an item to the system-level Windows Mobile calendar (containing the caller info).
The latter functionality is nothing new – you can check the caller's identity and the call date/time in any low-end mobile phone. The former – that is, the SMS feedback –, however, is really long-awaited!
Downloading and Installation
You can download the application here. Transfer the CAB file to your PDA and execute it there.
If, after installing and upon starting SMS Notifier, you're presented this error message, make sure you download and install .NET CF 2.0 from Microsoft. Make sure you install it in the main memory. Also note that, as the application heavily relies on the new, connectivity/database-related libraries of .NET CF2, it's not very easy to port it to run under the earlier Compact Framework library. (For CAB lovers, you will only need c:\Program Files\ Microsoft.NET\SDK\CompactFramework\ v2.0\WindowsCE\wce500\armv4i\NETCFv2.wm.armv4i.cab ; you can also download it from here (to avoid having to download the 24 Mbyte-long MSI installer).
Configuration
On the main set-up screen, there're some checkboxes in AND relationship. The first one, Send SMS to unanswered callers, instructs the application to send an SMS to everybody that tries to call you but his or her calls remain unanswered. Using (not disabling) the second two checkboxes, however, you may make the application not send a SMS to anyone that calls you, just to the ones that call you during an active/busy appointment.
The checkbox/text input area at the bottom makes it possible to report the end of the current appointment so that he or she can know when you are reachable again.
The Calendar tab contains only one checbox, which instructs the application to enter all the incoming calls into Calendar.
Note that the configuration settings are not correctly saved/restored, as the author also points out.
Usage
To use the application, just start and configure it to your liking. Do not click the Quit button – then, it won't send your callers any SMS. Just let it run. You can, of course, suspend the PDA while you do so and also minimize the application. This also means you can safely start it from \Windows\Startup (just like the other highly recommended application, PMRecorder – please see this article on it if interested) – if it's running in the background, it'll safely catch all unanswered calls.
Other stuff
I also recommend the author's blog here. Don't be taken aback of some of the material's being in Finnish: there's nothing really interesting in them for non-Finns (the Finnish blog posts are only about local, Finnish meetings, conferences). Unfortunately, some of the other Finnish .NET bloggers (see the links in the lower left of the page) post exclusively in Finnish, even highly technical stuff that would be interesting for non-Finnish speakers too. (Feel free to ask me in my blog for a public translation for some of them if really interested.)
thanx man .. jus tried it . this application actually works .rockinnn
I can't seem to be able to install the .net Framework 2.o on my new T-Mobile MDA - USA (Wizard)
I get the same error from .cab install or activesynch install:
"Installation error. Stop all applications and processes, maximize all available storage space, and run installation again. Support info:4"
Any suggestions?
oops
PhoneGuy said:
I can't seem to be able to install the .net Framework 2.o on my new T-Mobile MDA - USA (Wizard)
I get the same error from .cab install or activesynch install:
"Installation error. Stop all applications and processes, maximize all available storage space, and run installation again. Support info:4"
Any suggestions?
Click to expand...
Click to collapse
Did you try to install it in the main storage or the storage card? Only install it in the main storage.
Yeah, the options were "Device" or "Storage Card".
I tried Devicce but no luck...
PhoneGuy said:
Yeah, the options were "Device" or "Storage Card".
I tried Devicce but no luck...
Click to expand...
Click to collapse
I've encountered the same when I first tried to install it on a storage card. Then, subsequent installs to the main memory didn't succeed either. A hard reset helped.
I have installed it and it seems to work well. My only concern is that it seems to use the notification application of the phone rather than the call list of the phone. The reason I say this is because it puts a calendar entry in when I miss a call then adds another entry when I check the notification of missed calls.
is this what is supposed to happen? would it send 2 text messages in this case (when the call comes in and when I check the notification that the call did come in)?
thanks,
Edwin
also, it seems if I am on the phone when I miss a call it uses the name of the person I was on the phone with and not the person I missed.
Ruttensoft also has a similar program call minder - works well but not as many features as above program but you don't need NET thing - hate those addons
ethorn said:
is this what is supposed to happen? would it send 2 text messages in this case (when the call comes in and when I check the notification that the call did come in)?
Click to expand...
Click to collapse
That's what happens for me... I stopped using it because of the duplicated sms's...
meschle said:
Ruttensoft also has a similar program call minder - works well but not as many features as above program but you don't need NET thing - hate those addons
Click to expand...
Click to collapse
Tried it. Keep getting "Cound not find resource assembly" error.
Strange works sweet for me.
this is the link I used
http://www.freewareppc.com/communication/callassistant.shtml
meschle said:
Ruttensoft also has a similar program call minder - works well but not as many features as above program but you don't need NET thing - hate those addons
Click to expand...
Click to collapse
after using the Ruttensoft on my Qtek, i can no longer creat SMS, when I click on new, only a while screen appear, cannot input both phone number and Text.... did anyone meet the same ???
meschle said:
Strange works sweet for me.
this is the link I used
http://www.freewareppc.com/communication/callassistant.shtml
Click to expand...
Click to collapse
No it didn't... you didn't use this program. we are trying to give feedback to the author of this program which has so much more potential than the limited software you used.
No sms works for me even when activated. my qtek rom is 1.6.7.1 maybe that's the diff. Sorry ethorn could start a new thread if you like but may help some people if the other prog don't work for them.
Hi
I have a XDA 2i & a XDA Mini S and use a program called Do Not Disturb by Jguisoft, a very small footprint and easily configurable
no I am all for putting ideas of other products, but the way you worded it sounded like this program that Menneisyys worked on worked on your phone and that the version of his program you used was at another link.... my problem is that neither are true. Software Guru did things right and just introduced another alternative.
thanks guys
Software Guru said:
Hi
I have a XDA 2i & a XDA Mini S and use a program called Do Not Disturb by Jguisoft, a very small footprint and easily configurable
Click to expand...
Click to collapse
Can you provide a link? Did a google and no results found.
Cannot download the SMSNotifierSetup cab
Can someone please post this as i cannot seem to download it.
thanks

Shutdown an application on the PDA from PC

I developed a small application to commnicate from my PC with my PDA via WiFi
(based on the examples in VS2005)
So I can do the following:
Write a SMS on the PC and send it
Read the items from Pocket Outlook and display it on the PC
and so one
All the stuff working very well.
Now I want to shutdown the application on the PDA from the PC, because I'm very lazy.
So I've a method:
On_Close_Message_Received() {
this.Close();
}
Here I get an exception. The exception message is not very convenient,
I try to translate:
An exception message can't be shown, because the optional ressource of the assembly containing the exception message cant't be found.
How to call the method On_Close_Message_Received (via event handler from another thread) doesn't matter in this case, because I've tested that the method is really called.
In the FormClosing event I do all the work to stop communication and so one.
Has anybody an idea.
Thanks.
PS. Sorry for my bad English
Getting meaningful exception messages
In order to save space, .Net Compact Frame left out the text for exceptions. If you install the the "system resources" cab you can appropriate messages.
I think it's either System_SR_enu_wm.cab or System_SR_enu.cab for english. There are versions for other languages. For example, I think System_SR_de.cab is the German version.
If you have one of the .Net framework SDKs on your PC, you probably also have these files. Just search for them.
Good luck.
Thanks SeTok for this tipp. For my problem I got already a solution. I don't call
this.Close directly. With dllImport I call SendMessage and with ShowWindow I can Hide and Show the app on the PDA. One little problem still occurs. After hiding and again I'll show it, the app is still in the background. But I think that's a small problem and I'll find a solution. But it works really well.
Walter_vdV said:
Thanks SeTok for this tipp. For my problem I got already a solution. I don't call
this.Close directly. With dllImport I call SendMessage and with ShowWindow I can Hide and Show the app on the PDA. One little problem still occurs. After hiding and again I'll show it, the app is still in the background. But I think that's a small problem and I'll find a solution. But it works really well.
Click to expand...
Click to collapse
hi, i have a problem with my applications when i call on me.hide, i cannot call them back again using me.show
i think using SendMessage will do the trick for me.
if you dont mind, would you please post a code snippet from you application? Thank you

TAPI weird problem with callerid

Hi Guys:
I'm having a weird problem with TAPI, basically I'm developing an app that intercepts incoming calls and then extract the callerid before starting recording the call.
I'm using WM 2005 and the device is an HTC Universal (T-Mobile MDA PRO) with a T-Mobile UK SIM.
All seems to work fine, the event loop receive the message(s) ,first receives an LINE_APPNEWCALL and then LINE_CALLINFO with dwParam1 set to LINECALLINFOSTATE_CALLERID, but when calling lineGetCallinfo to get the CallerID , the callerid flags (dwCallerIDFlags) returns 32 or "Unknow", even when the built-in alert in the phone is showing the caller id!
I killed cprog.exe from the process viewer (the phone didn't rang so the process was in fact killed) but not difference...Any ideas? Any tricks? Below a copy of the loop that I'm using:
void FAR PASCAL lineCallbackFunc(
DWORD hDevice,
DWORD dwMsg,
DWORD dwCallBackInstance,
DWORD dwParam1,
DWORD dwParam2,
DWORD dwParam3)
{
DWORD dwT = dwMsg;
LINECALLINFO *lpCallInfo;
size_t ci_size = sizeof(LINECALLINFO);
TCHAR *buffNum;
long Err;
OutputDebugString(_T("CB\n"));
switch (dwMsg){
case LINE_CALLINFO: {
switch(dwParam1)
{
case LINECALLINFOSTATE_CALLEDID:
{
OutputDebugString(_T("CALLID"));
break;
}
case LINECALLINFOSTATE_CALLERID:
{
OutputDebugString(_T("CALLERID"));
lpCallInfo = (LINECALLINFO *)calloc(ci_size,1);
lpCallInfo->dwTotalSize = ci_size;
Err = lineGetCallInfo((HCALL)hDevice,lpCallInfo);
if((DWORD)lpCallInfo->dwCallerIDFlags & (LINECALLPARTYID_ADDRESS | LINECALLPARTYID_PARTIAL)) {
_tcsncpy(buffNum, (LPTSTR)((BYTE*)lpCallInfo + lpCallInfo->dwCallerIDOffset), 256);
OutputDebugString(buffNum);
}
break;
}
break;
}
case LINE_APPNEWCALL:
{
OutputDebugString(_T("Newcall"));
// HCALL hCall = (HCALL)dwParam2;
break;
}
}
}
}
#define TAPI_API_LOW_VERSION 0x00020000
#define TAPI_API_HIGH_VERSION 0x00020000
#define EXT_API_LOW_VERSION 0x00010000
#define EXT_API_HIGH_VERSION 0x00010000
And here is how the TAPI starts: (in Main):
liep.dwTotalSize = sizeof(liep);
liep.dwOptions = LINEINITIALIZEEXOPTION_USEHIDDENWINDOW ;
if (lineInitializeEx(&hLineApp, 0, lineCallbackFunc, NULL,
&dwNumDevs, &dwAPIVersion, &liep))
{
goto cleanup;
}
OutputDebugString(_T("Init"));
// get the device ID
dwTAPILineDeviceID = GetTSPLineDeviceID(hLineApp, dwNumDevs,
TAPI_API_LOW_VERSION,
TAPI_API_HIGH_VERSION,
CELLTSP_LINENAME_STRING);
// error getting the line device ID?
if (0xffffffff == dwTAPILineDeviceID)
{
goto cleanup;
}
// now try and open the line
if(lineOpen(hLineApp, dwTAPILineDeviceID,
&hLine, dwAPIVersion, 0, 0,
LINECALLPRIVILEGE_MONITOR, dwMediaMode, 0))
{
goto cleanup;
}
// set up ExTAPI
if (lineNegotiateExtVersion(hLineApp, dwTAPILineDeviceID,
dwAPIVersion, EXT_API_LOW_VERSION,
EXT_API_HIGH_VERSION, &dwExtVersion))
{
goto cleanup;
Any help will be really helpfull, thanks.
Check your return value from lineGetCallInfo
check your return value from lineGetCallInfo. It will be LINEERR_STRUCTURETOOSMALL because lpCallInfo points to a buffer that's too small. (LINECALLINFO is a variably sized data structure) If you failed to make it large enough, you can allocate memory of size lpCallInfo->dwNeededSize and call lineGetcallInfo again. (look at documentation for lineGetCallInfo and LINECALLINFO)
Thanks for your reply, I checked the return value and is 0 so the size is fine (in fact dwSizeNeeded is greater than dwTotalSize so that is no problem), however I will change that bit just in case.
The interesting thing is that lpcallinfo structure returns "32" (UNKNOWN) for the dwCallerIDflags, even when the built-in notification program (cprog.exe) shows the callerid with no problem.
I even killled cprog.exe before testing and is the same, I wonder if there is something related with the Service Provider (T-Mobile) or some other setting that is interfering or no standard.
Any tip or suggestion is appreciated and welcome.
Thanks
Instead of testing the flag, test if dwCallerIDSize>0. Thats what I do. I have systematically gone through all values in the LINECALLINFO and most of them are zeroed out by the network regardless of what should be in them so I inclined to not trust it.
Also it could be your timing. Are you checking every time a LINE_CALLINFO/LINECALLINFOSTATE_CALLERID comes in or just once. The caller id is not always available on the first time but on subsequent messages is available.
Also it cant hurt to add extra memory to the LINECALLINFO. Just +1024 to be sure there is space for the caller id (or any other appended data before the caller id). You said dwSizeNeeded > dwTotalSize, that means you do not have enough memory and need to rellocate and call lineGetCallInfo again to refill the LINECALLINFO.
You do not need to kill the phone app (cprog.exe) to get caller id. It is a very bad idea to kill it without good reason. IMO the only valid reason to kill it would be to allow user interaction with your window during this time. There are side affects from killing cprog that can include uncontrollable vibration that requires a reset to stop if you have not prevented it programatically.
dwSizeNeeded is the amount needed to store the structure.
dwSizeTotal is the amount you provided.
if dwSizeNeeded > dwSizeTotal then there isn't enough room.
Are you sure that lineGetCallInfo returned 0?
If any of the dwXXXXSize members of LINECALLINFO struct are non-zero (which seams very likely), then you will need more than sizeof(LINECALLINFO) bytes.
I agree with OdeeanRDeathshead, no need to kill cprog. This will work without that. If I ever want to kill cprog, I usually replace cprog by a program with sleep(60*60*24) in a loop, then reboot. Or I replace it with the program I'm testing and reboot. On my phone, this doesn't seam to cause problems. If I just kill cprog, it will be restarted within a few minutes.
I also just check whether dwCallerIDSize > 0.
good luck
I you don't get it working, I was wondering if you could post your values for dwSizeTotal , dwSizeNeeded, and dwSizeUsed.
Thanks guys, you were totally rigth! The problem was that I was expecting the API (lineGetCallInfo) to return STRUCTURE_TOO_SMALL error and I didn't make any check on dwSizeNeeded.
Funny enough, the API returned no error at all and even the structure had some data on it, but it wasn't big enough, so basically I added a loop to check the Size and reallocate memory until is enough, it works like a charm now.
On a separate note, on outgoing calls I had to introduce a small delay, the CalledID information it doesn't become instantly, by testing in the HTC Universal seems to be slow on outgoing calls, I hope that wont be any trouble there.
Thanks again guys for your help, it saved me a lot of work.
This piece of code works on my iPAQ, but it does NOT work on a Treo 700wx. It retrieves no number on a Treo 700wx. Anybody face the same issue?
Your iPAQ is a pocket pc, and the treo is a smartphone. The smartphone has a two tier security model. ExTAPI is a privileged API, so on a smartphone it can only be run with by a trusted application. The application must be signed with a trusted certificate.
But why is the product specification advertised as "Pocket PC Phone Edition" (see http://www.palm.com/us/products/smartphones/treo700w/specs.html)
The treo 700wx is the US edition? Because the ones that I used in America had Windows Mobile 5.0 Pocket PC edition, however it sounds like a security issue as the guys mentioned above.
Take a look at :
http://msdn.microsoft.com/library/d.../wce51conWindowsMobileDeviceSecurityModel.asp
http://blogs.msdn.com/windowsmobile/archive/2005/11/03/488934.aspx
I signed the app by using the provided privileged certificate in the SDK and it works (in fact I used exTAPI), is worth to try.
Another thing, did you check the CALLERPARTYID flags to ensure that there is a "callerid" after calling getCallInfo?
And one curious thing about the Palms and Verizon, while we developed all in the UK , IMEI numbers are equally formated, in the US for some reason, both Motorola Q and Palm 700w got different formats, same for callerid sometimes, if you are doing any string operation after obtaining the number (like formating, etc,etc) be sure that is not causing any problem.
But my iPAQ is also running WM5 PPC Phone Edition. I believe the code provided above is in fact compatible with many WM5 phone devices, specifically HTC made devices like O2, Dopod, etc.
So is it because Treo 700w has special security level that we need to comply for TAPI to work properly?
Also, commands like lineInitialize, lineOpen, lineGetCallInfo does not return any error. The thing is this... same piece of code, runs on most WM5 PPC, able to retrieve incoming number. But there's just NO incoming number return on a Treo 700w/wx. Any idea?
arsenallad said:
...The treo 700wx is the US edition?...
...Another thing, did you check the CALLERPARTYID flags to ensure that there is a "callerid" after calling getCallInfo?...
Click to expand...
Click to collapse
Yes. Treo 700wx US edition.
No. I use dwCallerIDSize>0.
not sure why it's not working for you, I run simular code on an apache and a iPAQ 6215, works fine. However, I don't think it's a security problem. I was confused by palm calling the treo a smartphone. It has a touch pad, it must be a Pocket PC .
Pocket PC doesn't support the two tier model. Smartphone supports both models. If registry value HKLM\Security\Policies\Policies\0000101b is 0 then the device is two tier otherwise it's one tier. Note 0x101b=4123 so search MSDN for security policy 4123 to find out more.
Plus it's the tapi api that needs to work not exTapi. I don't think any of the tapi functions are privileged.
Just wanted to correct my mistake from yesterday. If you have VS2005 you might want to look at the CallInfo structure in the debuger.
Good luck
WangSN said:
Yes. Treo 700wx US edition.
No. I use dwCallerIDSize>0.
Click to expand...
Click to collapse
dwCallerIDSize it will tell you only the length, if for instance the structure is not properly initialized (as happened to me in this thread) dwCallerIDSize will be zero too, is not a good idea because doesn't give you too much info.
Check in your structure the dwCallerIDFlags member , if returns LINECALLPARTYID_ADDRESS or LINECALLPARTYID_PARTIAL means that callerid is there, now if LINECALLPARTYID_BLOCKED is returned is very likelly that the operator it doesn't have the callerid active or you are calling from a line that protects the "privacy" (whitheld) sometimes is the case, specially in offices that uses PBX.
If LINECALLPARTYID_UNKNOWN is returned, then probably you are having a problem either with the callerid service (the phone does show the callerid when calling?) or somethign to do with your lpcallinfo structure allocation, check that dwTotalSize >= than dwNeeded.
One more thing: It happens to me that after testing using an HP Phone I started testing in a HTC universal phone and it didn't work , particullary in outbound calls, for some reason the LINECALLPARTYID flag returned ADDRESS, but the structure was empty. After trying to discover what was going on, I introduced a small pause in the thread (Sleep) of 2 seconds and worked fine, it seems that hardware can be slow
Good luck.
Nope No luck in getting this to work...
Checked dwCallerIDFlags member, even when value is LINECALLPARTYID_ADDRESS|LINECALLPARTYID_PARTIAL still does not contain the incoming number.
Also tried Sleep for 2 seconds, but still NO number. Before the 2 seconds wait expires, the built-in PPC incoming call dialog already show up WITH caller number.
I'm running out of ideas...
problem solved, post edited...

[New release] Registry display plugin

Ok, most of you may find this totally useless as a plugin, but it was a combination of a request by user Treo_newb and a desire to create a sample plugin project that could be used as a base / example for plugin writers (I plan on doing an article on codeproject.com and this will be the source for it).
What does it do?
This plugin displays a string stored in registry.
The path is:
HKEY_CURRENT_USER\Software\RegDispPlugin
Value name: DisplayString
It checks if this string has changed several times per second when today screen is shown (as the system sends refresh message to all plugins) and displays the updated message if a change occurred.
What is it good for?
First, if you write apps using mortscript or similar like the user who requested this it will let your script display stuff on today screen.
Alternatively it could be used to mark your device today with a string that isn't as easily changed as user info.
The source is basically a skeleton plugin you can use to build your own plugin on (no license / copyright to limit you) and it already has several tricks needed for the plugin to display correctly:
VGA compatibility
Text size matching system settings
Proper header in settings dialog (like on system plugins)
Proper text color when selected (according to theme)
No blinking all today screen on change
Proper resize when switching between landscape and portrait
When I was writing my first plugin I could not find all these little fixes concentrated in a single article so I had to fish for each one as the bug reports came in.
Hope you will find this little project useful.
The plugin:View attachment RegDisplay.CAB
The source (eVC 4 project): View attachment RegDisplay.zip
Thanks for this!
Thank You Lev.
Thanks, Thanks, Thanks,
You are a legend.
I was almost through with my today plugin and was trying to figure out reading registry values and all of a sudden I get a PM from u about the plugin !!!
Very Cool !!!
OK a few questions,
1. I know that WM_TODAYCUSTOM_QUERYREFRESHCACHE is called for refreshing the today plugin, any ideas about when is it called.
I read somewhere that it was 2 seconds. Is it true?
2. I saw ur code and u have exposed CustomItemOptionsDlgProc in RegDisplay.def, but when I installed the cab file the 'options' is not enabled.
I manually changed the resistry and changed options to dword = 1 and saw ur name and email address.
u might want to enable that by default so that people can notice ur work.
I am planing a commercial release of a new project on basis of this.
Thanks again,
Shailesh
First, you're welcome.
shaileshashar:
1) I ran a debug print on this message once on an iPaq 1710 and it seems to be sent several times per second. This could differ from OS to OS or even from device to device, I am not sure.
If you need specifically timed refresh, or you have an event triggered on new data, I suggest using a timer or maybe a thread that will wait on an event. You can refresh your plugin from anywhere in code by calling InvalidateRect with your window handle.
2) I messed up the cab at first, forgetting to add the Options reg value. Then when I went to upload the fix, I couldn't access the site for about an hour (no idea why, I even rebooted the PC to Ubuntu). Should be fixed now, but I will check it later again (I have to go back to XP for that).
Good luck with your program.
Suggestion
levenum said:
First, you're welcome.
shaileshashar:
1) I ran a debug print on this message once on an iPaq 1710 and it seems to be sent several times per second. This could differ from OS to OS or even from device to device, I am not sure.
If you need specifically timed refresh, or you have an event triggered on new data, I suggest using a timer or maybe a thread that will wait on an event. You can refresh your plugin from anywhere in code by calling InvalidateRect with your window handle.
2) I messed up the cab at first, forgetting to add the Options reg value. Then when I went to upload the fix, I couldn't access the site for about an hour (no idea why, I even rebooted the PC to Ubuntu). Should be fixed now, but I will check it later again (I have to go back to XP for that).
Good luck with your program.
Click to expand...
Click to collapse
Thanks for the help, will check the fixed cab.
Also a suggestion:
A custom icon could also be incorporated. You can give a option to load a custom icon next to the text in the today plugin.
I know anybody can modify ur code and do it but still.
Actually, I probably should have mentioned this in the original post but I have no intention of adding options to this thing.
This would only complicate the code and turn it in to an actual app instead of a sample project.
But by all means feel free to make suggestions. If this thing does become popular, when I am done with my other projects (like LVMTopBat) which won't be any time soon (unfortunately) I will release a separate version of this plugin with all kinds of options that can be controlled both by user (form the options dialog) and by other apps through registry.
Maybe things like text alignment, size, bold / Italic / underlined.
P.S.
The reason I put the string this plugin loads under HKEY_CURRENT_USER instead of the HKLM where the rest of the plugin registry resides is because by default the HKEY_LOCAL_MACHINE on WM 5 and higher has a security restriction. For example you can not write to it using RAPI, only by authorized (or signed) app on the device. The HKEY_CURRENT_USER on the other hand is open for all.
levenum said:
P.S.
The reason I put the string this plugin loads under HKEY_CURRENT_USER instead of the HKLM where the rest of the plugin registry resides is because by default the HKEY_LOCAL_MACHINE on WM 5 and higher has a security restriction. For example you can not write to it using RAPI, only by authorized (or signed) app on the device. The HKEY_CURRENT_USER on the other hand is open for all.
Click to expand...
Click to collapse
Thanks for the info, I never knew that.
Thank you so much! This was exactly what I was looking for!
levenum said:
...But by all means feel free to make suggestions.
Click to expand...
Click to collapse
As a frequent mortscript user I think, this great app might be even more usefull, if the string was shown in an "allways on top" message box instead of the today screen. The Today screen might be obscured by other active windows during the scripts runtime and the plugin eats precious today screen estate also while being unused, doesn't it?
In that case (of a standalone application) I would furthermore introduce some kind of termination string (or reg. value) to end the display application.
Code:
- start mortscript
- writes first string to registry
- starts display application (run)
- updates string in registry whenever appropriate
- ...
- writes termination string to registry
-> display applications self-terminates
- ...
- end of mortscript
Honestly, I already do use something comparable with mortscript (employing a conditioned sleepmessage loop and reading from the registry too), but this could be much nicer and more elegant.
Just my 2 cents... What do you think?
I think something like that would be better implemented by the mortsrit program it self.
It could be a function like MessageBox API in windows which you could then command on and off. Having it built in would save precious resources on the device that would be wasted by having an extra app run constantly in background.
This is just my thought though.
I'd suggest contacting the developer of mortscript and discussing it with him.
levenum said:
I think something like that would be better implemented by the mortsrit program it self.
...
I'd suggest contacting the developer of mortscript and discussing it with him.
Click to expand...
Click to collapse
Mort knew about that request and by chance just announced to so.
Thanks anyway.
Hello levenum,
I just joined the community. Reason being, I found your RegDisplay plug-in
You call it a sample project, but the impact is that of an awesome solution.
Great for MortScript, but equally useful in BASIC applications that write
messages to the registry which is show upon screen minimization.
I regret not being a C programmer (mainly BASIC), else I'd love to further
develop this jewel.
Your plug-in runs flawlessly in an iPAQ 210 under WM6 Classic.
Cheers and Respectful Greetings
Robert
CLSID for registry display plugin
What is the CLSID for the Registry Display Plugin? I am going to have to edit the XML file that defines my home screen in order to get the plugin to show up. I am using Facade to control my home screen, and the only plugins that it will show in its list are those currently in use in one of the XML files in the Application Data\Home folder. All other new plugins require editing the XML. Thanks for your help.
levenum said:
Ok, most of you may find this totally useless as a plugin, but it was a combination of a request by user Treo_newb and a desire to create a sample plugin project that could be used as a base / example for plugin writers (I plan on doing an article on codeproject.com and this will be the source for it).
What does it do?
This plugin displays a string stored in registry.
The path is:
HKEY_CURRENT_USER\Software\RegDispPlugin
Value name: DisplayString
It checks if this string has changed several times per second when today screen is shown (as the system sends refresh message to all plugins) and displays the updated message if a change occurred.
What is it good for?
First, if you write apps using mortscript or similar like the user who requested this it will let your script display stuff on today screen.
Alternatively it could be used to mark your device today with a string that isn't as easily changed as user info.
The source is basically a skeleton plugin you can use to build your own plugin on (no license / copyright to limit you) and it already has several tricks needed for the plugin to display correctly:
VGA compatibility
Text size matching system settings
Proper header in settings dialog (like on system plugins)
Proper text color when selected (according to theme)
No blinking all today screen on change
Proper resize when switching between landscape and portrait
When I was writing my first plugin I could not find all these little fixes concentrated in a single article so I had to fish for each one as the bug reports came in.
Hope you will find this little project useful.
The plugin:View attachment 41592
The source (eVC 4 project): View attachment 41583
Click to expand...
Click to collapse
This is great! I was asked if I could write a today screen plug-in for my weather application (http://forum.xda-developers.com/showthread.php?t=445576) - I couldn't since I don't have the skills and I'm writing .NET code - but this is exactly what I needed.
I'm adding support for this plug-in and will of course give credits to you.

Caller name announcement with espeak

Hi,
I'm developing a better caller name announcement than MSVC.
It's based on espeak for WM build and mortscript.
The announcement works, but not when incoming call ringing, I think WM disable the PlaySound when active call in progress. MSVC pauses the ringtone and plays it's own generated wav, than resumes the ringtone. Can somebody help how can I do it?
Here is the current mortscript:
While (1)
IsCalling = RegRead("HKLM", "System\State\Phone", "Incoming Call ID Status")
if (IsCalling > 0)
name = RegRead("HKLM", "System\State\Phone", "Last Incoming Caller Name")
run ("\Program Files\eSpeak\espeak.exe","-v hu -w \MUSIC\test2.wav ""call from: " & name & """")
PlaySound "\MUSIC\test2.wav"
Vibrate( 10 )
endif
sleep(1000)
EndWhile
I think it's an excellent idea, considering that MSVC sucks at announcing caller names. I really don't know the inner workings of WM vs. Mortscript functions, but if it's a reg key that WM changes during active call, it should be possible to track which one it is with SKTracker.
Or, You could try using the playsound.exe from here - http://forum.xda-developers.com/showthread.php?p=6288343. Maybe this one works during call, I don't know.
I presume You have disabled the WM incoming call ring, but why not let the system take care of the vibration? Because Mortscript says the script is paused until playing the sound finishes.
And since I couldn't find espeak for WM, could You kindly point me to it?
Thanks.
Download: eSpeak.zip
Thanks!
Might I ask where did it come from? I found the sourceforge page with espeak but there's no WM version there. Did You compile it Yourself? And for some reason the Estonian language (the one that I actually need) is thrown out from the WinCE version? I think I can use the one from PC version (haven't tried yet tho), but just curious about why
I fetched it from here. This link was provided there.
OK, thanks! I found that it probably originates from here: http://www.efficasoft.com/gpsutilities/index_wm_ppc_resources.html
Re:
Unfortunately this playsound didn't work too.
The incoming call event has higher priority than normal apps and it mutes all other application.
I'm trying to determine how MSVC works, but I'm not enough for this.
Thanks for the advise!
aiiro said:
Or, You could try using the playsound.exe from here - http://forum.xda-developers.com/showthread.php?p=6288343. Maybe this one works during call, I don't know.
Click to expand...
Click to collapse
Damn MS then... Too bad.

Categories

Resources