Can somebody let me know how I would implement a dllimport and call
function "Paul" from a C++ dll?
calling syntex:
int __cdecl Paul(char *,char *,unsigned int &,unsigned char *,unsigned int
Does this work?
using System.Runtime.InteropServices;
[DllImport("__cdecl.dll", EntryPoint="Paul")]
static extern int Paul(string arg1, string arg2, System.UInt32 arg3, byte
arg4, System.UInt32 arg5);
No this did not work, the dll file is declared as follows in C++ code:
_declspec (dllexport) int Paul(char *inputData1, char *OutputData,
unsigned int iLenData, unsigned char *inputData2, unsigned int iLen)
`
here is my code so far, getting error Unable to find entry point named
"function" in DLL "Paul.dll":
public partial class Form1 : Form
{
[DllImport("C:\\PAul.dll",EntryPoint ="Function")]
static extern int Function(string Inout1, string Output,
System.UInt32 iLenData, string Input2, System.UInt32 iLen);
public Form1()
{
string Input1= "rrdfgfdgdfg554654gfdg";
string Input2= "dfsfsd45435grg";
string Output="";
int ret;
ret = Function(Input1, Output,25,Input2,32);
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
}