zbd
22nd June 2007 00:33 UTC
Passing space for a variable to use
Hi, I am wondering how I make sure my variable has enough space to store a 12 character code in. It appears that without giving it more space, it cuts off the last character of the code.
I am using the PPC-Registry plugin to read the value from the PDA's registry.
Thanks if anyone can help.
Anders
22nd June 2007 02:38 UTC
IIRC, the normal nsis build has a variable size of 1024 chars
zbd
25th June 2007 23:22 UTC
I think I have found where the problem is occurring.
It appears that the code is not being written properly by my application to the registry in the first place.
If I create the activation code manually it will work fine.
Perhaps the string isn't being null-terminated.
Thanks for all the help.
Afrow UK
25th June 2007 23:43 UTC
Yes possibly the plugin isn't taking into account that the string length needs to be 1 greater to add the null-terminator which is overwriting an existing character.
Stu
zbd
25th June 2007 23:53 UTC
Is there possibly a way I can tell the plugin how many characters to read?
Otherwise, I'm looking at the way we write to the registry with my application. So, I think this may be the only way to fix it if the plugin won't take another paramater.
Cheers
Afrow UK
26th June 2007 14:39 UTC
You really should contact the author of the plugin. Contact Instructor who should be able to help you.
Stu
zbd
26th June 2007 23:32 UTC
Thanks,
I have found a workaround for the meantime.
Using the same PPC-Registry plugin, I am able to Copy the code to a temp location, then at end of installation, copy it back, and delete the temp version.
Thanks for everyone's help on this issue.
Zbd