SetItemFile method

It allows renaming file object at the specified “hide list” index.

BOOL SetItemFile(
LONG lItemIndex,
BSTR strNewFileName

Parameters   lItemIndex     [in] A zero-based “hide list” index of necessary item.   strFileName     [in] Null-terminated OLE string that specifies the new name of the hiding object, such as file, directory or hiding mask.

Return Values SetItemFile method returns TRUE if file object was successfully renamed and FALSE otherwise.

Remarks “Null-terminated string” term is discussed here. We strongly recommend you to read article Naming file objects before using our ActiveX Control.

Code Example

// For instance, we would like to rename file object located at 0 (zero) “hide list” index to “c:\windows\notepad.exe”

extern CHideMyFoldersAx m_ctrlHMFAx;

CString strFileName(“c:\windows\notepad.exe”);


// file object was successfully renamed


// file wasn’t renamed. Your exception code handler here

See also