AlphaVSS issue(vb.net)

Jun 6, 2014 at 4:23 PM
Edited Jun 6, 2014 at 4:49 PM
I am trying to use AlphaVSS to copy/backup the contents of a folder. I can not run it from my code without it freezing. I can run it by clicking on the .exe for my console app, but I get error messages.
Sub Main()
        Dim oOFD As New FolderBrowserDialog
        Dim sFileName As String
        

        ' copy progress handler
        m_oCPR = New CopyProgressRoutine_Delegate(AddressOf CopyProgressRoutine)
       
        Console.SetWindowSize(80, 50)
        Console.SetWindowPosition(0, 0)
        Console.WriteLine(BIG_LINE)
        Console.WriteLine("A Demonstration of the AlphaVSS Libraries")
        Console.WriteLine("Provided by Fungusware www.fungusware.com")
        Console.WriteLine(BIG_LINE)
        Console.WriteLine()

        Console.WriteLine("Use the File Browser to select a file that is in use.")
        Console.WriteLine("Your Outlook (Express). PST or DBX file is usualy good for this test.")
        Console.WriteLine(BIG_LINE)
        Console.WriteLine()


        oOFD.Description = "Select an in-use folder you would like to copy."
        'oOFD.Filter = "All files (*.*)|*.*"
        If oOFD.ShowDialog = System.Windows.Forms.DialogResult.OK Then
            sFileName = oOFD.SelectedPath

            Console.WriteLine("File name : " & IO.Path.GetFileName(sFileName))
            Console.WriteLine("Location  : " & IO.Path.GetDirectoryName(sFileName))
            Console.WriteLine("We will copy this file to your My Documents folder.")
            Console.WriteLine()

            If CanOpenFileNormaly(sFileName) Then
                Console.WriteLine(vbTab & "This file can be copied normally.")
                Console.WriteLine(vbTab & "The is no need to use the VSS Libraries, however for")
                Console.WriteLine(vbTab & "demonstration purposes VSS copying will now occur.")
            Else
                Console.WriteLine(vbTab & "This file cannot be copied using normal operations.")
                Console.WriteLine(vbTab & "VSS copying will now occur.")
            End If

            Console.WriteLine()
            Console.WriteLine("Press any key to continue.")
            Console.ReadKey()
            Console.WriteLine()
            Console.WriteLine()
            Console.WriteLine()

            ' Lets go
            PerformVSSCopy(sFileName)
        End If

        Console.WriteLine()
        Console.WriteLine("Press any key to exit.")
        Console.ReadKey()
    End Sub
When it goes into PerformVSSCopy(sFileName) it errors out on this line:

oVSS.InitializeForBackup(Nothing)

Here are the error messages when I click the executable to run it:

Image
Mar 7, 2015 at 9:55 PM
Edited Mar 7, 2015 at 9:58 PM
Hello,

Do you resolve this problem?
I have the same with office AddIn.

Error:

"Attempted to perform an unauthorized operation."

I elevate to Admin, I have:

"An unexpected error occurred. The error code is logged in the error log file."

Do you know why? A problem with office security?

Regards
Paulo