IEdmFile5.UnlockFile() and IEdmRefCallback5

I'm trying to unlock a file using IEdmFile5.UnlockFile().

My program used to work in EPDM 2007. After upgrading to 2010 SP3, the program now gives  the error "An invalid argument was given to the method" when executing the method IEdmFile5.UnlockFile().

I tried the code as given by SW for the IEdmRefCallback5 example, same error message. The SW example code is below, slightly modified vault and file name (I know DWGs don't have .sldprt extensions). I believe the error is in the callback.

Anyone have any ideas? TIA.

using System;
using System.Collections.Generic;
using System.Text;
using EdmLib;
using System.Diagnostics;

namespace PDMWE_CS_StandAlone
{
    class Program
    {
        static void Main(string[] args)
        {
            EdmVault5 vault = new EdmVault5();
            vault.LoginAuto("My Vault", 0);
            IEdmFolder5 folder;
            IEdmFile5 file = vault.GetFileFromPath(@"C:\\My Vault\\Drawing.dwg", out folder) as IEdmFile5;

            Console.WriteLine(file.GetLocalPath(folder.ID));

            CallBack myCallBack = new CallBack();

            try
            {
                file.UnlockFile(0, "", (int)EdmUnlockFlag.EdmUnlock_Simple, myCallBack);
            }
            catch (System.Exception ex)
            {
                Console.WriteLine(ex.Message.ToString());
            }
            Console.WriteLine();
            Console.WriteLine("Press any key to end");
            Console.ReadKey();         
        }
    }

    class CallBack : IEdmRefCallback5
    {
        #region IEdmRefCallback5 Members

        public int GetFlags(IEdmVault5 poVault)
        {
            int flags = (int)EdmRefCbFlag.EdmRefCb_GetRefInfo;
            return flags;
        }

        public bool GetRefInfo(ref EdmRefInfo poRefInfo, ref EdmRefState poRefState, int hParentWnd, IEdmVault5 poVault)
        {
            if (poRefInfo.mbsRefFilePath.ToLower().Contains("sldprt"))
            {
                poRefState.mbSkipFile = 1;
            }
            return false;
        }

        public bool HandleError(int hParentWnd, int lErrorCode, EdmSelectionList5 poFiles, IEdmVault5 poVault)
        {
            return true;
        }

        public void OnEndCommand(int hParentWnd, IEdmVault5 poVault)
        {
        }

        public bool OnPostFile(int lFileID, int lParentFileID, int lFolderID, string bsFilePath, int hParentWnd, IEdmVault5 poVault)
        {
            return true;
        }

        public bool OnPreFile(int lFileID, int lParentFileID, int lFolderID, string bsFilePath, int hParentWnd, IEdmVault5 poVault)
        {
            return true;
        }

        public bool OnStartCommand(int hParentWnd, IEdmVault5 poVault)
        {
            return true;
        }

        #endregion

    }
}

SolidworksApi macros