"Minfu Lu" <Mi*****@discussions.microsoft.com> wrote in message
news:29**********************************@microsof t.com...
This problem is the fouth Out paramter IPicture. I defined a
System.Drawing.Iamge variable and passed it as Out. An unhandled exception
occurs every time when I call this function. I searched
http://www.pinvoke.net, but there is NO any info for this API.
"Out" means that the callee returns a value, you should not pass anything
but an IntPtr, the received value is an Interface pointer for the COM
Interface requested (in second arg.), this interface can be used to access
the COM IPicture object that corresponds to the bitmap passed as first
argument.
But, I have to ask why you need to call this function, you are trying to
mix System.Drawing.Image (GDI+ ) with COM based (OLE) GDI access, this is
something you try to avoid by all means.
Willy.