locked
IAttachmentExecute.SetClientGuid returning 0x8000FFFF RRS feed

  • Question

  • I am invoking Attachment Services from C#, through COM interop....

    Here is my interface definition

     

     [ComImport, Guid("73DB1241-1E85-4581-8E4F-A81E1D0F8C57"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
        public interface IAttachmentExecute
        {
            [PreserveSig]
            int CheckPolicy();
    
            void ClearClientState();
    
            void Execute(IntPtr hwnd, string verb, ref IntPtr phProcess);
    
            void Prompt(IntPtr hwnd, AttachmentPrompt prompt, out AttachmentAction pAction);
    
            void Save();
    
            void SaveWithUI(IntPtr hwnd);
    
            void SetClientGuid(ref Guid guid);
    
            void SetClientTitle(string pszTitle);
    
            void SetFileName(string pszFileName);
    
            void SetLocalPath(string pszLocalPath);
    
            void SetReferrer(string pszReferrer);
    
            void SetSource(string pszSource);
        }
    

     


    Then I instantiate my instance like this:

     

    Type type = Type.GetTypeFromCLSID(new Guid("4125DD96-E03A-4103-8F70-E0597D803B9C"));
    IAttachmentExecute exe = (IAttachmentExecute)Activator.CreateInstance(type);
    
    Guid clientId = new Guid("22877D2C-1BB4-4946-BF46-7A4B496B4066");
    exe.SetClientGuid(ref clientId);
    

    at which point I get the COMException with HRESULT 0x8000FFFF when calling SetClientGuid

    Any Ideas? This is .NET4 on Windows 7

     

     

    Wednesday, November 9, 2011 12:40 AM

All replies

  • Are tyoe, IAttachment getting set ok? Just wondering because I see no checkng in there. Some kind of catastrophic error is happening, maybe the object wasn't created.
    Phil Wilson
    Wednesday, November 9, 2011 10:03 PM
  • when I step through it, it appears to be getting a valid COM object, I should either get an exception on the CreateInstance call, or a null-reference when i try to call the subsequent methods....
    Thursday, November 10, 2011 8:21 PM
  • I am having the same issue.
    Friday, July 20, 2012 3:19 PM