Use DLL compilado en Delphi 7 en C #
Necesito usar un DLL (Extractor de ID de hardware) hecho en Delphi 7 en mi aplicación C #.
Las funciones exportadas por esta DLL son:
Funciones exportadas:
<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>
Sé (obviamente) que la cadena en Delphi no está terminada en nulo y es byte (ASCII). Pero no tengo idea de cómo asignar estas cadenas de Delphi a C #.
Gracias.