ATI ADL - AdapterInfo_Get

杀马特。学长 韩版系。学妹 提交于 2019-12-13 04:44:26

问题


Good evening guys!

I'm currently trying to work with a Delphi pascal translation of the ATI ADL structure. In brief, this allows me to retrieve information from an ATI/AMD GPU in a system, and potentially control various aspects of it (such as clock and fan speeds).

The translation was taken from Delphi-Praxis (Google Translated) or Delphi-Praxis (not translated) and the provided example application works. I successfully transferred it over to a visual/GUI application, but i'm having trouble getting my head around expanding from the example. I wish to update one of my existing applications with support for ATI GPU's, but i'm having trouble.

My main purpose is to retrieve the strAdapterName from AdapterInfo inside adl_structures. Having not worked with units like this from scratch before, i'm unsure how i define the type itself inside my application. The record structure of AdapterInfo is as follows;

type
 AdapterInfo = record
  /// Size of the structure.
  iSize : integer;
  /// The ADL index handle. One GPU may be associated with one or two index handles
  iAdapterIndex : integer;
  /// The unique device ID associated with this adapter.
  strUDID : array [0..ADL_MAX_PATH] of char;
  /// The BUS number associated with this adapter.
  iBusNumber : integer;
  /// The driver number associated with this adapter.
  iDeviceNumber : integer;
  /// The function number.
  iFunctionNumber : integer;
  /// The vendor ID associated with this adapter.
  iVendorID : integer;
  /// Adapter name.
  strAdapterName : array [0..ADL_MAX_PATH] of char;
  /// Display name. For example, "\\Display0" for Windows or ":0:0" for Linux.
  strDisplayName : array [0..ADL_MAX_PATH] of char;
  /// Present or not; 1 if present and 0 if not present.
  iPresent : integer;
 // @}
end;

I'm honestly struggling to figure out exactly what i need to define in the type section of my application, and moreover, to actually get something workable.

There's very little delphi-specific information on the ADL library (the only information was the Delphi-praxis link above) and while it's well documented in it's SDK format, i unfortunately lack the knowledge to be able to translate between languages (e.g. i can't read C or C++ code and translate what data type variables are).

Any ideas?

来源:https://stackoverflow.com/questions/11110191/ati-adl-adapterinfo-get

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!