2.2.4.42.1 storage::DeleteSection

Description

Deletes a section

Syntax

BOOL DeleteSection( LPCSTR lpcszSection )

Parameters

lpcszSection
[input]name of the section to be deleted

Return

Returns no zero success 0 otherwise

Examples

EX1

//run example code in Storage::SetSection before run this code to check the result.
void Storage_DeleteSection_ex1()
{
	Page pg = Project.Pages();
	if ( pg )
	{
	    string strStorage = "Test";
	    string strSection = "Params";
	    storage st;
	    vector<string> vsNames;
	    st = pg.GetStorage(strStorage);
	    if ( st )
	    {
	    	st.GetSectionNames(vsNames);
	    	st.DeleteSection(strSection); //remove a section "Params"
	    	st.GetSectionNames(vsNames);
	    }
	}
}

Remark

See Also

Storage::GetSection, Storage::SetSection

Header to Include

origin.h