0 out of 1 rated this helpful - Rate this topic

RemoveProp function

Applies to: desktop apps only

Removes an entry from the property list of the specified window. The specified character string identifies the entry to be removed.

Syntax

HANDLE WINAPI RemoveProp(
  __in  HWND hWnd,
  __in  LPCTSTR lpString
);

Parameters

hWnd [in]

Type: HWND

A handle to the window whose property list is to be changed.

lpString [in]

Type: LPCTSTR

A null-terminated character string or an atom that identifies a string. If this parameter is an atom, it must have been created using the GlobalAddAtom function. The atom, a 16-bit value, must be placed in the low-order word of lpString; the high-order word must be zero.

Return value

Type:

Type: HANDLE

The return value identifies the specified data. If the data cannot be found in the specified property list, the return value is NULL.

Remarks

The return value is the hData value that was passed to SetProp; it is an application-defined value. Note, this function only destroys the association between the data and the window. If appropriate, the application must free the data handles associated with entries removed from a property list. The application can remove only those properties it has added. It must not remove properties added by other applications or by the system itself.

The RemoveProp function returns the data handle associated with the string so that the application can free the data associated with the handle.

Starting with Windows Vista, RemoveProp is subject to the restrictions of User Interface Privilege Isolation (UIPI). A process can only call this function on a window belonging to a process of lesser or equal integrity level. When UIPI blocks property changes, GetLastError will return 5.

Examples

For an example, see Deleting a Window Property.

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Winuser.h (include Windows.h)

Library

User32.lib

DLL

User32.dll

Unicode and ANSI names

RemovePropW (Unicode) and RemovePropA (ANSI)

See also

Reference
AddAtom
GetProp
SetProp
Conceptual
Window Properties

 

 

Send comments about this topic to Microsoft

Build date: 2/3/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ