Użyj biblioteki DLL skompilowanej w Delphi 7 w C #

Muszę użyć biblioteki DLL (Hardware ID Extractor) utworzonej w Delphi 7 w mojej aplikacji C #.

Funkcje eksportowane przez tę bibliotekę DLL to:

Wyeksportowane funkcje:

<code>// CPU
function GetCPUSpeed: Double;
function CPUFamily: ShortString; { Get cpu identifier from the windows registry }
function GetCpuTheoreticSpeed: Integer; { Get cpu speed (in MHz) }
function IsCPUIDAvailable: Boolean; Register;
function GetCPUID (CpuCore: byte): ShortString;
Function GetCPUVendor: ShortString;

// RAM
function MemoryStatus (MemType: Integer): cardinal; { in Bytes }
function MemoryStatus_MB (MemType: Integer): ShortString; { in MB }

// HDD
function GetPartitionID (Partition : PChar): ShortString; { Get the ID of the specified patition. Example of parameter: 'C:' }
function GetIDESerialNumber(DriveNumber: Byte ): PChar; { DriveNr is from 0 to 4 }
</code>

Wiem (oczywiście), że łańcuch w Delphi nie jest zakończony znakiem NULL i jest bajtem (ASCII). Ale nie mam pojęcia, jak zmapować te łańcuchy Delphi do C #.

Dzięki.

questionAnswers(3)

yourAnswerToTheQuestion