1 Reply Latest reply on Jun 21, 2012 3:13 PM by Benjamin Abshire

    IEdmFolder7.DestroyDeletedItems

    Benjamin Abshire

      Has anyone ever used the IEdmFolder7.DestroyDeletedItems function? I can't figure out how to make it work.

       

      The syntax is:

      HRESULT DestroyDeletedItems( [in] VARIANT_BOOL bRecursive,
                                   [in] VARIANT oDeleteDate,
                                   [out] SAFEARRAY ( struct EdmFileInfo ) **ppoDestroyedItems,
                                   [out] SAFEARRAY ( struct EdmBatchDelErrInfo ) **ppoErrors );

       

      The oDeleteDate [input] requires an Object? How would you pass the date as on Object?

       

      I am attempting to create an automated tool (vb.net) that will log and recursively destroy all files in the vault that were deleted more than 3 months ago. This action is part of my monthly backup procedure and is very time consuming.

       

      Here is my code so far. It doesn't work! The error I get is "The Data is Invalid." I can't tell if it is caused by the Date or one of the returned arrays.

          Private Sub Main_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

              On Error GoTo Err_Main_Load

              Dim Vault As EdmVault5

              Vault = New EdmVault5

              Vault.Login("Admin", "#######", "API_DEVEN")

              Dim RootFolder As IEdmFolder7 = Vault.GetFolderFromPath("C:\API_DEVEN\Projects\101 Test Area\CAD")

              Dim ppoDestroyedItems()

              Dim ppoErrors()

              RootFolder.DestroyDeletedItems(True, Date.Today, ppoDestroyedItems, ppoErrors)

              Exit Sub

       

      Thanks