i have a c++ dll with two functions in it. The functions look like this:
bool Open (CHAR *file)
bool Read (TCHAR *buffer, unsigned int uiSize)
What i want to do is calling these two functions from within my c#
code. As i understand it the Open function wants a pointer to a filename,
and the Read function wants a pointer to a buffer to which the read string
is written to, and the size of the buffer.
(Quick hint: I know opening/reading from textfiles work in c# aswell, but
this task needs me to use this dll)
Please help me writing up the proper p/invoke (DllImport) code including an example
that shows the use of the p/invoked code, including the return value.