* These error codes are in addition to those.
*/
enum {
- VIX_E_OP_NOT_SUPPORTED_ON_NON_VMWARE_VM = 3038
+ VIX_E_OP_NOT_SUPPORTED_ON_NON_VMWARE_VM = 3038,
+ /* Reg Errors*/
+ VIX_E_REG_INCORRECT_VALUE_TYPE = 25000
/* WARNING. Do not exceed 2**16 */
};
if (VIX_PROPERTYTYPE_INTEGER == registryRequest->expectedRegistryKeyType) {
errResult = Registry_ReadInteger(registryPathName, &valueInt);
if (ERROR_SUCCESS != errResult) {
- err = Vix_TranslateSystemError(errResult);
+ /*
+ * E_UNEXPECTED isn't a system err. Don't use Vix_TranslateSystemError
+ */
+ if (E_UNEXPECTED == errResult) {
+ err = VIX_E_REG_INCORRECT_VALUE_TYPE;
+ } else {
+ err = Vix_TranslateSystemError(errResult);
+ }
goto abort;
}
} else if (VIX_PROPERTYTYPE_STRING == registryRequest->expectedRegistryKeyType) {
errResult = Registry_ReadString(registryPathName, &valueStr);
if (ERROR_SUCCESS != errResult) {
- err = Vix_TranslateSystemError(errResult);
+ /*
+ * E_UNEXPECTED isn't a system err. Don't use Vix_TranslateSystemError
+ */
+ if (E_UNEXPECTED == errResult) {
+ err = VIX_E_REG_INCORRECT_VALUE_TYPE;
+ } else {
+ err = Vix_TranslateSystemError(errResult);
+ }
goto abort;
}
} else {