Dllimport

  • Thread starter Thread starter paul f
  • Start date Start date
P

paul f

Hi there
I have a C++ function that can be accessed via paul.dll, below is a
copy of a portion of header file:

__declspec( dllexport ) int Function(char *Inputdata, char
*OutputData, unsigned int &iLenData, unsigned char *strInput, unsigned
int iLen);

copy of how function is crerated in cpp file

__declspec( dllexport ) int Function(char *dataToDecrypt, char
*OutputData, unsigned int &iLenData, unsigned char *strInput, unsigned
int iLen)


variables need to be initialised in c# code as follows:
Inputdata = "343454fgfg="
strInput =ATL::"WSFRT^4544&<>%{}?@~^"
ilenData = 10
iLen = 21
OutputData =""

This function takes in top 4 values and passes back 20 characters to
OutputData.


How do I import this function into c# code, initialise above variables
and call function sucessfully so that it loads data into OutputData
variable?
 
Back
Top