Using Win32 functions in Visual FoxPro Image Gallery
Remote Procedure Call (RPC)
RpcStringFree
UuidCompare
UuidCreate
UuidCreateNil
UuidCreateSequential
UuidFromString
UuidToString
Code examples:
Generating random UUID values
Generating sequential UUID values
Generating UUID values from numbers
UuidToString
..msdn    Add comment     W32 Constants      Translate this page
Converts a UUID to a string.
Code examples:
Generating sequential UUID values
Generating UUID values from numbers
Generating random UUID values
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
Word Index links for the UuidToString :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2009-11-19 11:19:20
Modified: 2009-11-19 12:31:03
Visited in last 7 days: 66
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.37), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.81.79.128)
14 sec.Function: 'HeapLock'
26 sec.Function: 'PostQuitMessage'
38 sec.Function: 'JetPrepareUpdate'
48 sec.
Function group: 'Window'
1.02 min.Function: 'GetRegionData'
1.22 min.Function: 'mixerGetControlDetails'
1.38 min.Function: 'mmioRead'
1.55 min.Function: 'GetCurrentProcessId'
1.75 min.Function: 'JetUpdate'
1.93 min.Function: 'SHFormatDrive'
Google
Advertise here!