What is the C# equivalent
VB6
Declare Function EHNDQ_Create Lib "EhnDQw32.DLL" (ByVal lHandle As Integer, ByVal lpszQueueName As String, ByVal lpszQueueLocation As String, ByVal lMaxLength As Long, ByVal nSequence As Integer, ByVal nForce As Integer, ByVal nAuthority As Integer, ByVal nSenderid As Integer, ByVal lpszText As String) As Integer
C#
[DllImport("EhnDQw32.dll")]
public static extern int EHNDQ_Create(int Pid, String QueueName, String QueueLocation, long maxLength, int sequence, int force, int authority, int senderid, string txt);
in C# I get 'AfxOleInit failed'
Regrads,
VB6
Declare Function EHNDQ_Create Lib "EhnDQw32.DLL" (ByVal lHandle As Integer, ByVal lpszQueueName As String, ByVal lpszQueueLocation As String, ByVal lMaxLength As Long, ByVal nSequence As Integer, ByVal nForce As Integer, ByVal nAuthority As Integer, ByVal nSenderid As Integer, ByVal lpszText As String) As Integer
C#
[DllImport("EhnDQw32.dll")]
public static extern int EHNDQ_Create(int Pid, String QueueName, String QueueLocation, long maxLength, int sequence, int force, int authority, int senderid, string txt);
in C# I get 'AfxOleInit failed'
Regrads,