 |
UuidToString ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
Converts a UUID to a string. |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
RPC_STATUS RPC_ENTRY UuidToString(
UUID __RPC_FAR *Uuid ,
unsigned char __RPC_FAR * __RPC_FAR *StringUuid
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER UuidToString IN Rpcrt4;
STRING @Uuid,;
LONG @StringUuid
|
 |
 |
 |
| Parameters: |
 |
Uuid
Pointer to a binary UUID.
StringUuid
Pointer to a pointer to the string into which the UUID specified in the Uuid parameter will be placed. |
 |
 |
| Return value: |
 |
| Returns RPC_S_OK (0) if the call succeeded. |
 |
 |
| Usage: |
 |
FUNCTION StringFromUUID(cUUID As String) As String
LOCAL hBuffer, nBufsize, cResult
cResult=""
hBuffer=0
IF UuidToString(@cUUID, @hBuffer)=RPC_S_OK
nBufsize=MAX(36, GlobalSize(hBuffer))
cResult=REPLICATE(CHR(0), nBufsize)
MemToStr(@cResult, hBuffer, nBufsize)
RpcStringFree(@hBuffer)
ENDIF
RETURN UPPER(STRTRAN(m.cResult, CHR(0), ""))
|
 |
 |
| My comment: |
 |
String representation of a UUID looks like this
E911188C-E98C-478F-97E6-19F365143953
The application is responsible for calling the RpcStringFree to release the memory that the system allocates for the StringUuid.
Note that the StringUuid is a pointer to a pointer, which adds one or two subtleties to the RPC declarations and calls in VFP.
See also: UuidFromString, RtlMoveMemory |
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2009-11-19 11:19:20 | | Modified: | 2009-11-19 12:31:03 | Visited in last 7 days: 15 |