Intercepting OUTGOING sms's, how? -> sms_providers.dll wrapping? - Windows Mobile Software Development

Hello all you,
I'd like to intercept outgoing SMS's sent from the SMS messaging application.
Do any of you know a good wy to do this?
I found a possibility myself, but not entirely sure that it'll work:
wrapping sms_providers.dll, all exported functions that start with "Text_":
Test_GetMessageInfo
Text_GetSize
Text_Read
Text_RecognizeMessage
Text_Send
And then, change the registry to use my own DLL for Text messages:
[HKLM\Comm\Cellular\SMS\Protocols\Text] DLL = "MyOwn.dll"
However, for my own thought up solution, there's a few snags:
1) I can't find any documentation about the function defenitions (parameters, return types, etc.) which I really do need, in order to do good wrapping.
2) the DLL needs to be signed in order to work: how??
Does anyone know of a:
1) Different solution
2) How to get my own idea on the road?
and, just to expolain what I'm trying to do:
I want to be able to send SMS through voipbuster.com from within the messaging application, because of nice system integration. I know of some already available tools to do just this, but I find them pretty cumbersome, and theirfor, not really usable.

No idea if this will work or not.
Remove the SMS center number then just read the text from the outbox/sentbox and send on from there.

Dean123 said:
No idea if this will work or not.
Remove the SMS center number then just read the text from the outbox/sentbox and send on from there.
Click to expand...
Click to collapse
Doesn't seem to work. my sms still gets sent.
What does work: set sms sending method to GPRS, then it comes up with an error box that it can't send any message, and then I could pick up the unsent message from the drafts folder. But this is far less then ideal. I would prefer to use some kind of a hook or callback, instead of continuously checking a messaging folder for new messages.

very interested...
i had the very same idea... only problem is i don't have any programming skills besides programming my vcr ;-) ...
i'll keep a close look on this thread

Nobody any bright ideas?

Hello!
You can get the source code from WinCE Platform Builder.
Actually, you just need to write a DLL including the "TEXT_" Functions. In these functions, you can do all you need to do, and pass the parameters to the original SMS_Providers.dll after all.
Check out the latest version of Kaspersky Mobile, it uses this method.
BTW: I'm Chinese...er.... I hope you can understand my poor English...

Hello,
I've to intercept SMS incoming messages before tmail does, since I need to read the UDH part of the message.
I've written my own SMS provider, a dll witch export the TEXT_... functions as SMS_providers.dll does (I have got the declarations of this functions from the source of this dll from the Platform Builder). Then, I have put my dll into the Windows folder an I have changed the value of this registry key:
[HKLM\Comm\Cellular\SMS\Protocols\Text] DLL
writing my dl name as value.
But it doesn't work. My dll is never attached nor called. When a SMS is received, the client cannot call my provider and the message is transmited as a RAW message (because this is another entry in HKLM\Comm\Cellular\SMS\Protocols with less preference).
Do I need something else? Must my dll be registried by another way, such a COM registration? Please, help.

Hello,
Could anybody provide a header file including the "TEXT_" functions?
I am interested in intercepting outgoing SMS.

you need to sign with privileged certificates.

RAMMANN said:
you need to sign with privileged certificates.
Click to expand...
Click to collapse
Or cook it in a rom and turn off certificate checking in the kernel....

NRGZ28 said:
Or cook it in a rom and turn off certificate checking in the kernel....
Click to expand...
Click to collapse
yes.... but actually I think the guy needs to do some debug logging and trial and error in the first place. this is a bit (but only a bit) sloowwwww when flashing a new ROM each time.

whooo! This stuff is very sensitive! If you link aygshell.lib in your sms_providers.dll replacement project then CE doesn't load it anymore. The DLL is also loaded pretty early in the boot process when the UI isn't initialized yet so if you add a MessageBox for debugging purposes you need to hard reset....
I love it!

I discovered another way of not having CE load your sms_providers.dll
First I thought it's a problem related to Samsung because my DLL didn't load on Omnia i900 and O2 and it worked on a majority of HTC devices. But then I even had a HTC device not loading the DLL... and guess what: It's been the only HTC device remaining that didn't have a custom ROM running. The Samsung devices were still running on stock ROMs too. So this is most likely a certification issue and even signing with priv. certificates doesn't help....

Related

Licenced Software CAB conversion

Does anyone know if you can take a piece of software that you have purchased in CAB format, with a Licence Key and change it into a package?
Since the software isn't OEM is it still the same method to create a package?
Any Takers?
This cant be to much of a hard question!!! can anyone answer? please
Tried it with Phone Alarm. sort of worked at the second attempt. But not quite. If I spent more time on it I reckon I could have got it to work but just don't have the time.
crazyC said:
Tried it with Phone Alarm. sort of worked at the second attempt. But not quite. If I spent more time on it I reckon I could have got it to work but just don't have the time.
Click to expand...
Click to collapse
but you can actually do it? what do you do about the activation codes etc?
The code is probably just stored in the registry or a config file after you enter it, in which case just make an RGU in the package putting the right data into the right place.
Some software might encrypt the code.. but even then usually putting the right encrypted string in the right place will work.. You may have to have the owner information set exactly the same each time (as this may be hashed into the generated key) but this isnt a problem as you can set the owner information in the RGU as well.
If you get a program where you cannot track the installation to see what happens when entering serials etc.. try SKTracker.. you can use it to watch the ppc for changes to files, databases and registry and dump those changes for analysis... so you install it.. make a reference dump.. then install/register the app.. then dump again.. then compare to see what has changed.
Some apps it wont work with of course.. but i'd imagine for most it will be possible yes. The worst that happens is you have the app installed in trial mode.. and a text file burned to the ROM with the serials you have bought in it to re-register it when needed after a hard reset.
Yeah - SK tracker is fantastic. Generally it just involves exporting a reg key from your PPC and then putting it into the cab/package along with your owner name (in some cases).
All my licensed software has been set to install via cabs including the keys. Not found any that cannot be done this way.
Problems arise with more complicated installs that involve interfacing with the system. Just using the normal conversion process with the PA cab did not work, needed to run SK tracker and fix a load more reg entries that were changed by the instll prcess. Improved it but still had issues with no sounds etc. I must have missed something, and have temporarily given up. The cab only takes a minute to install anyway.

How to set soft keys in INDIGO without certificate error?

Forgive me for I haven't found a solution by searching the forums.
I've installed INDIGO Full and now I want my soft keys as they were in AX3L's, the Calender and New Sms. From experience of using AX3L's ROM, there is the soft key changer in Settings->Personal. So, I downloaded the same program (cpl) and dumped it in windows folder.
After setting the keys the way I wanted it, I end up with both erroring out.
The file 'HTCCalender' cannot be opened. Either it is not signed with a trusted certificate, or one of its components cannot be found. If the problem....
I've read a few posts and installed some certificates. As you can tell, that didn't work.
Thanks.
hotplainrice said:
Forgive me for I haven't found a solution by searching the forums.
I've installed INDIGO Full and now I want my soft keys as they were in AX3L's, the Calender and New Sms. From experience of using AX3L's ROM, there is the soft key changer in Settings->Personal. So, I downloaded the same program (cpl) and dumped it in windows folder.
After setting the keys the way I wanted it, I end up with both erroring out.
The file 'HTCCalender' cannot be opened. Either it is not signed with a trusted certificate, or one of its components cannot be found. If the problem....
I've read a few posts and installed some certificates. As you can tell, that didn't work.
Thanks.
Click to expand...
Click to collapse
Use SKtools
Or see this: http://forum.xda-developers.com/showthread.php?t=313646&highlight=htccalendar
Thanks fellas, managed to get the calender working.
Now, its the New SMS.
I assigned it to
"\Windows\tmail.exe" -service "SMS" -to "" -body ""
The results is just a Messaging window with title
"Select an Account"
and the list of accounts that I have.
How do I get it to display a blank sms page?
Thanks again guys.
bump.. bumpppppp

[HACK] (16/05/2010) Native SMS over IP

This thread is moved to here
Hello people,
I've been working on an SMS over IP application, but I decided to make it native, meaning replacing the WM sms dll with mine. It will work with any provider that supports the following url to send an SMS:
https://www.voipbuster.com/myaccount/sendsms.php?username=%0&password=%1&from=%2&to=%3&text=%4
or
https://www.exetel.com.au/sendsms/api_sms.php?username=%0&password=%1&mobilenumber=%3&message=%4&sender=%2&messagetype=Text
where:
%0 stands for username
%1 stands for password
%2 stands for from number
%3 stands for to number
%4 stands for text
You need to add te following keys to your registry:
HKEY_CURRENT_USER\Software\Drizzt\SMSoIP\url:
Type is REG_SZ, value is the complete url with placeholders, see the above examples
HKEY_CURRENT_USER\Software\Drizzt\SMSoIP\username:
Type is REG_SZ, value is your username
HKEY_CURRENT_USER\Software\Drizzt\SMSoIP\password:
Type is REG_SZ, value is your password
HKEY_CURRENT_USER\Software\Drizzt\SMSoIP\from:
Type is REG_SZ, value is your phone number validated by your voip provider in international format, e.g. +9012345689
HKEY_CURRENT_USER\Software\Drizzt\SMSoIP\option:
Type is REG_DWORD, value is one of the following:
0 = Use internet only, don't fallback to gsm
1 = If internet sending fails, automatically send it over gsm
2 = If internet sending fails, popup a confirmation box before sending over gsm
3 = Don't use IP, send it over gsm
4 = Ask first what to do
5 = Use IP only for international sms
bit4: set = automatically establish internet connection if not already available
HKEY_CURRENT_USER\Software\Drizzt\SMSoIP\prefix:
Type is REG_SZ, value is your country code (e.g. 90 for Turkey, 32 for Belgium, 49 for Germany, ...)
Thanks to oruam57 for developing the configurator so that you don't need to edit the registry manually. He also compiled everything into the attached cab installer.
WARNING. This cab installer may cripple your phone. READ BELOW! USE AT YOUR OWN RISK!
This cab installer overwrites \Windows\sms.dll. Original SMS functionality is supposed to be offered by the new file \Windows\sms_orig.dll that is a copy of sms.dll from a WM6.1 phone.
If you happen to have problems:
- extract sms.dll from the image of the ROM of your phone (search in the forum about how to do it);
- rename it to sms_orig.dll;
- install the cab and DO NOT soft reset;
- overwrite \Windows\sms_orig.dll with the sms_orig.dll from your ROM;
- soft reset.
CHANGELOG V1.7
- New option = 5, use IP only for international sms
- Fixed: Multiline bug
- Fixed: MessageBox going to background
- Changed url format, added placeholders
CHANGELOG V1.6
Fixed: Bug when sending to a foreign country
CHANGELOG V1.5
Establish data connection automatically if wifi connection is not available
Tested and works on a Touch Pro also.
So what exactly are the benefits of this? Free SMS?
virtual_law said:
So what exactly are the benefits of this? Free SMS?
Click to expand...
Click to collapse
not free but cheaper SMS
Choose between gsm or internet
Hi there,
I like the idea about being able to send sms via the betamax voip companys. Do you think it's possible to somehow choose whether you want to send via gsm or internet, without changing the reg value every time
Ramzidk said:
Hi there,
I like the idea about being able to send sms via the betamax voip companys. Do you think it's possible to somehow choose whether you want to send via gsm or internet, without changing the reg value every time
Click to expand...
Click to collapse
That requires a code change. So, when you push send, you want a popup to select internet or gsm, correct?
drizztje said:
That requires a code change. So, when you push send, you want a popup to select internet or gsm, correct?
Click to expand...
Click to collapse
Yes exactly or maybe a switch/checkbox where you can select sending method. I don't have that much experience in WM developing so i wouldn't know how to accomplish that.
Ramzidk said:
Yes exactly or maybe a switch/checkbox where you can select sending method. I don't have that much experience in WM developing so i wouldn't know how to accomplish that.
Click to expand...
Click to collapse
try this one. you need to set option=4 in the registry.
drizztje said:
I've been working on an SMS over IP application, but I decided to make it native, meaning replacing the WM sms dll with mine.
Click to expand...
Click to collapse
First of all, GREAT idea! I'd love to have it on my phone!
Unfortunately, it does not work on my Diamond2 and it even stops Manila from loading.
oruam57 said:
First of all, GREAT idea! I'd love to have it on my phone!
Unfortunately, it does not work on my Diamond2 and it even stops Manila from loading.
Click to expand...
Click to collapse
Are you on a stock rom? Try installing SDKCert.cab (search in the forum). You could try disabling threaded sms. Another thing you could try is to extract the sms.dll file from the image of the rom you are using (search in the forum about how to do it), and rename it to sms_orig.dll and use it instead of the one from my zip (you still need to use my sms.dll).
Thanks for your answer.
drizztje said:
Are you on a stock rom?
Click to expand...
Click to collapse
Yes (see my signature).
drizztje said:
Try installing SDKCert.cab
Click to expand...
Click to collapse
Done already.
drizztje said:
You could try disabling threaded sms.
Click to expand...
Click to collapse
Done already, always hated it.
drizztje said:
extract the sms.dll file from the image of the rom you are using (search in the forum about how to do it), and rename it to sms_orig.dll and use it instead of the one from my zip (you still need to use my sms.dll).
Click to expand...
Click to collapse
Done that too. Same result.
I suppose that the sms management part of manila does something funny with sms.dll Moreover, I noticed my sms.dll is larger than yours. I attach it hereafter.
oruam57 said:
Thanks for your answer.
Yes (see my signature).
Done already.
Done already, always hated it.
Done that too. Same result.
I suppose that the sms management part of manila does something funny with sms.dll Moreover, I noticed my sms.dll is quite larger than yours. I attach it hereafter.
Click to expand...
Click to collapse
can you try sending an sms using the native messaging, see if that works over IP?
drizztje said:
can you try sending an sms using the native messaging, see if that works over IP?
Click to expand...
Click to collapse
I suppose I can. I'll report as soon as possible.
Something very strange happened!
I used total commander to overwrite the sms.dll in ROM with your sms.dll, then I soft reset and all started right, including manila.
I was surprised so I listed the windows directory using total commander and there were a sms.dll (lower case) and a SMS.DLL (upper case)! From dates and attributes it seems that sms.dll is the original ROM file and SMS.DLL is your file.
It seems that the original sms.dll is in use (sms are sent and received as usual) but the problem is that total commander now refuse to delete, rename or overwrite both sms.dll and SMS.DLL Never saw something like that!
For the moment I'm stuck, I do not know how solve this situation and can not do more tests on your hack
oruam57 said:
Something very strange happened!
I used total commander to overwrite the sms.dll in ROM with your sms.dll, then I soft reset and all started right, including manila.
I was surprised so I listed the windows directory using total commander and there were a sms.dll (lower case) and a SMS.DLL (upper case)! From dates and attributes it seems that sms.dll is the original ROM file and SMS.DLL is your file.
It seems that the original sms.dll is in use (sms are sent and received as usual) but the problem is that total commander now refuse to delete, rename or overwrite both sms.dll and SMS.DLL Never saw something like that!
For the moment I'm stuck, I do not know how solve this situation and can not do more tests on your hack
Click to expand...
Click to collapse
you can use sktools to recover the rom files (replaced rom files).
drizztje said:
you can use sktools to recover the rom files (replaced rom files).
Click to expand...
Click to collapse
Ok, crisis solved (sktools did not see the "double" file but I found a procedure with total commander), back to work.
After overwriting sms.dll with your sms.dll and renaming the dump of my original sms.dll to sms_orig.dll I soft resetted.
As expected manila refused to load. Then I run tmail.exe and sent a test sms. Unfortunately nothing happened. I also consulted my voipbuster log and no sms activity was present.
oruam57 said:
Ok, crisis solved (sktools did not see the "double" file but I found a procedure with total commander), back to work.
After overwriting sms.dll with your sms.dll and renaming the dump of my original sms.dll to sms_orig.dll I soft resetted.
As expected manila refused to load. Then I run tmail.exe and sent a test sms. Unfortunately nothing happened. I also consulted my voipbuster log and no sms activity was present.
Click to expand...
Click to collapse
strange, did you double check the registry values? And what if you disable manila, soft-reset, and send an sms using tmail.exe? I see people writig about htc sms bug, there is even a hotfix for it, perhaps related to your problem.
drizztje said:
strange, did you double check the registry values? And what if you disable manila, soft-reset, and send an sms using tmail.exe? I see people writig about htc sms bug, there is even a hotfix for it, perhaps related to your problem.
Click to expand...
Click to collapse
Rececked everything 2 times and disabled manila too but it does not work. With your sms.dll when I press send nothing happens and the sms is not sent on IP and on GSM either. It seems there is definitely some incompatibility with my phone. What a pity
oruam57 said:
Rececked everything 2 times and disabled manila too but it does not work. With your sms.dll when I press send nothing happens and the sms is not sent on IP and on GSM either. It seems there is definitely some incompatibility with my phone. What a pity
Click to expand...
Click to collapse
sorry about that. It used to work with my Xperia X1, and it works with my HD2 also. I really don't know why it doesn't work for you.
drizztje said:
try this one. you need to set option=4 in the registry.
Click to expand...
Click to collapse
Hi again drizztje, sorry for my late answer, been busy with other things. Thanks for this "new" version with a fourth option, i have just one finale question before i implement this dll in my HD2 will this work with HTC messaging or do i have to go back to the native Windows Mobile messaging?

[PROJ] Prescription Medicines Manager v0.9.0 17-03-2011

This app is designed so that you can keep track of any medications you take on a regular basis.
When you last ordered a particular drug, how many you currently have to hand, which surgery the repeat was requested from and which pharmacy filled the prescription.
It is designed to be used for multiple patients, surgeries, pharmacies and doctors.
It was initially an Access database but I thought that migrating it to my PPC was a challenge I might be able to complete.
There will also be the ability to log doctor's appointments as well, hopefully.
All data is currently stored in an SQL-CE database.
For reasons I am currently trying to solve, when you open any secondary form with a data table and then return to the main menu you are unable to go back into any other form again.
Changed to a tabbed layout, screen shots attached.
09/02/2011
New version attached with new format SQLCE.
17-Mar-2011
Latest version attached
All data entry and editing working - I hope.
08-Apr-2011
Latest version, autoscroll and popup SIP.
Possible dependant files.
I am coding for CF2.
[Reserved] - For Comments
deedee said:
[PROJ] Prescription Medicines Manager
...medications you take on a regular basis.
When you last ordered a particular drug, how many you currently have to hand, which surgery the repeat was requested from and which pharmacy filled the prescription...
Click to expand...
Click to collapse
Thank you!
These records can be life-saving if you have them with you at the right time. I have tried many systems of keeping track, but rarely managed to have anywhere close to this much information on hand.
I have not had time to try it out properly so I do not yet have any comments or suggestions. For now, I just wanted to say THANKS!
Glad it's going to be if use to someone.
Hopefully by the end of tonight I will have a new version up with the ability to add records to each of the tables. No interlinking yet and at the moment editing is also broken but I am getting there.
deedee said:
Glad it's going to be if use to someone.
Hopefully by the end of tonight I will have a new version up with the ability to add records to each of the tables. No interlinking yet and at the moment editing is also broken but I am getting there.
Click to expand...
Click to collapse
Don't feel rushed on my account. It's great that you're interested in this project, whenever you finish will be soon enough.
Meanwhile, I'll play with it and start planning how to "feed" it my information.
Have you considered some sort of encryption? It just occurred to me that it will hold a lot of very personal information.
Again, thank you.
deedee said:
...at the moment editing is also broken...
Click to expand...
Click to collapse
I know next to nothing about programming, but would the PC editor you wrote for the W Watcher calc work for this project? That might make it easier for the user to input the information AND save you some programming...
(BTW: I was very impressed with how quickly you developed those applications! Very usable and no charge for fast delivery!)
Jesterfell said:
I know next to nothing about programming, but would the PC editor you wrote for the W Watcher calc work for this project? That might make it easier for the user to input the information AND save you some programming...
(BTW: I was very impressed with how quickly you developed those applications! Very usable and no charge for fast delivery!)
Click to expand...
Click to collapse
Unfortunately the WW editor is designed for an XML file and this app keeps everything in an SQLCE database. I am trying to find a nice, useable and, more importantly, free desktop app to edit these files and am trying a couple out at present.
While a purely PC based editor would be easier from a WM coding point it would stop the app being completely mobile and standalone.
New version added to post 1.
You can now add records.
For desktop managemnent try
SQLCE Desktop Manager
FlyHoward SDF viewer
Neither of these seem to be free though the second one does have a 14 day trial.
deedee said:
... While a purely PC based editor would be easier from a WM coding point it would stop the app being completely mobile and standalone...
Click to expand...
Click to collapse
Of course!
Sorry, I got tunnel vision and forgot the project's purpose.
What am I missing?
I have been unable to run Prescription Medicines Manager on my HTC 8925 (Kaiser) with WM 6.5.x.
When I run the EXE all that happens is that the WM wait animation plays indefinitely until I switch to another application.
Since I play with this phone a lot, I hard reset it to clear any lingering results of my modding (it's a spare phone, so no great loss). Before installing other programs, I ran PMM again, but the same thing happened.
I got the same results with an even older HTC phone running WM 6.1.
SQL desktop applications
I found some free SQL desktop apps. I was only able to get one, SdfBrowser, to read MedicalRecords.sdf and all it allowed was viewing the structure and creating a query.
I'll keep looking, but I agree with you that being totally portable is very important for this project.
LINKS: SdfBrowser --- Resources link
Jesterfell said:
I have been unable to run Prescription Medicines Manager on my HTC 8925 (Kaiser) with WM 6.5.x.
When I run the EXE all that happens is that the WM wait animation plays indefinitely until I switch to another application.
Since I play with this phone a lot, I hard reset it to clear any lingering results of my modding (it's a spare phone, so no great loss). Before installing other programs, I ran PMM again, but the same thing happened.
I got the same results with an even older HTC phone running WM 6.1.
Click to expand...
Click to collapse
Completely forgot to say, you will need to install SQL CE on your HTC.
I do not usually resort to smileys, but my lack of knowledge is frustrating!
deedee said:
Completely forgot to say, you will need to install SQL CE on your HTC.
Click to expand...
Click to collapse
I installed SQL CE with no errors but got the same lack of results. The phone did become VERY sluggish and Task Manager still showed "prjMedicalRecords" running as a process.
Does prjMedicalRecords.exe need to be installed?
I just executed it from the SD card, and then tried it from the device memory. I placed MedicalRecords.sdf in the same directory each time.
Update: After about 5 min of the WM wait animation spinning, got the following error message:
"File or assembly name 'System.Data.SqlServerCe,Version 3.0.3600.0, Culture=neutral, PublicKeyToken=3BE235DF1C8D2AD3', or one of its dependencies, was not found."
I opened the SQL CE .CAB file and it DOES contain "system.data.sqlserverce.dll" it is meant to be installed to "%InstallDir%" and the rest of the DLLs go to "%InstallDir%\v3.5". I used file explorer to look in those directories (%InstallDir%="Microsoft SQL Server Compact Edition") but did NOT find "system.data.sqlserverce.dll" in either dir.
I copied the DLL to "%InstallDir%\v3.5" and ran the program again. The same results occurred.
After soft reset, copied the DLL to "%InstallDir%" and ran PMM again. The same thing happened, long wait, then error msg.
I am falling asleep now, but will try re-installing .NET 3.5 and running PMM again. I'll let you know what happens.
I had gotten the same error before installing SQL CE but did not connect the error to PMM so I ignored it. This time nothing else was happening on the phone.
Apologies for not giving the initial steps, I am new to development and forget others need to be given the assumptions.
SQLCE needs to be installed, as you have done. PMM is just an exe, copy it to the device.
PMM and the SDF file need to be placed in \Program Files\prjMedicalRecords on the device itself. At the moment this location is hard coded and is on my list of things to do to make it "moveable". HTH
New version in post 1 that is now independent of location, just make sure both exe and SDf are in thhe same place.
deedee said:
New version in post 1 that is now independent of location, just make sure both exe and SDf are in thhe same place.
Click to expand...
Click to collapse
Sorry, Deedee. It still does the same thing.
.1. I put both files in device memory (just in case): \Program Files\prjMedicalRecords\
.2. Tried to re-install NET framework 3.5--it refused to install in either device or card memory, saying the same version was already in ROM.
.3. Re-installed sqlceppcwce5armv4i.cab
.4. Ran prjMedicalRecords.exe
After the same delay, it gave the same error.
It also gave a NET error that, because of the delay between program launch and errors, I did not associate with Medical Records before, but it only occurs after I have launched prjMedicalRecords.exe:
"The application failed to load required components. If the .NET Compact Framework is installed on a storage card, please ensure that this card is in place and launch the application again. If this fails, a re-installation of .NET compact Framework is recommended. Support info: -2147483643 (80000005)"​
Thank you for your continued interest.
Not sure what the error is pointing to but I am coding for .Net CF v2, CAB in post 2, try installing this.
OK, finally tried this on a virgin device, without using the "debug" option in VS2005 to copy the files and discovered that .NET CF2, along with SQLCE 3 and SQL CE 3 replication is needed.
All CABs are in post 2.
There is a new version hopefully out this weekend with the ability to log patient medications and doctors appointments.
Editing is still on the road map, as is deletion.
New version in post #1, CAB format as well.
Make sure all the dependencies are installed, for me this has been .NET CF2 and the SQLCE cabs.
There are bugs I am aware of but please list anything and everything. As this is my first real App any feedback is welcome.

HTC regedit app using COMRegRW.dll that works in Mango

Has anybody written one? I've seen lots of apps that include this binary, but they all use provisioning for registry writes and a homebrew WinCE DLL for registry reads. That's great, except that in Mango you can't use the homebrew DLLs anymore.
I'd like to write an app that can read and write specific values (the signed DLL doesn't appear to support browsing). The catch is, of course, no dependency on unsigned native code.
If somebody has already written an app or library that does this, and doesn't mind sharing the code (I'll open anything I write with it, of course) that would be awesome.
hm you don't need provisioning for registry editing with this HTC DLL, I think. The DLL provides functions that enable you to edit/read registry entries. The provision part is used for this provider specific configurations.
And there should be a way to use these homebrewn registry editors to use in Mango. People around here report that they installed the apps while running NoDo and then using Ansars method to upgrade to Mango. But unfortunately it didn't worked for me so far
If somebody is intrested we can make a port of our app (which generates on device provxml files) available for htc devices. Ill need somebody to help me out with some testing. It works already on samsung devices on mango, file operations and stuff.
i just need to know where the provxml needs to be installed to and i think we can find a way to make it work.
Pm me if you are intrested.
Marvin_S said:
If somebody is intrested we can make a port of our app (which generates on device provxml files) available for htc devices. Ill need somebody to help me out with some testing. It works already on samsung devices on mango, file operations and stuff.
i just need to know where the provxml needs to be installed to and i think we can find a way to make it work.
Pm me if you are intrested.
Click to expand...
Click to collapse
Let us talk about that when the Samsung version is finished. I also have a HD7.
The problem is that the HTC Connection Setup deletes the custclear.provxml file after executing...
Have a nice day.
contable said:
Let us talk about that when the Samsung version is finished. I also have a HD7.
The problem is that the HTC Connection Setup deletes the custclear.provxml file after executing...
Have a nice day.
Click to expand...
Click to collapse
yes i have heard. I think we can solve this by adding a copy command to replace itself again? If we are lucky this might work. Otherwise we have to look for file transfer tools. Thank you haha i will, talk to you tomorrow.
In theory will work but once ran connection setup in mango file transfer is available via touch explorer.
Sent from Ant's HTC Mozart using XDA Windows Phone 7 App
yes, file transfer should work, if you installed the tools before the mango update. However for newer phones that do not have NoDo firmware this won't be possible anymore :/
@rudelm: That's the point of my question. I know that the HTC DLLs supposedly allow registry access, the problem is I've never seen a working example, and my skill with COM is crap.
@Marvin_S: That's a cool idea, and I can show you how to make it work even easier on HTC (I've written apps in the past that used XML provisioning on HTC; you don't even need to use Connection Setup since we have a Mango-compatible DLL to do it). The catch is that you can't use them to *read* values.
Also, I've already tried chaining the CustClear.provxml file using Connection Setup. It doesn't work - I think the file gets deleted at the end, not the start. However, HTC has a working filesystem DLL that allows moving files anyhow, so not that important. It's the registry I'm concerned about right now.
Again, if anybody has an example of working code using a ComRegRW DLL from an HTC app, please let me know!
GoodDayToDie said:
@rudelm: That's the point of my question. I know that the HTC DLLs supposedly allow registry access, the problem is I've never seen a working example, and my skill with COM is crap.
It's the registry I'm concerned about right now.
Again, if anybody has an example of working code using a ComRegRW DLL from an HTC app, please let me know!
Click to expand...
Click to collapse
It's actually simple, if you use another library here from XDA. Its called NativeLibrary and was made bei (nico)
With his code I was able to access the registry to change an entry. Basically it looked like this:
Code:
// check for HTC Device
bool isHTC = false;
isHTC = Device.IsHTC();
if (isHTC)
{
Device.Registry.SetStringValue("HKLM", "Software\\HTC\\HTC_Weather", "AppVersion", "1337");
contentTextBlock.Text = Device.Registry.GetStringValue("HKLM", "Software\\HTC\\HTC_Weather", "AppVersion");
//NativeHTCFileSystem.Init();
//NativeHTCFileSystem.GetFileSize("/My Documents/Explore Excel.xlsx", out fileSize);
}
else
{
contentTextBlock.Text = "Found no HTC Device :D";
}
He wrote a wrapper for different devices and included most of their dll files, so you don't have to handle the COM part. This is what I'm trying to understand next... But I bet its really ugly I never got the COM part running just by looking at reversed HTC or Samsung XAPs and I am still wondering how (nico) did it, but anyways: he helped me a lot with his source
If you put this code into a button listener, you need to push the button two times to display the new registry value as my textbox did not get refreshed. But thats the smallest problem here
It's not that difficult actually if you know C++, COM, and .Net COM Bridge.
There is nothing here specific to Windows Phone, it's all pretty standard stuff.
BTW, this is not how you should use my lib, as it is supposed to handle the device check for you.
I've not updated this for a long time, so I don't think it work on LG nor Mango.
Here is an example:
Code:
var registry = NativeLibrary.Device.Registry;
var currenttheme = registry.GetStringValue("HKLM", @"ControlPanel\Themes", "CurrentTheme");
GoodDayToDie said:
@rudelm: That's the point of my question. I know that the HTC DLLs supposedly allow registry access, the problem is I've never seen a working example, and my skill with COM is crap.
@Marvin_S: That's a cool idea, and I can show you how to make it work even easier on HTC (I've written apps in the past that used XML provisioning on HTC; you don't even need to use Connection Setup since we have a Mango-compatible DLL to do it). The catch is that you can't use them to *read* values.
Also, I've already tried chaining the CustClear.provxml file using Connection Setup. It doesn't work - I think the file gets deleted at the end, not the start. However, HTC has a working filesystem DLL that allows moving files anyhow, so not that important. It's the registry I'm concerned about right now.
Again, if anybody has an example of working code using a ComRegRW DLL from an HTC app, please let me know!
Click to expand...
Click to collapse
This would be nice. Do you know if there is a similar .dll for samsung? So we will not have to go into the diagnosis menu everytime?
@Marvin_S: Yes, there's a similar app for Samsung - there's already a Samsung registry editor that works with Mango. It's nto a registry *browser* of course, but it can do read and write. I used it (at least, the writing portion) in my IE Search Switcher app too.
(nico) said:
BTW, this is not how you should use my lib, as it is supposed to handle the device check for you.
I've not updated this for a long time, so I don't think it work on LG nor Mango.
Here is an example:
Code:
var registry = NativeLibrary.Device.Registry;
var currenttheme = registry.GetStringValue("HKLM", @"ControlPanel\Themes", "CurrentTheme");
Click to expand...
Click to collapse
Ah ok, that looks better
I'm currently setting up my VM to look into this c++ and com things, but I guess its more complicated than I thought. You've got some links to help me here getting started for WP7?
@Marvin_s: there are the XAP packages of Samsungs apps here on XDA. You can just rename the files to zip and unpack. Then you will have the Samsung specific DLLs

Categories

Resources