UPDATED
I'm trying to programmatic-ally set a COM+ component's ConstructorString with a value for later initialization.
The code in question works fine on WinXP, Win2k3, Vista and Win2k8.
I'm failing on Win7 - Home Premium version.
I've determined by trial and error that there seems to be a size limit on the constructor string - if the string is 512 characters (wchar) or less, it saves. Longer, and the SaveChanges call on the CatalogCollection object fails with a 0x80110437 - COMADMIN_E_PROPERTYSAVEFAILED error.
Turns out, all systems have that limit - 512 characters.
We use CryptProtectData to encrypt a password before putting it into the string.
On win7 (x64) the output of the string is longer than on XP (x32) and W2k3 (x64).
So - CryptProtectData has changed - why is the output longer?
if (!CryptProtectData(&dataIn,L" ",&optionalEntropy,NULL,NULL,
CRYPTPROTECT_LOCAL_MACHINE | CRYPTPROTECT_UI_FORBIDDEN, &dataOut))