Ordinary algorithm collection - (append)

xiaoxiao2021-03-05  54

/ / -------------------------------------------------------------------------------------------- ------------------------- // Sort DWORD variable // ------------------ -------------------------------------------------- ----- DWORD _FASTCALL DWORDORDER (DWord Val) {UNION Hostdword {DWORD DWORDVALUE; BYTE B [4];}; hostdword dw; dw.dwordvalue = val; dword v = ((DWORD) dw.b [0] < <24) | (DWORD) DW.B [1] << 16) | ((DWORD) DW.B [2] << 8) | ((DWORD) DW.B [3]); Return V;

/ / -------------------------------------------------------------------------------------------- ------------------------- // __ int64 type to cstring type // --------------- -------------------------------------------------- -------- CString __INT64TOSTR (__ int64 value) {char stritem [10] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'}; cstring _retval; __int64 _quotient = value; short _surplus = 0; while (_quotient> 0) {_surplus = _quotient% 10; _quotient = _quotient / 10; _RetVal.AppendChar (Stritem [_SurPlus]);} _retval = _retval.makereverse (); return _retval;}

转载请注明原文地址:https://www.9cbs.com/read-34625.html

New Post(0)