华云信息系统有限公司:StringFromCLSID 和 CLSIDFromString是干什么的?

来源:百度文库 编辑:神马品牌网 时间:2024/04/30 07:41:19
StringFromCLSID 和 CLSIDFromString是干什么的?
是通过iid得到控键的窗口类么?

StringFromCLSID
Converts a CLSID into a string of printable characters. Different CLSIDs always convert to different strings.

StringFromCLSID
Converts a CLSID into a string of printable characters. Different CLSIDs always convert to different strings.

WINOLEAPI StringFromCLSID(
REFCLSID rclsid,
LPOLESTR * ppsz
);
Parameters
rclsid
[in] CLSID to be converted.
ppsz
[out] Address of LPOLESTR pointer variable that receives a pointer to the resulting string.
Return Values
This function supports the standard return value E_OUTOFMEMORY; as well as the following:

S_OK
Indicates the CLSID was successfully converted and returned.
Remarks
The StringFromCLSID function calls the StringFromGuid2 function to convert a globally unique identifier (GUID) into a string of printable characters.

The caller is responsible for freeing the memory allocated for the string by calling CoTaskMemFree.

Requirements
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.