Special cases

Although it is preferred to use Activator.CreateInstance when creating an instance, it is not fully compatible with CoCreateInstanceEx. When working with remote servers, CreateInstance will always try to invoke the server locally, before attempting to invoke the server on the remote machine. Currently the only known work-around is to use CoCreateInstanceEx.

Since inheritance isn't supported, a descendant interface needs to declare the ancestor's methods. Below is the IAutoComplete2 interface, which extends IAutoComplete.

[ComImport, GuidAttribute('EAC04BC0-3791-11d2-BB95-0060977B464C'), InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)] IAutoComplete2 = interface(IAutoComplete) // IAutoComplete methods function Init(hwndEdit: HWND; punkACL: IEnumString;

pwszRegKeyPath: IntPtr; pwszQuickComplete: IntPtr): HRESULT;

function Enable(fEnable: BOOL): HRESULT; //

function SetOptions(dwFlag: DWORD): HRESULT; function GetOptions(var dwFlag: DWORD): HRESULT; end;

Project Management Made Easy

Project Management Made Easy

What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

Get My Free Ebook


Post a comment