[Mono-list] How to call a C++ interface class?

Benni Adham pocongcentil@yahoo.com
Tue, 13 May 2003 02:48:36 -0700 (PDT)


Hi :-)

--- "J. Perkins" <jason@379.com> wrote:
> I have unmanaged DLL that returns a C++ interface,
> which is a struct 
> containing only virtual functions. It's nVidia's
> CgFX library, in case 
> anyone cares, and it looks like so...
> 
> struct ICgFXBaseEffect
> {
> 	virtual ULONG AddRef() = 0;
> 	virtual ULONG Release() = 0;
> 
> 	virtual HRESULT GetDesc(CgFXEFFECT_DESC* pDesc) =
> 0;
> 	virtual HRESULT GetParameterDesc(LPCSTR pParameter,
> CgFXPARAMETER_DESC* 
> pDesc) = 0;
> 	...
> }
> 

Looking at the declaration, I notice that it's awfully
similar to COM interface with the absence of
IUnknown's QueryInterface. Are u sure that it's not a
COM interface? if it's COM interface, you can treat it
just like any other COM objects.

Cheers,

Benni-

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com