Code:
Use UI
External_Function wvsprintf "wvsprintfA" USER32.DLL Pointer pResult String sTemplate Pointer pParam Returns Integer
External_Function htonl "htonl" Ws2_32.dll Uinteger u Returns UInteger
Function DFRecnumToRowId Global UInteger uDec Returns RowId
Integer iVoid
String sResult
Move (htonl(uDec)) to uDec
Move (Repeat(" ",9)) to sResult
Move (wvsprintf(AddressOf(sResult), "%.8lx", AddressOf(uDec))) to iVoid
Function_Return (DeserializeRowID(Left(sResult,8)))
End_Function
Used APIs to help out with the byte swap and int-to-hex conversion.
Frank Cheng