Partager via


MAKE_SIMERROR (Compact 2013)

3/26/2014

This macro creates a SIM error value. This value can then be used to create an HRESULT.

Syntax

#define MAKE_SIMERROR(errclass,code) \
    ( (unsigned long)(errclass)<<8) | ((unsigned long)(code) )

Parameters

  • code
    An error code.

Return Value

A SIM error value.

Example

HRESULT hr;
HRESULT hr_error_class;

#define SIM_E_SIMFAILURE \
( MAKE_HRESULT( SEVERITY_ERROR, FACILITY_SIM, MAKE_SIMERROR( SIM_ERRORCLASS_SIM, 0x01 ) ) )

hr_error_class = SIMERRORCLASS( hr );

// hr_error_class = will contain the value 0x02

Remarks

This macro is used to create new error values. The use of this macro is reserved and not supported.

Requirements

Header

simmgr.h

Library

sim.lib

See Also

Reference

SIM Manager Macros
SIMERRORCLASS
SIM Manager Error Constants