39 #ifndef _DN_EXP_COMMON 40 #define _DN_EXP_COMMON 43 #ifndef _DN_USE_VARIANT_API 44 #define _DN_USE_VARIANT_API (1) 47 #ifndef _DN_USE_BSTR_API 48 #define _DN_USE_BSTR_API (1) 56 #define FORMAT_DATE2BSTR "%Y/%m/%d %H:%M:%S" 58 #ifndef _HRESULT_DEFINED 59 #define _HRESULT_DEFINED 71 #define SUCCEEDED(hr) ((HRESULT)hr >= 0) 77 #define FAILED(hr) ((HRESULT)hr < 0) 83 #define _HRESULT_TYPEDEF_(_sc) ((HRESULT)_sc) 89 #define S_OK ((HRESULT)0L) 95 #define S_FALSE ((HRESULT)1L) 101 #define E_NOTIMPL _HRESULT_TYPEDEF_(0x80004001L) 107 #define E_FAIL _HRESULT_TYPEDEF_(0x80004005L) 113 #define E_ACCESSDENIED _HRESULT_TYPEDEF_(0x80070005L) 119 #define E_HANDLE _HRESULT_TYPEDEF_(0x80070006L) 125 #define E_OUTOFMEMORY _HRESULT_TYPEDEF_(0x8007000EL) 131 #define E_INVALIDARG _HRESULT_TYPEDEF_(0x80070057L) 137 #define E_UNEXPECTED _HRESULT_TYPEDEF_(0x8000FFFFL) 143 #define DISP_E_TYPEMISMATCH _HRESULT_TYPEDEF_(0x80020005L) 149 #define DISP_E_BADVARTYPE _HRESULT_TYPEDEF_(0x80020008L) 155 #define DISP_E_OVERFLOW _HRESULT_TYPEDEF_(0x8002000AL) 161 #define DISP_E_BADINDEX _HRESULT_TYPEDEF_(0x8002000BL) 169 #define E_TIMEOUT _HRESULT_TYPEDEF_(0x80000900L) 175 #define E_NOT_CONNECTED _HRESULT_TYPEDEF_(0x80000902L) 181 #define E_MAX_OBJECT _HRESULT_TYPEDEF_(0x80000905L) 187 #define E_ALREADY_REGISTER _HRESULT_TYPEDEF_(0x80000906L) 193 #define E_TOO_MUCH_DATA _HRESULT_TYPEDEF_(0x80000909L) 199 #define E_MAX_CONNECT _HRESULT_TYPEDEF_(0x8000090BL) 205 #define OSERR2HRESULT(err) (((err) & 0x0000FFFF) | 0x80910000) 235 #if (!defined(_WCHAR_H) && (!defined(_INC_WCHAR))) 255 #if (!defined(_TIME_H) && (!defined(_INC_WCHAR))) 267 #define VARIANT_TRUE ((VARIANT_BOOL)-1) 273 #define VARIANT_FALSE ((VARIANT_BOOL) 0) 474 #if (_DN_USE_VARIANT_API) 499 #if (_DN_USE_VARIANT_API) 523 #if (_DN_USE_BSTR_API)
_DN_EXP_COMMON uint16_t SafeArrayGetDim(SAFEARRAY *psa)
Gets and returns the dimension of SAFEARRAY.
_DN_EXP_COMMON HRESULT SafeArrayUnaccessData(SAFEARRAY *psa)
Unaccesses the SAFEARRAY.
_DN_EXP_COMMON BSTR SysAllocStringLen(const wchar_t *pch, uint16_t cch)
Allocates and returns BSTR.
_DN_EXP_COMMON uint32_t ChangeVarType(VARIANT varSrc, uint16_t vt, void *pDest, uint32_t dwSize)
Changes the variant to destination value with the indicated type.
_DN_EXP_COMMON HRESULT SafeArrayGetLBound(SAFEARRAY *psa, uint16_t nDim, int32_t *plLbound)
Gets the lower bound of SAFEARRAY.
_DN_EXP_COMMON HRESULT SafeArrayGetVartype(SAFEARRAY *psa, uint16_t *pvt)
Gets the variant type of SAFEARRAY.
struct SAFEARRAYBOUND SAFEARRAYBOUND
A type definition for the signed 64bit integer.
_DN_EXP_COMMON void SysFreeString(BSTR bstr)
Releases the memory of BSTR.
_DN_EXP_COMMON HRESULT SafeArrayGetUBound(SAFEARRAY *psa, uint16_t nDim, int32_t *plUbound)
Gets the upper bound of SAFEARRAY.
_DN_EXP_COMMON uint32_t SafeArrayGetElemsize(SAFEARRAY *psa)
Gets and returns the size of an element.
unsigned long long uint64_t
_DN_EXP_COMMON HRESULT VariantCopy(VARIANT *pvargDest, const VARIANT *pvargSrc)
Copies the source variant to destination variant.
A type definition for the array.
_DN_EXP_COMMON uint16_t SysStringLen(BSTR bstr)
Gets and returns the number of characters of BSTR.
_DN_EXP_COMMON void VariantInit(VARIANT *pvarg)
Initializes the VARIANT.
_DN_EXP_COMMON HRESULT VariantChangeType(VARIANT *pvargDest, VARIANT *pvarSrc, uint16_t wFlags, uint16_t vt)
Changes the source variant to destination variant with the indicated type.
A type definition for the bound of SAFEARRAY.
A type definition for the multi type variable.
_DN_EXP_COMMON BSTR SysAllocString(const wchar_t *sz)
Allocates and returns BSTR.
_DN_EXP_COMMON void VariantClear(VARIANT *pvarg)
Clears the VARIANT.
_DN_EXP_COMMON HRESULT GetOptionValue(BSTR bstrSrc, BSTR bstrKey, uint16_t vt, VARIANT *pvarDest)
Searchs the key string from source string and sets the value to the destination variant with the indi...
struct SAFEARRAY SAFEARRAY
_DN_EXP_COMMON char * ConvertWideChar2MultiByte(const wchar_t *chSrc)
Converts wide string to string.
struct tagCY::@3 DUMMYSTRUCTNAME
_DN_EXP_COMMON HRESULT SafeArrayDestroy(SAFEARRAY *psa)
Releases the memory of SAFEARRAY.
_DN_EXP_COMMON SAFEARRAY * SafeArrayCreateVector(uint16_t vt, int32_t lLbound, uint32_t cElements)
Allocates and returns SAFEARRAY.
_DN_EXP_COMMON wchar_t * ConvertMultiByte2WideChar(const char *chSrc)
Converts string to wide string.
_DN_EXP_COMMON HRESULT SafeArrayAccessData(SAFEARRAY *psa, void **ppvData)
Accesses the SAFEARRAY and gets the pointer of array data.