Hi,
I m facing a problem in re-writing a code from VB to C #. We are using
a third party DLL to develop a application of Fax. The current
application is already written in VB and we have to convert it into
C#. In VB we are using a function from the DLL whose signature is like
:
Declare Function RFVB_SendFiles1 Lib "RF2VB.DLL" (ByVal hServer As
Long, _
ByVal lFI10Object As
Long, _
ByVal lNI10Object As
Long, _
ByVal fSendWithCover
As Boolean, _
sCoverSheetModel As
String, _
aFiles() As String,
_
hNewFax As Long) As
Long
Now in C# , we are having problems in converting the signature of this
function. We tried the following , but it didn't work. It doesn't give
any error at compile time but at run time this function doesn't work.
I m suspecting that passing a array has some problem
[DLLImport("RF2VB.dll")]
public static extern int RFVB_SendFiles1(int hServer, int lFI10Object
, int lNI10Object, bool fSendWithCover,ref string sCoverSheetModel,
[MarshalAs(UnmanagedType.SafeArray,SafeArraySubType =
VarEnum.VT_BSTR)] ref string [] aFiles ,ref int hNewFax);
Does anybody has any idea of declaring this properly.
Thanks,
Manish