Thanks
[Guid("00020400-0000-0000-c000-000000000046")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown )]
public interface IDispatch
{
[PreserveSig] int GetTypeInfoCount();
UCOMITypeInfo GetTypeInfo(
[MarshalAs(UnmanagedType.U4)] int iTInfo,
[MarshalAs(UnmanagedType.U4)] int lcid);
[PreserveSig] int GetIDsOfNames(
ref Guid riid,
string[] rgsNames,
[MarshalAs(UnmanagedType.U4)] int cNames,
[MarshalAs(UnmanagedType.U4)] int lcid,
ref int[] rgDispId); // I was using out
[PreserveSig] int Invoke(
int dispIdMember,
ref Guid riid,
[MarshalAs(UnmanagedType.U4)] int lcid,
[MarshalAs(UnmanagedType.U4)] int dwFlags,
ref DISPPARAMS pDispParams,
[Out] object[] pVarResult,
ref EXCEPINFO pExcepInfo,
[Out] IntPtr[] pArgErr);
}
Still doesn't work mind. Still get the -1073741819 error and the
rgDispId array is left untouched. Any ideas?
PS. Using a crappy newserver so sorry if this is a double post.
Mattias Sjögren <ma********************@mvps.org> wrote in
news:Oa**************@TK2MSFTNGP09.phx.gbl:
Dominic,
This code sets the result to -1073741819. I can find next to no info
on this error code. Also the rgDispId stays null. What I'm I doing
wrong? Any Ideas?
Can you post your IDispatch declaration?
You seem to have one level of indirection too much on the last
parameter, it shouldn't be ref/out since arrays are reference types.
Mattias