OleQueryName

3.1

  #include <ole.h>    

  OLESTATUS OleQueryName(lpObject, lpszObject, lpwBuffSize)    
  LPOLEOBJECT lpObject; /* address of object */
  LPSTR lpszObject; /* address of string for object name */
  UINT FAR* lpwBuffSize; /* address of word for size of buffer */

The OleQueryName function retrieves the name of a specified object.

Parameters

lpObject

Points to the object whose name is being queried.

lpszObject

Points to a character array that contains a null-terminated string. When the function returns, this string specifies the name of the object.

lpwBuffSize

Points to a variable containing the size, in bytes, of the buffer pointed to by the lpszObject parameter. When the function returns, this value is the number of bytes copied to the buffer.

Return Value

The return value is OLE_OK if the function is successful. Otherwise, it is an error value, which may be OLE_ERROR_OBJECT.

See Also

OleRename