INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: API SilentDelete function  (Read 1177 times)

mcbuilder

  • Member
  • *
  • Posts: 1
API SilentDelete function
« on: September 19, 2006, 02:02:30 am »

Hi All,

I am trying to use the API to delete a file with the FileAutomation Object through VB6 (Out-Of-Process).

With file.DeleteFile (parent handle), the confirm box comes up as expected, however fileObj.SilentDeleteFile generates Out of Memory Error(7) everytime. Is there a specific way this function has to be used.

File Automation Object  . SilentDeleteFile()

Any help much appreciated.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42387
  • Shoes gone again!
Re: API SilentDelete function
« Reply #1 on: September 19, 2006, 11:25:18 am »

Double-check that the Media Center.tlb file you're using is the latest one that's included with the build.
Logged
Matt Ashland, JRiver Media Center

samwin241

  • Recent member
  • *
  • Posts: 13
Re: API SilentDelete function
« Reply #2 on: September 20, 2006, 10:27:26 am »

Same error here. Checked Media Center.tlb version is current, but SilentDeleteFile generates  Out of memory:

  ' attempt to delete missing files
        For i = 0 To numResults - 1
            Dim tfile As Object
            Dim FileName As String
           
            FileName = searchResults.Getfile(i).FileName
            Set tfile = myobj.Getfile(FileName)
           
           
            frmUpdate.listLog.AddItem "Removing.." & tfile.FileName
           
            Dim delresult As Boolean
           
             delresult = tfile.deletefile(frmMCControl.hWnd) <-- This code works
           ' delresult = tfile.SilentDeleteFile() <-- This generates above memory error
            If delresult <> False Then
                frmUpdate.listLog.AddItem "!!DELETED!!"
            Else
                frmUpdate.listLog.AddItem "NOT Deleted"

Any ideas?
Logged
Pages: [1]   Go Up