Einzelnen Beitrag anzeigen

WojTec

Registriert seit: 17. Mai 2007
482 Beiträge
 
Delphi XE6 Professional
 
#1

Problem with PIP_ADAPTER_INFO

  Alt 28. Jul 2014, 18:36
Delphi-Version: XE5
So, I want to get network adapters and info about it.
Class worked fine till W$7 SP1 - it won't detect network card name as normal W$7 did, but uses some locale string, like 'Połączenie sieciowe Intel(R) 82566DC Gigabit' (previosly was 'Intel(R) 82566DC Gigabit Ethernet' or something similar). My code returns 'Po' in description filed, so problem is in reading PIP_ADAPTER_INFO.Description (I think):

Delphi-Quellcode:
AdapterName: array [0 .. MAX_ADAPTER_NAME_LENGTH + 3] of AnsiChar;
Description: array [0 .. MAX_ADAPTER_DESCRIPTION_LENGTH + 3] of AnsiChar;

PAdapter = ^TAdapter;
TAdapter = record
  Name: string;
  Description: string;
A: PAdapter;

A^.Name := Trim(string(AdapterInfo^.AdapterName));
A^.Description := Trim(string(AdapterInfo^.Description));
How to get valid values
  Mit Zitat antworten Zitat