I want to write a DMX Lightcontrol software in C#. My problem is that I've to rewrite the DLL-calls from Delphi to C#. Following code shows my attempts:
//Delphi-Code:
function GetDMXInterface: pchar; stdcall; external 'DMX510.dll';
function SetLevel(a: array of byte): boolean; stdcall; external 'DMX510.dll';
function GetMaxChannels: integer; external 'DMX510.dll';
//My own C#-Code:
[DllImport("DMX510.DLL")]
public static extern char* GetDMXInterface();
[DllImport("DMX510.DLL")]
public static extern Boolean SetLevel(Byte[] bytearray);
[DllImport("DMX510.DLL")]
public static extern int GetMaxChannels();
Next question how to convert the char pointer returned from GetDMXInterface() to a String
Thanks for your help!