57 typedef void* HAUTOPOOL;
59 enum ncsBindingDataTYPE{
68 #define SBPE_READERROR 1 //psrc cannot read 69 #define SBPE_WRITEERROR 2 //pdest cannot write 70 #define SBPE_MISSMATCH 3 //type miss match 72 typedef void (*NCS_SET_VALUE)(
void*
self, DWORD dst_v);
73 MGNCS_EXPORT
int ncsTransType(DWORD value,
int src_type,
int dest_type, NCS_SET_VALUE set_value,
void *
self);
79 MGNCS_EXPORT
int ncsTypeToInt(DWORD value,
int src_type);
81 #define ncsStrToInt(str) ncsTypeToInt((DWORD)(str), NCS_BT_STR) 82 #define ncsCharToInt(ch) (int)((char)(ch)) 84 MGNCS_EXPORT
int ncsTypeToChar(DWORD value,
int scr_type);
86 static inline int ncsStrToChar(DWORD str) {
89 return *((
const char*)(str));
92 #define ncsIntToChar(i) ((char)(i)) 104 MGNCS_EXPORT
void ncsResetAutoPool(HAUTOPOOL hPool);
105 MGNCS_EXPORT
void ncsFreeAutoPool(HAUTOPOOL hPool);
107 MGNCS_EXPORT
char* ncsTypeToAutoString(DWORD value,
int src_type, HAUTOPOOL hAutoPool);
109 #define _BEGIN_AUTO_STR_EX(size) { HAUTOPOOL __local_auto_pool__ = ncsCreateAutoPool(size); 110 #define _BEGIN_AUTO_STR _BEGIN_AUTO_STR_EX(-1) 112 #define _END_AUTO_STR ncsFreeAutoPool(__local_auto_pool__); } 114 #define _RESET_AUTO_STR ncsResetAutoPool(__local_auto_pool__); 116 #define _AUTO_STR(data,src_type) ((char*)ncsTypeToAutoString((data), (src_type), __local_auto_pool__)) 118 #define _RET_AUTO_STR do{ ncsFreeAutoPool(__local_auto_pool__); return; }while(0) 119 #define _RETV_AUTO_STR(ret) do { ncsFreeAutoPool(__local_auto_pool__); return (ret); }while(0) MGNCS_EXPORT char * ncsTypeToString(DWORD value, int src_type)
MGNCS_EXPORT int ncsTypeToInt(DWORD value, int src_type)
MGNCS_EXPORT HAUTOPOOL ncsCreateAutoPool(int size)