Writes the property to an output stream.
int length = 0;
long variantType = getType();
/* Ensure that wide strings are written if the codepage is Unicode. */
if (codepage == Constants.CP_UNICODE && variantType == Variant.VT_LPSTR)
variantType = Variant.VT_LPWSTR;
length += TypeWriter.writeUIntToStream(out, variantType);
length += VariantSupport.write(out, variantType, getValue(), codepage);
return length;