/* bytes_to_long - Source code (requires t5vm.h include) */ /* Function */ #include "stdafx.h" #include "t5vm.h" /* Argument list */ #define _P_BYTE1_ (*((T5_PTBYTE)(T5GET_DBDATA8(pBase))+pArgs[0])) #define _P_BYTE2_ (*((T5_PTBYTE)(T5GET_DBDATA8(pBase))+pArgs[1])) #define _P_BYTE3_ (*((T5_PTBYTE)(T5GET_DBDATA8(pBase))+pArgs[2])) #define _P_BYTE4_ (*((T5_PTBYTE)(T5GET_DBDATA8(pBase))+pArgs[3])) #define _P_Q (*((T5_PTLONG)(T5GET_DBDATA32(pBase))+pArgs[4])) /* handler */ T5_DWORD __declspec(dllexport) BYTES_TO_LONG ( T5_WORD wCommand, T5PTR_DB pBase, T5_PTR pClass, T5_PTR pInst, T5_PTWORD pArgs) { switch (wCommand) { case T5FBCMD_ACTIVATE : /* enter your code here... */ _P_Q = 0; _P_Q |= _P_BYTE4_ << 24; _P_Q |= _P_BYTE3_ << 16; _P_Q |= _P_BYTE2_ << 8; _P_Q |= _P_BYTE1_ << 0; return 0L; case T5FBCMD_ACCEPTCT : /* dont change that */ return 1L; default : return 0L; } } /* Undefine argument list */ #undef _P_BYTE1 #undef _P_BYTE2 #undef _P_BYTE3 #undef _P_BYTE4 #undef _P_Q