kald af dll i c#
Hej. Jeg vil gerne kalde en dll der ser sådan ud:Metode:
CreateKey( AHandle : THandle; Room, FirstName, LastName : PChar; CheckInDate, CheckOutDate :TDateTime; KeyPuncher, NoOfKeys, KeyType : Integer; Const HotelNo : Integer = -1 ; Const SimpleMode : Boolean = False ) : Boolean
Er dette rigtigt?
[DllImport("DllKey.dll", SetLastError=true,
CharSet=CharSet.Unicode, ExactSpelling=true,
CallingConvention=CallingConvention.StdCall)]
public static extern bool CreateKey(int handle, ref char room, ref char firstename, ref char lastname, DateTime start, DateTime end, int keypuncher, int noofkeys , int keytype, int hotelNumber, bool simpleMode);