Hi all,
I'm trying to fix up a long standing timezone issue with KingFetty's CallCalendar - but there seems to be some WEIRD **** happening with DST time...
At the moment, the code works perfectly - however the call gets logged to the calendar with a start time and end time of 1 hour behind the current device time.
This gets weirder when you add a line like this to the start of the program:
msgbox(Now)
The time shown on the messagebox is 1 hour behind what is shown on the clock :|
My idea was to add the following block of code to the FixTime function to try and fix this:
Dim localZone As TimeZone = TimeZone.CurrentTimeZone
If localZone.IsDaylightSavingTime(StartTime) Then
StartTime = StartTime.AddHours("1")
StopTime = StopTime.AddHours("1")
End If
This is all well and good, however IsDaylightSavingTime returns false! Oh joy.
Has anyone run across the VS strangeness with timezones and daylight savings before?
I have attached the current source to this post for budding VB.Net hackers...
Ok - so I managed to find the problem... It looks like after installing the March 2008 Daylight Savings updates, for my particular timezone you need to change to a different timezone, then switch back to the correct timezone for the registry changes to be applied.
Weird behaviour for this kind of thing as multiple hard resets, soft resets, and power off/on reboots didn't have this effect.
This leads me to believe it's a WM issue. Anyone got any ideas on how to fix this properly?
You will have better luck if you post in the appropriate section of the forum. There is a ''Question and Answers'' section to XDA. This section of the forum hereis for posting completed applications, themes, etc.
erm this is a Question Regarding the Development, so i guess it should stay here
I'm not really sure what's your problem but I exprerienced some issues when I had to deal with timezones. This is what helped me:
Code:
System.Globalization.CultureInfo.CurrentCulture.ClearCachedData();
I've sent the following to MS - as it's quite strange behaviour!
I have run some test with the following simple application:
------------------ Start Sample Code ------------------
Imports System.TimeZone
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim localZone As TimeZone = TimeZone.CurrentTimeZone
MsgBox("Time = " & Now & vbCrLf & "StandardName = " & localZone.StandardName & vbCrLf & "DaylightName" & localZone.DaylightName & vbCrLf & "IsDaylight? = " & localZone.IsDaylightSavingTime(Now))
Me.Close()
End Sub
End Class
------------------ End Sample Code ------------------
On freshly booting the Windows Mobile device, I get the following output:
Time = 17/12/08 6:05:20 PM
StandardName =
DaylightName =
IsDaylight? = False
The clock on the device shows 7:05pm when this test was run.
I change the timezone to +10 Brisbane, Click OK, then click Yes to save the changes to the clock.
I then change the timezone back to +10 Sydney, click ok, then click yes to save changes to the clock.
Upon running the sample code above again, I get the following output:
Time = 17/12/08 7:07:38 PM
StandardName = Sydney Standard Time
DaylightName = Sydney Daylight Time
IsDaylight? = True
The clock on the device showed 7:07 PM at the time of this second test.
To me it seems that on boot, the timezone just isn't set - which is just weird!
Click to expand...
Click to collapse
Related
I am sure this question has been asked and answered many times. However a simple search of my subject line in 'programmers corner' yeilds no results.
How is it possible to obtain the signal strength at the current time?
Thanks, Ben.
In reply to my own message, a quick hack at the ril.h and I have a solution to getting the signal strength. My apologies to the authors of ril.h, and thanks to IP Dashboard for unknowingly providing the calibration.
If anybody want to use this, and until such time as the correct solution is published, this is a hack which works.
Beware, possible bug with rill.dll?? When connected to GPRS, the signal strength is always returned as 69% (183) ???
In ril.h add the following structure:
typedef struct {
DWORD dwUnknown1;
DWORD dwUnknown2;
unsigned char ucSignalQuality;
} RIL_SIGNAL_QUALITY;
And uncomment / adjust the definition of RIL_GetSignalQuality to:
HRESULT RIL_GetSignalQuality(HRIL lphRil);
Add a couple of global variables:
DWORD m_dwSigQuality = 0;
HRESULT m_dwSigQualityID = 0;
Edit the ResultCallback to include this code:
if (hrCmdID == m_dwSigQualityID) {
if (dwCode == 1) {
RIL_SIGNAL_QUALITY *data;
data = (RIL_SIGNAL_QUALITY *)lpData;
m_dwSigQuality = (data->ucSignalQuality == 255)
? 0
: (data->ucSignalQuality * 9 / 7) - 166;
} else {
m_dwSigQuality = 0;
}
m_dwSigQualityID = 0;
}
Add your own method to get the signal strength:
void OnButSigStrengh()
{
m_dwSigQuality = 0;
m_dwSigQualityID = RIL_GetSignalQuality(g_hRil);
int iTimeout = 100;
while (m_dwSigQualityID && iTimeout--) Sleep(10);
CString s;
s.Format(TEXT("Signal Strength = %u%%"), m_dwSigQuality);
MessageBox(s);
}
Which should work.
Ben
Ben -
Nice work -- the code snippet you posted is more or less what we did to get signal strength up and running in IP Dashboard -- of course, I had to do the calibration manually by walking around New York City while a test app spit out readings from the SignalStrength function and I looked at the signal bars, but hey, it was fun. I don't visit often or I would have responded sooner.
Here are the calibration readings we use:
#define ID_PHONEINFO_SIGNALSTRENGTH_POOR 0x80
#define ID_PHONEINFO_SIGNALSTRENGTH_FAIR 0xa1
#define ID_PHONEINFO_SIGNALSTRENGTH_GOOD 0xad
#define ID_PHONEINFO_SIGNALSTRENGTH_EXCELLENT 0xbb
#define ID_PHONEINFO_SIGNALSTRENGTH_NOSIGNAL 0xff
Regards,
Noah
Hudson Mobile
(makers of IP Dashboard)
Hey Noah, you know a very good addition to your program could be.
In the same way that you have that "floating" network icon, that you can position it on top or the bottom, (you even provide exact location on top, which I find it pretty useful). You should make another icon for the signal, just like the one from the phone, but the advantage is that yours can hold any skinning done in the phone. I have tried PocketBlinds, Facelift and others and your Network icon stays where it should, whereas the radio signal icon stays behind the skinning. and the option of making this icon show at the bottom, makes it even better, some people (like me) prefer seeing the icons at the bottom and not on top. This would make a great addition for your program and would make a killer app. Well, that and the addition also of a battery metter
By the way, if you need any kind of help designing the icons let me know, I would like to help
Yorch --
I saw your post at Wormhole Creations' website as well -- my apologies for not writing back, we are putting together our next product right now (tracker for phone voice minute usage) and things are hectic.
There is special code in IP Dashboard to make sure the taskbar icon floats above a skinned interface - we could potentially add a signal strength icon as well. Coincidentally, we really need ICON design help. If you are willing to design some cool icons for signal strength, I think we could probably work it into the product without too much difficulty over the next 1-2 releases. Let's take this to email -- I can be reached at nbreslow AT hudsonmobile.com
As for the Battery meter, we want to keep the product focused, but a simple battery meter function (line item that read: Battery X%) would be pretty easy to add as well.
Thanks for your interest and suggestions,
Noah
Hudson Mobile
Guys - Try Phone Dashboard, a Today Plug-in - Part of it polls real-time signal strength and displays it in percentage terms - v.Useful if you need a real validation of the Signal Strength bar.
Ben
How you getting on?
Drop me a mail...
Hello, the code above works like a charm!
I have however a side-effect: the radio icon on the top bar seems to indicate that the radio is off (I cannot receive calls) when I run the program. A couple of minutes after I close it, it goes back to normal.
This is my initialization line:
res = (*fpTAPIrilInit)(1, AsyncCallBack, NotifyCallBack, RIL_NCLASS_MISC, 0x55AA55AA, &hRil);
Any thoughts?
Many thanks for the help!
why cant ppl just post source codes it would be sooo much helpfull !!!
It need to get signal strength on my Universal, too. So
does it work with on HTC Universal with new WM 6 ?
thanks,
Hi,
I am having problems with keeping my application alive as the pda keeps going into 'sleep' mode. I realise that i can't just keep the pda switched on as the battery will just die, so i have a little program which does a RunAppAtTime call, and then checks to see if my application is alive. I expected that i would either have an error or would get a process id of -1 etc if the process wasn't alive. I am using VB.net and OpennetCF to do the code here is a code snippet. Hope someone can help, i need to finish this before friday.
Dim intProcessID As Integer
Dim Process As New OpenNETCF.Diagnostics.Process
Dim NewProcess As OpenNETCF.Diagnostics.Process
Dim info As New OpenNETCF.Diagnostics.ProcessStartInfo
Dim OldProcess As New OpenNETCF.Diagnostics.Process
Try
intProcessID = ReadID()
ldProcess = OpenNETCF.Diagnostics.Process.GetProcessById(intProcessID)
If (OldProcess.Id = -1) Or (OldProcess.Id <> intProcessID) Then
info.FileName = "\Storage\AutoSync.exe"
info.UseShellExecute = False
NewProcess = Process.Start(info)
intProcessID = NewProcess.Id
WriteProcID(intProcessID)
Else
WriteFile("Processexists" & DateTime.Now)
End If
Hi everybody. Those of you who have windows mobile SE might miss the good old start menue from first edition featuring more links than the new one. The old version had those tiny little symboles at the very top. Far more handy than these big "last used" symbols now from my poit of view.
Perhaps one reason of this restructure is the landscape mode. Here the "last used" symboles become the litte symboles ontop like in first edition.
now wouldn't it be nice if you could also define the lower sectioin of the menue with permanent links in stead of these changing ones?
So far I found out that the registry folder containing these shortcuts is to be found at: HKEY_CURRENT_USER\Software\Microsoft\Shell\TaskSwitch
(at least at my Himalaya).
Within here you got
(Default) (value not set)
"1"="\\Windows\\Startmenü\\Programme\\SlovoEd.lnk"
"0"="\\Windows\\Startmenü\\Programme\\Resco Registry.lnk"
"10"="\\Windows\\Startmenü\\Programme\\Spiele\\Jawbreake r.lnk"
"11"="\\Windows\\Startmenü\\Programme\\Astor.lnk"
"9"="\\Windows\\Startmenü\\Programme\\Internet Explorer.lnk"
"8"="\\Windows\\Startmenü\\Programme\\Messaging.lnk"
"7"="\\Windows\\Startmenü\\Programme\\Alex.lnk"
"6"="\\Windows\\Startmenü\\Programme\\Eval.lnk"
"5"="\\Windows\\Startmenü\\Programme\\Notizen.lnk"
"4"="\\Windows\\Startmenü\\Programme\\movianVPN.lnk"
"3"="\\Windows\\Startmenü\\Programme\\Sprite Backup.lnk"
"2"="\\Windows\\Startmenü\\Programme\\Suchen.lnk"
for example while values form 0 to 5 are the 6 items that are displyed.
Now changing a value to a link (.lnk) that is located in the windows/start menue/program folder and a softrest brings this new item up..
The only thing that one would have to do to permanently set one's links is to stop the device from changing that folder.
unfortunatelly I have no idea how to do that... maye sombody of you can help?
Thanks alot
Alex
I've tried everything. Delete single values within taskswitch. delete taskswitch...
I added Dwords to Shell and taskswitch as follows:
NoRecentTaskHistory = 1
NoRecentTaskSwitch = 1
NoRecentTaskSwitchHistory = 1
NoTaskHistory = 1
NoTaskSwitch = 1
NoTaskSwitchHistory = 1
non of them works.
Actually I'm not into inventing new regestry vlues.
Perhaps someone of you knows...
Thanks a lot. I think a lot of people would appreciate this.
Greets Alex
Switched from a SX66, on my second 8125. Both have been incredibly slow loading programs, switching between screens etc. 20 - 60 second waits. Phone is great when works. Must soft reset multiple times a day.
I use 10,000+ contacts and XpressMail, small amount of tasks and calendar, that is it. No third party programs.
Any ideas on how to speed this thing up?
Thanks :x
Shikaza said:
Switched from a SX66, on my second 8125. Both have been incredibly slow loading programs, switching between screens etc. 20 - 60 second waits. Phone is great when works. Must soft reset multiple times a day.
I use 10,000+ contacts and XpressMail, small amount of tasks and calendar, that is it. No third party programs.
Any ideas on how to speed this thing up?
Thanks :x
Click to expand...
Click to collapse
Cingular's stock ROM is way slow, locks ups and needs frequent reboots. All of the ROM upgrades here have been better than what came on the phone. Right now summiter's efforts seem to be most beneficial to us Cingular owners. And you're in for a treat 'cause he figured out how to go back to the original if needed...
http://forum.xda-developers.com/viewtopic.php?t=45295&sid=727e629b43f777a20432ce85b54b7027
How I was of some help!
Steven
btw, love my SX66 BA .... now the wife is using it.
ROM version: 2.17.7.2 WWE
ROM date: 2/10/06
Radio version 02.07.10
Protocol version: 413.1.03
How do I access FTP?
hit link and did not work. Is it possible my norton is blocking?
Re: How do I access FTP?
Shikaza said:
hit link and did not work. Is it possible my norton is blocking?
Click to expand...
Click to collapse
Maybe... I just tested the link and it's OK. Change over to the Wizard upgrading etc forum and look for Cingular 8125 users: 2 custom RUU upgraders available .
Good luck!
Quick solution is to hard reset and then soft reset before Ext rom loads. You have to then manually load XpressMail, but speed is now much better.
I am having some bluetooth disconnect issues, still need to figure that out. Was working fine with cingular ext rom.
Any ideas?
xpressmail blows. too bad you need to use it. as for speed-tweaks, here's a list of reg-edits that includes a few that keep my c8125 moving at a decent pace while i wait for a cingular 2.xx rom update.
Show today's and the next day's Calendar appointments on Today plugin
HKEY_LOCAL_MACHINE\Software\Microsoft\Today\Items\Calendar\Flags
Change to:
0 = Show all today's upcoming appointments
1 = Show all today's upcoming appointments and today's "all day" event
2 = Show only next appointment
3 = Show only next appointment and today's "all day" event
4 = Show all today's upcoming and all tomorrow's appointments
5 = Show all today's upcoming and all tomorrow's appointments and
today's "all day" event
--------------------------------------------------------------------
Disconnect button and connection timer for GPRS:
HKEY_LOCAL_MACHINE\ControlPanel\Phone
- Create new dword value
- Change the value name to "Flags2" (no quotes).
- Select the 'hexidecimal' button.
- Type 10
- Click ok.
- You should now see in the 'name/data' section:
- Flags2 16 (0x000010)
--------------------------------------------------------------------
Cleartype in landscape mode
[HKEY_LOCAL_MACHINE\System\GDI\ClearTypeSettings]
"OffOnRotation"=0
--------------------------------------------------------------------
Increasing font cache and screen performance:
"HKEY_LOCAL_MACHINE\SYSTEM\GDI\GLYPHCACHE"
Change "limit" from "8192" (default) to "16384"
--------------------------------------------------------------------
Increase general performance:
"HKEY_LOCAL_MACHINE\System\StorageManager\FATFS\"
Change "CacheSize" value from "0" to "4096" or "8192" or "16384"
"HKEY_LOCAL_MACHINE\System\StorageManager\FATFS\CacheSize=0x1000(4096)"
Change "EnableCache" value to "1"
"HKEY_LOCAL_MACHINE\System\StorageManager\Filters\fsreplxfilt\"
Change "ReplStoreCacheSize" value to "4096" or "8192" or "16384"
--------------------------------------------------------------------
CAPS/ICON LOCK INDICATOR
Inside \Windows\Startup folder is a shortcut to an application called
CapNotify.exe. There is registry key called "EnableIndicator" which
was not found in the registry. Tapping the Shift key shows "C" while
tapping Dot key shows dot indicator next to keyboard icon at bottom
of screen.
- HKEY_CURRENT_USER\ControlPanel\Keybd\
- New DWORD value
- Value name: EnableIndicator
- Value date = 1
--------------------------------------------------------------------
Change .pdf default association from Clearvue to Adobe Acrobat Reader
2.0 Mobile
HKEY_CLASSES_ROOT\pdffile\shell\open\command\Default = WTCVPDFV.exe "%1"
To “\Storage Card\Program Files\Adobe\Acrobat 2.0\Reader\AcroRd32.exe” “%1”
HKEY_CLASSES_ROOT\pdffile\shell\opendoc\command\Default = WTCVPDFV.exe "%1"
To AcroRd32.exe “%1”
((HKEY_CLASSES_ROOT\pdffile\shell\
You'll find two sections...
HKEY_CLASSES_ROOT\pdffile\shell\open\command\Default = WTCVPDFV.exe "%1"
And
HKEY_CLASSES_ROOT\pdffile\shell\opendoc\command\Default = WTCVPDFV.exe "%1"
Change both to point to the adobe reader .exe location. If you don't
know its location, find out through explorer/total commander/whathaveyou.))
--------------------------------------------------------------------
Registry location
HKCU\Software\Microsoft\Internet Explorer\Main\FavoritesEntries\
contains the default Internet Favorites that can't be removed from within
Internet Explorer Mobile. Delete them manually in the registry instead.
--------------------------------------------------------------------
Clear Start Menu Items
Modify this registry values:
[HKEY_CURRENT_USER\Software\Microsoft\Shell\TaskSwitch]
"0"=" " "1"=" " "2"=" " "3"=" " "4"=" " "5"=" " "6"=" " "7"=" " "8"="
" "9"=" " "10"=" " "11"=" " All done!
--------------------------------------------------------------------
--------------------------------------------------------------------
With the dot11SupportedRateMaskG set to 8, connect to 54 mbps. With default
key value of 4, connect at 24 mbps.
HKEY_LOCAL_MACHINE\COMM\TNETWLN1\PARMS
- dot11SupportedRateMask=1
HKEY_LOCAL_MACHINE\COMM\TNETWLN1\PARMS
Change from dot11SupportedRateMaskG=4 (default) to dot11SupportedRateMaskG=8
--------------------------------------------------------------------
Voice command dialing by pushing button on a bluetooth headset:
Key: HKEY_LOCAL_MACHINE/Software/OEM/VoiceCommand/
Change value to: \Program Files\Voice Command\voicecmd.exe
--------------------------------------------------------------------
Turn On GPS Application
Go to: HKEY_LOCAL_MACHINE\ControlPanel\GPS Settings
Delete the DWORD marked “redirect”
Add a DWORD called "Group" and give it the value of "2" (dec)
The GPS panel will now show up in your connection settings
--------------------------------------------------------------------
Network Time Update (not working with current rom)
HKEY_LOCAL_MACHINE\SOFTWARE\OEM\PhoneSetting
Set "ShowTimeZonePage" to "1"
Once this is set, and you have power-cycled, when you go into
Settings->Phone you will see a new tab - "Time Zones". Go there
and you'll see "Automatic change time zone and clock". Check it
for your time updates from the network.
--------------------------------------------------------------------
Can anyone tell me what "exactly" HTCColdBoot.exe does on a cold boot? Copies files? Runs provxml's? I'm trying to troubleshoot a homescreen layout issue that only occurs after HTCColdBoot.exe runs on my Cavalier.
Thanks in advance.
This is the best explanation I have seen floating around. It is here in one of the threads, but this excerpt is taken from Willem Jan Hengeveld aka Itsme.
this is a description of all the files which are relevant to coldbooting a windows ce device.
databases, filesystem, and registry are initialized by filesys.exe based on the following config files
default.fdf
this is the registry information, as generated by regcomp.exe from the platform builder.
struct header {
DWORD signature; // 0x1d8374b2
DWORD size; // size of entire file
struct entry entry[];
};
struct entry {
WORD entrysize;
WORD entrytype; // 1 = path, 2 = key,value pair
union {
struct pathentry;
struct keyvalentry;
};
};
struct pathentry {
WORD hive; // 0 = HKCR, 1 = HKCU, 2 = HKLM
WORD pathlen; // in nr of wchars
WORD zero; // always 0 !!! this field is not present in wince4.x
WCHAR path[];
};
struct keyvalentry {
WORD valuetype; // 1 = string, 2 = empty, 3 = binary, 4 = dword, 7 = wbinary
WORD keysize; // in nr of wchars
WORD valuesize; // in bytes
WCHAR key[];
BYTE value[];
};
key/path size is including terminating NUL
the key 'Default' is the '@' default key.
initdb.ini
this initializes all databases
initobj.dat
this initializes the filesystem
calibrate + cut-paste tutorial
the program that does this is 'welcome.exe'.
initobj.dat contains a line that links 'welcome.lnk' into the startup folder. causing it to run as soon as the shell starts up.
welcome.exe deletes this link when it is finished
welcome.lnk contains 'MSWELCOME', which refers to the 'HKLM\SOFTWARE\Microsoft\Shell\Rai\:MSWELCOME' key in the registry, which points to "\Windows\Welcome.exe"
other things that welcome.exe does:
ImmDisableIME(0)
InitRichInkDLL
RegisterWindowMessage("SHWMappNotify")
ShowWindow("Taskbar", 0)
make \My Documents\Templates\*.psi, *.psw, *.xlt, *.pxt ro_hidden
for all in Comm\DefaultConnections, set ras some params
do more stuff to device.
pass 'defaultconfig.xml' to configmanager.dll
call method that does something with 'voicemail.lnk'
SHSipPreference(6)
load imgdecmp.dll
fload, coredll:2043
SHSipPreference(2)
ShowWindow(?, 1)
TouchCalibrate
ClockDll ...
run 'clocknot.exe' at later time.
deletelink
oeminfo.xml
contains public keys for HTC, and microsoft
.rgu files
since pocketpc 2003, many registry settings have moved from default.fdf to .rgu files. these files are processed by regupdater.exe, but I have not yet researched how and when exactly.
AutoConfig.exe
AutoConfig is loaded via a 'startup' item set by initobj.dat.
it locates the operator rom data, and presents a list of supported configurations found in the customtab.dat file.
Click to expand...
Click to collapse
GSLEON3 said:
This is the best explanation I have seen floating around. It is here in one of the threads, but this excerpt is taken from Willem Jan Hengeveld aka Itsme.
Click to expand...
Click to collapse
It's too bad that information (while good!) doesn't help him at all as it has nothing to do with htccoldboot.exe.. Notice the HTC in the file name ?
Htccoldboot.exe processes all provxml's among other things. So you assumed right You could try trimming them one by one, until your issue goes away...
NRGZ28 said:
It's too bad that information (while goog!) doesn't help him at all as it has nothing to do with htccoldboot.exe.. Notice the HTC in the file name ?
Htccoldboot.exe processes all provxml's among other things. So you assumed right You could try trimming them one by one, until your issue goes away...
Click to expand...
Click to collapse
Thats what I figured. Thanks. The main issue is that after about 10 minutes of "idle", you go back to the home screen and it's white saying "The layout cannot be loaded". Sometimes the Start menu will work so I can get back into Settings\Home Screen and change it. When I do, it comes back.
Any idea what can be affecting that? Happens with HTC Sliding Panels, regular Sliding Panels, and both CPR's. Also, regardless of what color "scheme" I choose. It's like there is some background service that times it out!?
Any ideas?