IDispatchEx::DeleteMemberByDispIDIDispatchEx::DeleteMemberByDispID*
*Contents  *Index  *Topic Contents
*Previous Topic: IDispatchEx Methods
*Next Topic: IDispatchEx::DeleteMemberByName

IDispatchEx::DeleteMemberByDispID

HRESULT DeleteMemberByDispID(
    DISPID id
);

Deletes a member by DISPID.

id
Member identifier. Use GetDispID or GetNextDispID to obtain the dispatch identifier.

If the member is deleted, the DISPID needs to remain valid for GetNextDispID.

If a member with a given name is deleted and later a member with the same name is recreated, the DISPID should be the same. (Whether member names that differ only by case are the "same" is object-dependent.)

Example

BSTR bstrName;
DISPID dispid;
IDispatch *pdex; 

// Assign to pdex and bstrName
pdex->GetDispID(bstrName, fdexNameCaseSensitive, &dispid);
pdex->DeleteMemberByDispID(dispid);

Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.