none
How to find out the return code and it's corresponding values(integer) of MsiEnumProductsEx function ? RRS feed

  • Question

  • MsiEnumProductsEx function has 

    Return code Description
    ERROR_ACCESS_DENIED
    If the scope includes users other than the current user, you need administrator privileges.
    ERROR_BAD_CONFIGURATION
    The configuration data is corrupt.
    ERROR_INVALID_PARAMETER
    An invalid parameter was passed to the function.
    ERROR_NO_MORE_ITEMS
    There are no more products to enumerate.
    ERROR_SUCCESS
    A product is enumerated.
    ERROR_MORE_DATA
    The szSid parameter is too small to get the user SID.
    ERROR_UNKNOWN_PRODUCT
    The product is not installed on the computer in the specified context.
    ERROR_FUNCTION_FAILED
    An unexpected internal failure

    these many return codes , I just wanted to know it's corresponding integer values 

    Friday, December 13, 2019 5:19 AM

Answers

  • Hello,

    the error code integer values are defined in winerror.h. You can find out any error code macro by typing it in the VS editor source code, right click on it and "Go To Definition". Then VS will show you the #define in winerror.h

    In VS 2015 they are:

    ERROR_ACCESS_DENIED = 5
    ERROR_BAD_CONFIGURATION = 1610
    ERROR_INVALID_PARAMETER = 87
    ERROR_NO_MORE_ITEMS = 259
    ERROR_SUCCESS = 0
    ERROR_MORE_DATA = 234
    ERROR_UNKNOWN_PRODUCT = 1605
    ERROR_FUNCTION_FAILED = 1627

    Regards, Guido



    Friday, December 13, 2019 7:24 AM
  • thank you
    • Marked as answer by sarath govind Tuesday, December 17, 2019 7:23 AM
    Friday, December 13, 2019 7:48 AM

All replies

  • Hello,

    the error code integer values are defined in winerror.h. You can find out any error code macro by typing it in the VS editor source code, right click on it and "Go To Definition". Then VS will show you the #define in winerror.h

    In VS 2015 they are:

    ERROR_ACCESS_DENIED = 5
    ERROR_BAD_CONFIGURATION = 1610
    ERROR_INVALID_PARAMETER = 87
    ERROR_NO_MORE_ITEMS = 259
    ERROR_SUCCESS = 0
    ERROR_MORE_DATA = 234
    ERROR_UNKNOWN_PRODUCT = 1605
    ERROR_FUNCTION_FAILED = 1627

    Regards, Guido



    Friday, December 13, 2019 7:24 AM
  • thank you
    • Marked as answer by sarath govind Tuesday, December 17, 2019 7:23 AM
    Friday, December 13, 2019 7:48 AM