COM/interface question
BLS
nanali at nospam-wanadoo.fr
Mon Dec 3 02:01:25 PST 2007
May I suggest to have a look at :
http://www.dsource.org/projects/juno/wiki/TypeLibraryImporter
you'll find worthfull COM information and a nice tool to automate this
task.
HTH Bjoern
Mike schrieb:
> I'm getting a strange compilation error with a COM interface I'm trying to access. Here's the relevant part of the interface:
>
> extern(Windows) interface IASIO : IUnknown
> {
> ASIOBool init(void*);
> [snip]
> ASIOError getChannels(long*, long*);
> [snip]
> }
>
> And here's the problem:
>
> test.init(null); // Error: function expected before (), not null of type IASIO*
> test.getChannels(&ichans, &ochans); // compiles
>
> test is of type IASIO*. ASIOBool and ASIOError are both aliases for long. The null in the "init" is not the problem; if I give the function the correct pointer it doesn't compile as well.
>
> Has anybody any idea why one call compiles and the other doesn't?
>
> -Mike
More information about the Digitalmars-d
mailing list