From: Chris S. <chr...@gm...> - 2004-11-25 01:30:31
|
Hey All, I'm taking a stab at implementing IAutoComplete. I've got the following: #ifndef IAutoComplete #undef INTERFACE #define INTERFACE IAutoComplete DECLARE_INTERFACE_(IAutoComplete, IUnknown) { STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE; STDMETHOD_(ULONG,AddRef)(THIS) PURE; STDMETHOD_(ULONG,Release)(THIS) PURE; STDMETHOD(Enable)(THIS_ BOOL) PURE; STDMETHOD(Init)(THIS_ HWND,IUnknown*,LPCOLESTR,LPCOLESTR) PURE; }; #endif #ifndef IObjMgr #undef INTERFACE #define INTERFACE IObjMgr DECLARE_INTERFACE_(IObjMgr, IUnknown) { STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE; STDMETHOD_(ULONG,AddRef)(THIS) PURE; STDMETHOD_(ULONG,Release)(THIS) PURE; STDMETHOD(Append)(THIS_ IUnknown*) PURE; STDMETHOD(Remove)(THIS_ IUnknown*) PURE; }; #endif based on shlobj.h (for how to define the interface) and MSDN (for the methods). IObjMgr seems to work fine, however, when I used Init or Enable with IAutoComplete, I get Access Violation. Anybody have any ideas? Thanx! Chris -- Chris Sutcliffe chr...@gm... http://www.emergedesktop.org |