Click to Rate and Give Feedback
MSDN
MSDN Library
COM
COM Fundamentals
Reference
Functions
 StringFromGUID2
COM
StringFromGUID2

Converts a globally unique identifier (GUID) into a string of printable characters.

int StringFromGUID2(
  REFGUID rguid,
  LPOLESTR lpsz,
  int cchMax
);
rguid

[in] GUID to be converted.

lpsz

[out] Pointer to a caller-allocated string variable to contain the resulting string on return.

cchMax

[in] Number of characters available in the buffer indicated by lpsz.

0 (zero)

Array at lpsz is too small to contain a string representation of a GUID.

Non-zero value

The number of bytes (not characters) in the returned string, including the null terminator.

The string that the lpsz parameter receives has a format like that of the following sample:

{c200e360-38c5-11ce-ae62-08002b2b79ef} 

where the successive fields break the GUID into the form DWORD-WORD-WORD-WORD-WORD.DWORD covering the 128-bit GUID. The string includes enclosing braces, which are an OLE convention.

For an explanation of the requirement values, see Requirements (COM).

Windows NT/2000/XP: Requires Windows NT 3.1 or later.

Windows 95/98: Requires Windows 95 or later.

Header: Declared in objbase.h.

Library: Use ole32.lib.

Reference

StringFromCLSID

Send comments about this topic to Microsoft.
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Returns the number of characters      yecril   |   Edit   |  
Contrary to what the documentation says.
Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker