Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

DateTime problems with WM 6.0

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support
View previous topic :: View next topic  
Author Message
Blaine Fields



Joined: 05 May 2008
Posts: 8

PostPosted: Sat Jul 19, 2008 3:03 pm    Post subject: DateTime problems with WM 6.0 Reply with quote

I use version 2.1.4 and have been reluctant to upgrad because I have modified and adapted the source code. The process works well for PDAs running WM 2003 and WM 5.0. However, I have run into a problem with WM 6.0.

The LicenseMonitor will correctly report on the initial use of my software that "you are on day 1 of the 30 day evaluation period." After closing the program and restarting, the LicenseMonitor.DaysInUse value is returned as "733242" and the LicenseMonitor.Invalid value is "true". This does not happen in WM 5 and lower installations so I am assuming it is a registry problem.

I'd like to avoid the hassle of dealing with upgraded code if at all possible. Can you suggest a modification to the current code to make it behave with respect to WM 6?

Thanks.
_________________
Blaine Fields
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Sun Jul 20, 2008 2:40 am    Post subject: Reply with quote

There have been a few fixes affecting EvaluationMonitor since 2.1.4 (see the Release Notes for details). I notice that you have deceided to upgrade - has this fixed the issue for you? If not let us know.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Blaine Fields



Joined: 05 May 2008
Posts: 8

PostPosted: Sun Jul 20, 2008 2:56 pm    Post subject: Reply with quote

I went ahead and purchased the upgrade anticipating that the fix would be more than a few tweaks. However, I did try to implement the UInt16 to Int32 changes for the SerialNo that I saw in the Release Notes and found that my license key had ballooned from 32 characters to 48, an undesirable result. So I returned the code to its original and decided to wait to see what you had to say about the problem.

If there is a discreet issue that can be corrected to insure access to the WM 6 registry, perhaps you could tell me what it is. It is interesting that the problem seems to be limited to the writing and/or reading of the DateTime information. Getting the check sum is not a problem so when the user enters the license key the program runs just fine which means that it is retrieving the check sum data from the registry without a problem.

Before I upgrade, any advice?
_________________
Blaine Fields
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Sun Jul 20, 2008 10:47 pm    Post subject: Reply with quote

Blaine Fields wrote:
However, I did try to implement the UInt16 to Int32 changes for the SerialNo that I saw in the Release Notes and found that my license key had ballooned from 32 characters to 48, an undesirable result. So I returned the code to its original and decided to wait to see what you had to say about the problem.


The changes to the SerialNo mentioned in the release notes only affect the method parameters - the serial number is still stored in the key as an unsigned 16 bit integer. So if your key has increased in size from 32 to 48 characters you must have changed some other parameters. If you generate keys using the default parameters in the License Key Generator you will see that the keys are still 32 characters long.

Quote:
Before I upgrade, any advice.

You can can just use the Version 3 source code for the EvaluationMonitor class (it is not dependant on any of the other code). This will allow you to find the issues with it without affecting your other code. If the invalid flag is being set it most likely means that an exception is occurring. If you can run the code and replicate the problem under the debugger then you could turn exception catching on and find out exactly where the problem is occurring.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Blaine Fields



Joined: 05 May 2008
Posts: 8

PostPosted: Tue Jul 22, 2008 10:52 pm    Post subject: Reply with quote

Thanks for the above, I'll check it out and see what I did.

Regarding the WM 6 problem, I have discovered what the problem really is and it is an odd one. Let me preface this by saying that I prefer a date format like DD MMM YY, so today's date is 22 Jul 08. When setting up my PDA test bed, I specify that format but also have to change the separator from a dash to a space. Follow so far? Instead of "22-Jul-08" I like "22 Jul 08."

In the GetDateData function called in the Evaluation Monitor the date of first use is obtained from the registry without a problem and the string looks like "19 Jul 08 17:51:28". Next the DataTime.Parse (dateString) function is called. It seems not to be able to parse that string. This is where the exception is thrown and the invalid parameter becomes true. However, and this is where it gets odd, if I change the PDA so that the dash is used as the separator, there is no problem parsing the SAME string. Note that the date string does not change, but somehow the DateTime parser works properly when the dash separator is specified even though there are no dashes in the date string.

Every now and then a user of my software will report that the evaluation period expires after the first use and this could be the reason. Any ideas?
_________________
Blaine Fields
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Tue Jul 22, 2008 11:10 pm    Post subject: Reply with quote

I think you will find that this issue has been fixed in Version 3 of the EvaluationMonitor code. The code now stores the date in an invariant culture format. Let us know how you go.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Blaine Fields



Joined: 05 May 2008
Posts: 8

PostPosted: Thu Jul 24, 2008 7:05 pm    Post subject: Reply with quote

Thnks so much for your patient help. Everything seems to be working now - and, while I didn't implement all of the updated code, I implemented enough to get rid of the OpenCF file which reduced the size of the compiled file by 75%.

Thanks again.
_________________
Blaine Fields
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group