RemovePropA function (winuser.h)
Removes an entry from the property list of the specified window. The specified character string identifies the entry to be removed.
Syntax
HANDLE RemovePropA(
[in] HWND hWnd,
[in] LPCSTR lpString
);
Parameters
[in] hWnd
Type: HWND
A handle to the window whose property list is to be changed.
[in] lpString
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: 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.
Note
The winuser.h header defines RemoveProp as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | winuser.h (include Windows.h) |
Library | User32.lib |
DLL | User32.dll |
API set | ext-ms-win-ntuser-window-l1-1-0 (introduced in Windows 8) |
See also
Conceptual
Reference