Go to the documentation of this file. 1 #ifndef __WINDOWS2LINUX_H__ 2 #define __WINDOWS2LINUX_H__ 25 #define STDAPI extern "C" HRESULT 26 #define STDMETHODIMP HRESULT __stdcall 27 #define STDMETHODIMP_(x) x __stdcall 29 #define STDMETHOD(x) virtual HRESULT x 30 #define STDMETHOD_(a, x) virtual a x 40 #define S_OK (0x00000000) 41 #define S_FALSE (0x00000001) 42 #define E_NOINTERFACE (0X80004002) 43 #define E_POINTER (0x80004003) 44 #define E_FAIL (0x80004005) 45 #define E_OUTOFMEMORY (0x8007000E) 47 #define INVALID_HANDLE_VALUE ((HANDLE)((LONG_PTR)-1)) 48 #define FAILED(hr) ((hr) & 0x80000000) 49 #define SUCCEEDED(hr) (!FAILED(hr)) 55 #define MAKEDWORD(a,b,c,d) ((a << 24) | (b << 16) | (c << 8) | (d)) 56 #define MAKEWORD(a,b) ((a << 8) | (b)) 58 #define lstrlen strlen 59 #define lstrcpy strcpy 60 #define lstrcmpi strcasecmp 61 #define _stricmp strcasecmp 62 #define InterlockedIncrement(x) __sync_fetch_and_add((x), 1) 63 #define InterlockedDecrement(x) __sync_fetch_and_sub((x), 1) 65 #define InterlockedCompareExchange(x,y,z) __sync_val_compare_and_swap(x,z,y) 67 #define UInt32x32To64(a, b) ( (uint64_t) ( ((uint64_t)((uint32_t)(a))) * ((uint32_t)(b)) ) ) 68 #define Int64ShrlMod32(a, b) ( (uint64_t) ( (uint64_t)(a) >> (b) ) ) 69 #define Int32x32To64(a, b) ((__int64)(((__int64)((long)(a))) * ((long)(b)))) 71 #define MulDiv(nNumber, nNumerator, nDenominator) (int32_t) (((int64_t) (nNumber) * (int64_t) (nNumerator) + (int64_t) ((nDenominator)/2)) / (int64_t) (nDenominator)) 77 #endif // __WINDOWS2LINUX_H__
Loading...