"James Hawkins" truiken@gmail.com wrote:
Full rewrite. If you have any questions, I'll be happy to answer them.
Changelog * clean up cross-call functions
- strcpy(keyname, KEYSTR);
- strcpy(keyname + strlen(KEYSTR), pProvName);
- strcpyW(keyname, KEYSTR);
- strcpyW(keyname + strlenW(KEYSTR) * sizeof(WCHAR), pProvName);
Why did you add '* sizeof(WCHAR)' here?
- user ? strcpy(keyname, USERSTR) : strcpy(keyname, MACHINESTR);
- ptr = keyname + strlen(keyname);
- *(--ptr) = (dwType % 10) + '0';
- *(--ptr) = ((dwType / 10) % 10) + '0';
- *(--ptr) = (dwType / 100) + '0';
- user ? strcpyW(keyname, USERSTR) : strcpyW(keyname, MACHINESTR);
- ptr = keyname + strlenW(keyname) * sizeof(WCHAR);
And here? Did you ever test the resulting code?