Using COM. Please help.

Nub Public nubpublic at gmail.com
Mon Jun 27 00:04:33 PDT 2011


On 6/27/2011 1:28 PM, Andrej Mitrovic wrote:
> You mean COM interfaces? I usually do this:
>
> interface SomeComInterface : IUnknown
> {
>      extern(Windows):
>      BOOL PrototypeFoo();
> }
>
> But maybe this is already implicit when deriving from IUnknown, I wouldn't know.
>
> But from what I can tell some of those prototypes seem to have C
> linkage, maybe you're getting access violations due to wrong calling
> conventions.


Thanks for the reply. But it still doesn't work.

interface ISomeComInterface : IUnknown
{
	void funcWithManyParams(/*10 params*/);

	extern(/*insert whatever linkage here*/)
	void funcWrapperWithLessParams(/*3 params*/)
	{
		funcWithManyParams(/*fill in some default params*/);
	}
	//this func is inlined in the MS SDK header
}

DMD complains that the function body of funcWrapperWithLessParams isn't 
abstract.


More information about the Digitalmars-d-learn mailing list