I have code like this which runs fine on windows 7…
TimeZoneInfo _timeZoneInfo = TimeZoneInfo.Local;
It doesn’t work on XP SP3. The error given is…
A first chance exception of type
‘System.EntryPointNotFoundException’
occurred in System.Core.dllAdditional information: Unable to find
an entry point named
‘GetDynamicTimeZoneInformation’ in DLL
‘kernel32.dll’.
Looking at the help for the function GetDynamicTimeZoneInformation I see that it’s only available on vista+
Any ideas?
If its not in XP, then you’re not going to be able to use it, and sadly it’s not just a case of copying a DLL over from a different box.
Can you use this method of getting the TimeZone ? MSDN says its supported in XPSP3 and higher: