Hide My Folders ActiveX - SetItemFile method

SetItemFile method 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 name 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");


if(m_ctrlHMFAx.SetItemFile(0,(LPCTSTR)strFileName))

	  	 // file object was successfully renamed
		  
else
		 // file wasn't renamed. Your exception code handler here
      


See also

AddItem, RemoveAt, Clear, Count, GetItemFile, GetItemState, SetItemState, Find