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.