project BLF > class Win32Lib > method FormatGUID
function returns character
Description
Returns the "display" format of a GUID (convert bin representation to hex and provide '-' signs)
Parameters
icUnformattedGUID | input | character | Unformatted GUID |
Internal usage
BLF
program code (program1/win32lib.p)
assign vcFormattedGUID = "":U.
DO viCnt = 1 TO 16:
assign vcFormattedGUID = vcFormattedGUID + <M-1 ConvertIntegerToHex (input ASC(SUBSTR(icUnformattedGUID,viCnt,1,'character':U)) (iiIntValue)) in Win32Lib>.
if viCnt = 4 OR
viCnt = 6 OR
viCnt = 8 OR
viCnt = 10
THEN assign vcFormattedGUID = vcFormattedGUID + "-":U.
END.
RETURN vcFormattedGUID.