c# - correct P/Invoke function signature -


below declaration of c++ function

typedef long (callback* pamsgetmsgw)(char *,char *,q_address *, short *, short *, short *, short *, long *, long *, struct psb *, struct show_buffer *, long *, char *, char *, char * );  

i have created following declaration in c#

[dllimport(@"c:\program files\oracle\oracle messageq\bin\dmqcl32.dll")]      public static extern int pams_get_msgw(byte[] msg_area, ref byte priority, out q_address source,           out short clas, out short type,           ref short msg_area_len, out short len_data, ref int timeout,           ref int sel_filter, out psb psb, out showbuffer show_buffer,           ref int show_buffer_len, ref int large_area_len, out int large_size,           [marshalas(unmanagedtype.lpstr)] string nullarg_3); 

am correct ?


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -