Dllimport

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top