Latest news: November 14, 2008
Advanced WiFi-Manager v3.2 released!
October 21, 2008
WinI2C/DDC Lite v3.22 released!
October 20, 2008
Advanced WiFi-Manager v3.1 released!
October 17, 2008
WinI2C/DDC v3.22 released!
| | |
|
WinI2C/DDC: Developer's Guide
|
WinI2C/DDC API Reference
* - Function is not available in WinI2C/DDC Lite.
DWORD EnableLog(char *path, int removeold)
For debug purposes. This function enables the log file for WinI2C/DDC library.
Parameters:
| path [IN] - Path to the log file. |
| removeold [IN] - Parameter that specifies whether to remove old log file or not. |
Return value: Zero if success, otherwise
error code.
VB declaration:
Function EnableLog (ByVal path As String, removeold As Long) As Long
Delphi declaration:
function EnableLog(path:pchar; removeold:integer):DWORD; stdcall;
Top
DWORD DisableLog()
For debug purposes. This function disables the log file for WinI2C/DDC library.
Parameters: None
Return value: Zero if success, otherwise
error code.
VB declaration:
Function DisableLog () As Long
Delphi declaration:
function DisableLog():DWORD; stdcall;
Top
DWORD WriteLog(char *str)
For debug purposes. This function appends string to the log file for WinI2C/DDC library.
Parameters:
| str [IN] - String to append. |
Return value: Zero if success, otherwise
error code.
VB declaration:
Function WriteLog (ByVal str As String) As Long
Delphi declaration:
function WriteLog(str:pchar):DWORD; stdcall;
Top
DWORD GetLibraryVersion()
Retrieves the version number of WinI2C/DDC library.
Parameters: None
Return value: Version number if success, otherwise
error code.
VB declaration:
Function GetLibraryVersion () As Long
Delphi declaration:
function GetLibraryVersion():DWORD; stdcall;
Top
DWORD GetLibraryOption(DWORD OptionIndex)
Retrieves current value of WinI2C/DDC library option.
Parameters:
| OptionIndex [IN] - option index, see OPT_xxx constants for possible values.
|
Return value: Option value if success, otherwise
error code.
VB declaration:
Function GetLibraryOption (ByVal OptionIndex As Long) As Long
Delphi declaration:
function GetLibraryOption(OptionIndex:DWORD):DWORD; stdcall;
Top
DWORD SetLibraryOption(DWORD OptionIndex, DWORD Value)
Sets new value of WinI2C/DDC library option.
Parameters:
| OptionIndex [IN] - option index, see OPT_xxx constants for possible values.
| | Value [IN] - new option value.
|
Return value: Zero if success, otherwise
error code.
VB declaration:
Function SetLibraryOption (ByVal OptionIndex As Long, ByVal Value As Long) As Long
Delphi declaration:
function SetLibraryOption(OptionIndex:DWORD; Value:DWORD):DWORD; stdcall;
Top
DWORD InstallDriver(char *path, int autostart)
This function installs and starts WinI2C/DDC driver.
Parameters:
| path [IN] - Path to folder that contains the driver (ddcdrv.sys).
For example, "c:\Driver".
If NULL, "<windows>\system32\drivers" path will be used (recommended). |
| autostart [IN] - Autostart flag. If 1 - driver will be started when Windows starts (recommended),
if 0 - driver will not be started automatically. |
Return value: Zero if success, otherwise
error code.
Note: This function requires administration privileges.
VB declaration:
Function InstallDriver (ByVal path As String, autostart As Long) As Long
Delphi declaration:
function InstallDriver(path:pchar; autostart:integer):DWORD; stdcall;
Top
DWORD UninstallDriver()
This function stops and uninstalls WinI2C/DDC driver.
Parameters: None
Return value: Zero if success, otherwise
error code.
Note: This function requires administration privileges.
VB declaration:
Function UninstallDriver () As Long
Delphi declaration:
function UninstallDriver():DWORD; stdcall;
Top
DWORD InitDDCHelper()
This function initializes WinI2C/DDC library.
Parameters: None
Return value: Zero if success, otherwise
error code.
Note: This function must be called before using WinI2C/DDC library.
VB declaration:
Function InitDDCHelper () As Long
Delphi declaration:
function InitDDCHelper():DWORD; stdcall;
Top
DWORD DeinitDDCHelper()
This function frees all memory and resources allocated by WinI2C/DDC library.
Parameters: None
Return value: Zero if success, otherwise error code.
Note: This function must be called when WinI2C/DDC library is not necessary anymore.
VB declaration:
Function DeinitDDCHelper () As Long
Delphi declaration:
function DeinitDDCHelper():DWORD; stdcall;
Top
DWORD EnumGetFirst(PEDISP *Display)
Starts the monitors enumeration. You should enumerate all available monitors before using any I2C/DDC communication functions.
Parameters:
| Display [OUT] - Pointer to PEDISP variable that will receive WinI2C/DDC display handle
for first enumerated monitor.
|
Return value: Zero if success, otherwise error code.
VB declaration:
Function EnumGetFirst (ByRef Display As Long) As Long
Delphi declaration:
function EnumGetFirst(var Display:PEDISP):DWORD; stdcall;
Top
DWORD EnumGetNext(PEDISP *Display)
Continues the monitors enumeration. You should enumerate all available monitors before using any I2C/DDC communication functions.
Parameters:
| Display [OUT] - Pointer to PEDISP variable that will receive WinI2C/DDC display handle
for next enumerated monitor.
|
Return value: Zero if success, otherwise error code.
VB declaration:
Function EnumGetNext (ByRef Display As Long) As Long
Delphi declaration:
function EnumGetNext(var Display:PEDISP):DWORD; stdcall;
Top
DWORD ReadEDID(PEDISP Device, PUCHAR pEDID)
Reads 128 bytes EDID data from the monitor via DDC bus.
Parameters:
| Device [IN] - WinI2C/DDC display handle for the monitor
that was obtained by EnumGetFirst / EnumGetNext functions. |
| pEDID [OUT] - Pointer to buffer that will receive EDID data.
The buffer must have 128 bytes size, you must allocate this memory before calling this function. |
Return value: Zero if success, otherwise error code.
VB declaration:
Function ReadEDID (ByVal Display As Long, ByVal pEDID As Long) As Long
Delphi declaration:
function ReadEDID(Device:PEDISP; pEDID:pointer):DWORD; stdcall;
Top
DWORD ReadEDID256(PEDISP Device, PUCHAR pEDID)
Reads 256 bytes EDID data from the monitor via DDC bus.
Parameters:
| Device [IN] - WinI2C/DDC display handle for the monitor
that was obtained by EnumGetFirst / EnumGetNext functions. |
| pEDID [OUT] - Pointer to buffer that will receive EDID data.
The buffer must have 256 bytes size, you must allocate this memory before calling this function. |
Return value: Zero if success, otherwise error code.
VB declaration:
Function ReadEDID256 (ByVal Display As Long, ByVal pEDID As Long) As Long
Delphi declaration:
function ReadEDID256(Device:PEDISP; pEDID:pointer):DWORD; stdcall;
Top
DWORD GetCachedEDID256(PEDISP Device, PUCHAR pEDID)
Returns 256 bytes EDID data that has been read at monitors enumeration. This function does not read EDID via I2C bus,
it just returns cached data.
Parameters:
| Device [IN] - WinI2C/DDC display handle for the monitor
that was obtained by EnumGetFirst / EnumGetNext functions. |
| pEDID [OUT] - Pointer to buffer that will receive EDID data.
The buffer must have 256 bytes size, you must allocate this memory before calling this function. |
Return value: Zero if success, otherwise error code.
VB declaration:
Function GetCachedEDID256 (ByVal Display As Long, ByVal pEDID As Long) As Long
Delphi declaration:
function GetCachedEDID256(Device:PEDISP; pEDID:pointer):DWORD; stdcall;
Top
DWORD GetEDIDOption(PUCHAR pEDID, DWORD OptionIndex, char *Value, int MaxCount)
Extracts options values from EDID.
Parameters:
| pEDID [IN] - Pointer to buffer that contains EDID data (128 or 256 bytes). |
| OptionIndex [IN] - option to extract, see EDID_xxx constants for possible values. |
| Value [OUT] - Pointer to buffer that will receive option's value as string. |
| MaxCount [IN] - Length of the buffer, including the terminating null character. |
Return value: If success, the length of the received string, otherwise error code.
VB declaration:
Function GetEDIDOption (ByVal pEDID As Long, OptionIndex As Long, ByVal Value As String, MaxCount As Long) As Long
Delphi declaration:
function GetEDIDOption(pEDID:pointer; OptionIndex:DWORD; Value:pchar; MaxCount:DWORD):DWORD; stdcall;
Top
DWORD TestAddr(PEDISP Device, UCHAR addr)
Tests an address on DDC bus.
Parameters:
| Device [IN] - WinI2C/DDC display handle for the monitor
that was obtained by EnumGetFirst / EnumGetNext functions. |
| addr [IN] - Address on DDC bus for testing. |
Return value: Zero if success (address specified is available), otherwise error code.
Note: This function is not available in WinI2C/DDC Lite.
VB declaration:
Function TestAddr (ByVal Display As Long, ByVal addr As Byte) As Long
Delphi declaration:
function TestAddr(Device:PEDISP; Addr:byte):DWORD; stdcall;
Top
DWORD GetCIValue(PEDISP Device, UCHAR Command, PUCHAR Value, PUCHAR MaxValue)
Reads current value of specified CI parameter.
Parameters:
| Device [IN] - WinI2C/DDC display handle for the monitor
that was obtained by EnumGetFirst / EnumGetNext functions. |
| Command [IN] - An index of CI command. |
| Value [OUT] - Current value of this CI parameter. |
| MaxValue [OUT] - Max allowed value of this CI parameter. |
Return value: Zero if success, otherwise error code.
Note: This function is not available in WinI2C/DDC Lite.
VB declaration:
Function GetCIValue (ByVal Display As Long, ByVal Command As Byte, ByRef Value As Long, ByRef MaxValue As Long) As Long
Delphi declaration:
function GetCIValue(Device:PEDISP; Command:byte; var Value:DWORD; var MaxValue:DWORD):DWORD; stdcall;
Top
DWORD SetCIValue(PEDISP Device, UCHAR Command, UCHAR Value)
Sets new value of specified CI parameter.
Parameters:
| Device [IN] - WinI2C/DDC display handle for the monitor
that was obtained by EnumGetFirst / EnumGetNext functions. |
| Command [IN] - An index of CI command. |
| Value [IN] - New value of this CI parameter. |
Return value: Zero if success, otherwise error code.
Note: This function is not available in WinI2C/DDC Lite.
VB declaration:
Function SetCIValue (ByVal Display As Long, ByVal Command As Byte, ByVal Value As Long) As Long
Delphi declaration:
function SetCIValue(Device:PEDISP; Command:byte; Value:DWORD):DWORD; stdcall;
Top
DWORD ReadI2CBuf(PEDISP Device, UCHAR Addr, PUCHAR Buf, UCHAR Length, DWORD Flags)
Reads data buffer from I2C bus.
Parameters:
| Device [IN] - WinI2C/DDC display handle for the monitor
that was obtained by EnumGetFirst / EnumGetNext functions. |
| Addr [IN] - Address on I2C bus. |
| Buf [OUT] - Pointer to a buffer to read. You must allocate memory for the buffer before calling this function. |
| Length [IN] - Length of the buffer to read. |
| Flags [IN] - Additional flags. Specify 0 for normal operation, NO_STOP_BIT if stop bit of I2C packet must be skipped, NO_ADDR_PART if
address part of I2C packet must be skipped. |
Return value: Zero if success, otherwise error code.
Note: This function is not available in WinI2C/DDC Lite.
VB declaration:
Function ReadI2CBuf (ByVal Display As Long, ByVal addr As Byte, ByVal BuffAddr As Long, ByVal Length As Byte, ByVal Flags As Long) As Long
Delphi declaration:
function ReadI2CBuf(Device:PEDISP; addr:byte; Buf:pointer; Length:byte; Flags:DWORD):DWORD; stdcall;
Top
DWORD WriteI2CBuf(PEDISP Device, UCHAR Addr, PUCHAR Buf, UCHAR Length, DWORD Flags)
Writes data buffer to I2C bus.
Parameters:
| Device [IN] - WinI2C/DDC display handle for the monitor
that was obtained by EnumGetFirst / EnumGetNext functions. |
| Addr [IN] - Address on I2C bus. |
| Buf [IN] - Pointer to a buffer to write. |
| Length [IN] - Length of the buffer to write. |
| Flags [IN] - Additional flags. Specify 0 for normal operation, NO_STOP_BIT if stop bit of I2C packet must be skipped, NO_ADDR_PART if
address part of I2C packet must be skipped. |
Return value: Zero if success, otherwise error code.
Note: This function is not available in WinI2C/DDC Lite.
VB declaration:
Function WriteI2CBuf (ByVal Display As Long, ByVal addr As Byte, ByVal BuffAddr As Long, ByVal Length As Byte, ByVal Flags As Long) As Long
Delphi declaration:
function WriteI2CBuf(Device:PEDISP; Addr:byte; Buf:pointer; Length:byte; Flags:DWORD):DWORD; stdcall;
Top
DWORD DDCCIRead(PEDISP Device, UCHAR *Buffer, UCHAR *len)
Reads data buffer from DDC bus. This function reads DDC-CI packet from the monitor and validate it.
Parameters:
| Device [IN] - WinI2C/DDC display handle for the monitor
that was obtained by EnumGetFirst / EnumGetNext functions. |
| Buffer [OUT] - Pointer to a buffer to read. You must allocate memory for the buffer before calling this function. |
| len [IN] - Length of the buffer to read. |
Return value: Zero if success, otherwise error code.
Note: This function is not available in WinI2C/DDC Lite.
VB declaration:
Function DDCCIRead (ByVal Display As Long, ByVal BuffAddr As Long, ByRef Length As Byte) As Long
Delphi declaration:
function DDCCIRead(Device:PEDISP; Buffer:pointer; var len:byte):DWORD; stdcall;
Top
DWORD DDCCIWrite(PEDISP Device, UCHAR *Buffer, UCHAR len)
Writes data buffer to DDC bus. This function creates DDC-CI packet and sends it via I2C bus.
Parameters:
| Device [IN] - WinI2C/DDC display handle for the monitor
that was obtained by EnumGetFirst / EnumGetNext functions. |
| Buffer [IN] - Pointer to a buffer to write. |
| len [IN] - Length of the buffer to write. |
Return value: Zero if success, otherwise error code.
Note: This function is not available in WinI2C/DDC Lite.
VB declaration:
Function DDCCIWrite (ByVal Display As Long, ByVal BuffAddr As Long, ByVal Length As Byte) As Long
Delphi declaration:
function DDCCIWrite(Device:PEDISP; Buffer:pointer; len:byte):DWORD; stdcall;
Top
DWORD GetSDA(PEDISP Device)
Retrieves SDA line state. Functions GetSDA, SetSDA, GetSCL and SetSCL are the most low-level functions, they allows you to manage I2C lines
directly.
Parameters:
| Device [IN] - WinI2C/DDC display handle for the monitor
that was obtained by EnumGetFirst / EnumGetNext functions. |
Return value: SDA line state (0 or 1) if success, otherwise error code.
Notes: This function is supported only in native mode (direct communication with the video chip). This function is not available in WinI2C/DDC Lite.
VB declaration:
Function GetSDA (ByVal Display As Long) As Long
Delphi declaration:
function GetSDA(Device:PEDISP):DWORD; stdcall;
Top
DWORD SetSDA(PEDISP Device, DWORD State)
Sets SDA line state. Functions GetSDA, SetSDA, GetSCL and SetSCL are the most low-level functions, they allows you to manage I2C lines
directly.
Parameters:
| Device [IN] - WinI2C/DDC display handle for the monitor
that was obtained by EnumGetFirst / EnumGetNext functions. |
| State [IN] - New state for SDA line (0 or 1). |
Return value: Zero if success, otherwise error code.
Notes: This function is supported only in native mode (direct communication with the video chip). This function is not available in WinI2C/DDC Lite.
Warning: This is the most low-level function, use it only if you have enough experience with I2C bus.
In the most cases you should use ReadI2CBuf/WriteI2CBuf functions instead.
VB declaration:
Function SetSDA (ByVal Display As Long, ByVal State As Long) As Long
Delphi declaration:
function SetSDA(Device:PEDISP; State:DWORD):DWORD; stdcall;
Top
DWORD GetSCL(PEDISP Device)
Retrieves SCL line state. Functions GetSDA, SetSDA, GetSCL and SetSCL are the most low-level functions, they allows you to manage I2C lines
directly.
Parameters:
| Device [IN] - WinI2C/DDC display handle for the monitor
that was obtained by EnumGetFirst / EnumGetNext functions. |
Return value: SCL line state (0 or 1) if success, otherwise error code.
Notes: This function is supported only in native mode (direct communication with the video chip). This function is not available in WinI2C/DDC Lite.
VB declaration:
Function GetSCL (ByVal Display As Long) As Long
Delphi declaration:
function GetSCL(Device:PEDISP):DWORD; stdcall;
Top
DWORD SetSCL(PEDISP Device, DWORD State)
Sets SCL line state. Functions GetSDA, SetSDA, GetSCL and SetSCL are the most low-level functions, they allows you to manage I2C lines
directly.
Parameters:
| Device [IN] - WinI2C/DDC display handle for the monitor
that was obtained by EnumGetFirst / EnumGetNext functions. |
| State [IN] - New state for SCL line (0 or 1). |
Return value: Zero if success, otherwise error code.
Notes: This function is supported only in native mode (direct communication with the video chip). This function is not available in WinI2C/DDC Lite.
Warning: This is the most low-level function, use it only if you have enough experience with I2C bus.
In the most cases you should use ReadI2CBuf/WriteI2CBuf functions instead.
VB declaration:
Function SetSCL (ByVal Display As Long, ByVal State As Long) As Long
Delphi declaration:
function SetSCL(Device:PEDISP; State:DWORD):DWORD; stdcall;
Top
DWORD GetMonitorCapabilitesStr(PEDISP Device, char *buffer, DWORD MaxLen)
Reads a string describing a monitor's capabilities.
Parameters:
| Device [IN] - WinI2C/DDC display handle for the monitor
that was obtained by EnumGetFirst / EnumGetNext functions. |
| buffer [OUT] - Pointer to a buffer that receives the monitor's capabilities string.
You must allocate memory for the buffer before calling this function. |
| MaxLen [IN] - Length of the buffer, including the terminating null character. |
Return value: If success, the length of the received string, otherwise error code.
VB declaration:
Function GetMonitorCapabilitesStr (ByVal Display As Long, ByVal buffer As String, MaxLen As Long) As Long
Delphi declaration:
function GetMonitorCapabilitesStr(Device:PEDISP; buffer:pchar; MaxLen:DWORD):DWORD; stdcall;
Top
DWORD GetMonitorCapabilitesStrLen(PEDISP Device)
Retrieves the length of a monitor's capabilities string.
Parameters:
| Device [IN] - WinI2C/DDC display handle for the monitor
that was obtained by EnumGetFirst / EnumGetNext functions. |
Return value: If success, the length of monitor's capabilities string, otherwise error code.
VB declaration:
Function GetMonitorCapabilitesStrLen (ByVal Display As Long) As Long
Delphi declaration:
function GetMonitorCapabilitesStrLen(Device:PEDISP):DWORD; stdcall;
Top
DWORD DegaussMonitor(PEDISP Device)
Degausses a monitor. Degaussing improves a monitor's image quality and color fidelity by demagnetizing the monitor.
Parameters:
| Device [IN] - WinI2C/DDC display handle for the monitor
that was obtained by EnumGetFirst / EnumGetNext functions. |
Return value: Zero if success, otherwise error code.
VB declaration:
Function DegaussMonitor (ByVal Display As Long) As Long
Delphi declaration:
function DegaussMonitor(Device:PEDISP):DWORD; stdcall;
Top
DWORD GetMonitorBrightness(PEDISP Device, LPDWORD MinBrightness, LPDWORD CurBrightness, LPDWORD MaxBrightness)
Retrieves a monitor's minimum, maximum, and current brightness settings.
Parameters:
| Device [IN] - WinI2C/DDC display handle for the monitor
that was obtained by EnumGetFirst / EnumGetNext functions. |
| MinBrightness [OUT] - Receives the monitor's minimum brightness. |
| CurBrightness [OUT] - Receives the monitor's current brightness. |
| MaxBrightness [OUT] - Receives the monitor's maximum brightness. |
Return value: Zero if success, otherwise error code.
VB declaration:
Function GetMonitorBrightness (ByVal Display As Long, ByRef MinBrightness As Long, ByRef CurBrightness As Long, ByRef MaxBrightness As Long
Delphi declaration:
function GetMonitorBrightness(Device:PEDISP; var MinBrightness:DWORD; var CurBrightness:DWORD; var MaxBrightness:DWORD):DWORD; stdcall;
Top
DWORD SetMonitorBrightness(PEDISP Device, DWORD NewBrightness)
Sets a monitor's brightness value.
Parameters:
| Device [IN] - WinI2C/DDC display handle for the monitor
that was obtained by EnumGetFirst / EnumGetNext functions. |
| NewBrightness [IN] - New brightness value.
To get the monitor's minimum and maximum brightness values, call GetMonitorBrightness function. |
Return value: Zero if success, otherwise error code.
VB declaration:
Function SetMonitorBrightness (ByVal Display As Long, ByVal NewBrightness As Long) As Long
Delphi declaration:
function SetMonitorBrightness(Device:PEDISP; NewBrightness:DWORD):DWORD; stdcall;
Top
DWORD GetMonitorContrast(PEDISP Device, LPDWORD MinContrast, LPDWORD CurContrast, LPDWORD MaxContrast)
Retrieves a monitor's minimum, maximum, and current contrast settings.
Parameters:
| Device [IN] - WinI2C/DDC display handle for the monitor
that was obtained by EnumGetFirst / EnumGetNext functions. |
| MinContrast [OUT] - Receives the monitor's minimum contrast. |
| CurContrast [OUT] - Receives the monitor's current contrast. |
| MaxContrast [OUT] - Receives the monitor's maximum contrast. |
Return value: Zero if success, otherwise error code.
VB declaration:
Function GetMonitorContrast Lib (ByVal Display As Long, ByRef MinContrast As Long, ByRef CurContrast As Long, ByRef MaxContrast As Long) As Long
Delphi declaration:
function GetMonitorContrast(Device:PEDISP; var MinContrast:DWORD; var CurContrast:DWORD; var MaxContrast:DWORD):DWORD; stdcall;
Top
DWORD SetMonitorContrast(PEDISP Device, DWORD NewContrast)
Sets a monitor's contrast value.
Parameters:
| Device [IN] - WinI2C/DDC display handle for the monitor
that was obtained by EnumGetFirst / EnumGetNext functions. |
| NewContrast [IN] - New contrast value.
To get the monitor's minimum and maximum contrast values, call GetMonitorContrast function. |
Return value: Zero if success, otherwise error code.
VB declaration:
Function SetMonitorContrast (ByVal Display As Long, ByVal NewContrast As Long) As Long
Delphi declaration:
function SetMonitorContrast(Device:PEDISP; NewContrast:DWORD):DWORD; stdcall;
Top
DWORD GetMonitorDisplayAreaPosition(PEDISP Device, DWORD PosType, LPDWORD MinPosition, LPDWORD CurPosition, LPDWORD MaxPosition)
Retrieves a monitor's minimum, maximum, and current horizontal or vertical position.
Parameters:
| Device [IN] - WinI2C/DDC display handle for the monitor
that was obtained by EnumGetFirst / EnumGetNext functions. |
| PosType [IN] - Parameter that specifies whether to retrieve the horizontal position or the vertical position.
Must be POSTYPE_X or POSTYPE_Y. |
| MinPosition [OUT] - Receives the minimum horizontal or vertical position. |
| CurPosition [OUT] - Receives the current horizontal or vertical position. |
| MaxPosition [OUT] - Receives the maximum horizontal or vertical position. |
Return value: Zero if success, otherwise error code.
VB declaration:
Function GetMonitorDisplayAreaPosition (ByVal Display As Long, ByVal PosType As Long, ByRef MinPosition As Long, ByRef CurPosition As Long, ByRef MaxPosition As Long) As Long
Delphi declaration:
function GetMonitorDisplayAreaPosition(Device:PEDISP; PosType:DWORD; var MinPosition:DWORD; var CurPosition:DWORD; var MaxPosition:DWORD):DWORD; stdcall;
Top
DWORD SetMonitorDisplayAreaPosition(PEDISP Device, DWORD PosType, DWORD NewPosition)
Sets the horizontal or vertical position of a monitor's display area.
Parameters:
| Device [IN] - WinI2C/DDC display handle for the monitor
that was obtained by EnumGetFirst / EnumGetNext functions. |
| PosType [IN] - Parameter that specifies whether to set the horizontal position or the vertical position.
Must be POSTYPE_X or POSTYPE_Y. |
| NewPosition [IN] - New horizontal or vertical position. To get the minimum and maximum position, call
GetMonitorDisplayAreaPosition function. |
Return value: Zero if success, otherwise error code.
VB declaration:
Function SetMonitorDisplayAreaPosition (ByVal Display As Long, ByVal PosType As Long, ByVal NewPosition As Long) As Long
Delphi declaration:
function SetMonitorDisplayAreaPosition(Device:PEDISP; PosType:DWORD; NewPosition:DWORD):DWORD; stdcall;
Top
DWORD GetMonitorDisplayAreaSize(PEDISP Device, DWORD SizeType, LPDWORD MinSize, LPDWORD CurSize, LPDWORD MaxSize)
Retrieves a monitor's minimum, maximum, and current width or height.
Parameters:
| Device [IN] - WinI2C/DDC display handle for the monitor
that was obtained by EnumGetFirst / EnumGetNext functions. |
| SizeType [IN] - Parameter that specifies whether to retrieve the width or the height.
Must be SIZETYPE_WIDTH or SIZETYPE_HEIGHT. |
| MinSize [OUT] - Receives the minimum width or height. |
| CurSize [OUT] - Receives the current width or height. |
| MaxSize [OUT] - Receives the maximum width or height. |
Return value: Zero if success, otherwise error code.
VB declaration:
Function GetMonitorDisplayAreaSize (ByVal Display As Long, ByVal SizeType As Long, ByRef MinSize As Long, ByRef CurSize As Long, ByRef MaxSize As Long) As Long
Delphi declaration:
function GetMonitorDisplayAreaSize(Device:PEDISP; SizeType:DWORD; var MinSize:DWORD; var CurSize:DWORD; var MaxSize:DWORD):DWORD; stdcall;
Top
DWORD SetMonitorDisplayAreaSize(PEDISP Device, DWORD SizeType, DWORD NewSize)
Sets the width or height of a monitor's display area.
Parameters:
| Device [IN] - WinI2C/DDC display handle for the monitor
that was obtained by EnumGetFirst / EnumGetNext functions. |
| SizeType [IN] - Parameter that specifies whether to set the width or the height.
Must be SIZETYPE_WIDTH or SIZETYPE_HEIGHT. |
| NewSize [IN] - New display area width or height. To get the minimum and maximum size, call
GetMonitorDisplayAreaSize function. |
Return value: Zero if success, otherwise error code.
VB declaration:
Function SetMonitorDisplayAreaSize (ByVal Display As Long, ByVal SizeType As Long, ByVal NewSize As Long) As Long
Delphi declaration:
function SetMonitorDisplayAreaSize(Device:PEDISP; SizeType:DWORD; NewSize:DWORD):DWORD; stdcall;
Top
DWORD GetMonitorGain(PEDISP Device, DWORD GainType, LPDWORD MinGain, LPDWORD CurGain, LPDWORD MaxGain)
Retrieves a monitor's red, green, or blue gain value. Gain settings are generally used to adjust the monitor's white point.
Parameters:
| Device [IN] - WinI2C/DDC display handle for the monitor
that was obtained by EnumGetFirst / EnumGetNext functions. |
| GainType [IN] - Parameter that specifies whether to retrieve the red, green, or blue gain value.
Must be GAINTYPE_RED, GAINTYPE_GREEN or GAINTYPE_BLUE. |
| MinGain [OUT] - Receives the minimum red, green, or blue gain value. |
| CurGain [OUT] - Receives the current red, green, or blue gain value. |
| MaxGain [OUT] - Receives the maximum red, green, or blue gain value. |
Return value: Zero if success, otherwise error code.
VB declaration:
Function GetMonitorGain (ByVal Display As Long, ByVal GainType As Long, ByRef MinGain As Long, ByRef CurGain As Long, ByRef MaxGain As Long) As Long
Delphi declaration:
function GetMonitorGain(Device:PEDISP; GainType:DWORD; var MinGain:DWORD; var CurGain:DWORD; var MaxGain:DWORD):DWORD; stdcall;
Top
DWORD SetMonitorGain(PEDISP Device, DWORD GainType, DWORD NewGain)
Sets a monitor's red, green, or blue gain value. Gain settings are generally used to adjust the monitor's white point.
Parameters:
| Device [IN] - WinI2C/DDC display handle for the monitor
that was obtained by EnumGetFirst / EnumGetNext functions. |
| GainType [IN] - Parameter that specifies whether to set the red, green, or blue gain value.
Must be GAINTYPE_RED, GAINTYPE_GREEN or GAINTYPE_BLUE. |
| NewGain [OUT] - New red, green, or blue gain value. To get the monitor's minimum and maximum gain values,
call GetMonitorGain function. |
Return value: Zero if success, otherwise error code.
VB declaration:
Function SetMonitorGain (ByVal Display As Long, ByVal GainType As Long, ByVal NewGain As Long) As Long
Delphi declaration:
function SetMonitorGain(Device:PEDISP; GainType:DWORD; NewGain:DWORD):DWORD; stdcall;
Top
DWORD GetMonitorTechnologyType(PEDISP Device)
Retrieves the type of technology used by a monitor.
Parameters:
| Device [IN] - WinI2C/DDC display handle for the monitor
that was obtained by EnumGetFirst / EnumGetNext functions. |
Return value: If success, the technology type, otherwise error code.
See TECHNOLOGY_XXXXX constants for possible values.
VB declaration:
Function GetMonitorTechnologyType (ByVal Display As Long) As Long
Delphi declaration:
function GetMonitorTechnologyType(Device:PEDISP):DWORD; stdcall;
Top
DWORD RestoreMonitorFactoryDefaults(PEDISP Device)
Restores a monitor's settings to their factory defaults.
Parameters:
| Device [IN] - WinI2C/DDC display handle for the monitor
that was obtained by EnumGetFirst / EnumGetNext functions. |
Return value: Zero if success, otherwise error code.
VB declaration:
Function RestoreMonitorFactoryDefaults (ByVal Display As Long) As Long
Delphi declaration:
function RestoreMonitorFactoryDefaults(Device:PEDISP):DWORD; stdcall;
Top
DWORD RestoreMonitorFactoryColorDefaults(PEDISP Device)
Restores a monitor's color settings to their factory defaults.
Parameters:
| Device [IN] - WinI2C/DDC display handle for the monitor
that was obtained by EnumGetFirst / EnumGetNext functions. |
Return value: Zero if success, otherwise error code.
VB declaration:
Function RestoreMonitorFactoryColorDefaults (ByVal Display As Long) As Long
Delphi declaration:
function RestoreMonitorFactoryColorDefaults(Device:PEDISP):DWORD; stdcall;
Top
DWORD SaveCurrentMonitorSettings(PEDISP Device)
Saves the current monitor settings to the display's nonvolatile storage.
This function uses "Save Current Settings" function from the Display Data Channel Command Interface (DDC/CI) standard.
Parameters:
| Device [IN] - WinI2C/DDC display handle for the monitor
that was obtained by EnumGetFirst / EnumGetNext functions. |
Return value: Zero if success, otherwise error code.
VB declaration:
Function SaveCurrentMonitorSettings (ByVal Display As Long) As Long
Delphi declaration:
function SaveCurrentMonitorSettings(Device:PEDISP):DWORD; stdcall;
Top
DWORD GetMonitorPowerMode(PEDISP Device, LPDWORD Mode)
Retrieves current monitor power mode.
Parameters:
| Device [IN] - WinI2C/DDC display handle for the monitor
that was obtained by EnumGetFirst / EnumGetNext functions. |
| Mode [OUT] - Current power mode. See POWER_ON,
POWER_STANDBY, POWER_SUSPEND or POWER_OFF constants. |
Return value: Zero if success, otherwise error code.
VB declaration:
Function GetMonitorPowerMode (ByVal Display As Long, ByRef Mode As Long) As Long
Delphi declaration:
function GetMonitorPowerMode(Device:PEDISP; var Mode:DWORD):DWORD; stdcall;
Top
DWORD SetMonitorPowerMode(PEDISP Device, DWORD Mode)
Changes current monitor power mode.
Parameters:
| Device [IN] - WinI2C/DDC display handle for the monitor
that was obtained by EnumGetFirst / EnumGetNext functions. |
| Mode [IN] - New power mode. Must be POWER_ON,
POWER_STANDBY, POWER_SUSPEND or POWER_OFF. |
Return value: Zero if success, otherwise error code.
VB declaration:
Function SetMonitorPowerMode (ByVal Display As Long, ByVal Mode As Long) As Long
Delphi declaration:
function SetMonitorPowerMode(Device:PEDISP; Mode:DWORD):DWORD; stdcall;
Top
DWORD TestDDCSupport(PEDISP Device)
Returns whether monitor supports DDC or not.
Parameters:
| Device [IN] - WinI2C/DDC display handle for the monitor
|
Return value: 1 - when monitor supports DDC, 0 - when monitor does not support DDC, or error code.
VB declaration:
Function TestDDCSupport (ByVal Display As Long) As Long
Delphi declaration:
function TestDDCSupport(Device:PEDISP):DWORD; stdcall;
Top
DWORD IsNativeMode(PEDISP Device)
Returns whether WinI2C/DDC uses native mode for accessing I2C bus for this monitor or not.
Parameters:
| Device [IN] - WinI2C/DDC display handle for the monitor
|
Return value: 1 - when native mode is used (direct communication with video card chip), 0 - when video driver is used for I2C bus accessing,
otherwise error code.
VB declaration:
Function IsNativeMode (ByVal Display As Long) As Long
Delphi declaration:
function IsNativeMode(Device:PEDISP):DWORD; stdcall;
Top
DWORD GetMonitorFromHMONITOR(HMONITOR Handle, PEDISP *Display)
Returns WinI2C/DDC display handle from monitor handle obtained from EnumDisplayMonitors Windows function.
Parameters:
| Handle [IN] - Monitor handle returned by EnumDisplayMonitors Windows function.
| | Display [OUT] - Pointer to PEDISP variable that will receive WinI2C/DDC display handle.
|
Return value: Zero if success, otherwise error code.
Note: You must enumerate monitors (EnumGetFirst / EnumGetNext) before using this function.
VB declaration:
Function GetMonitorFromHMONITOR (ByVal Handle As Long, ByRef Display As Long) As Long
Delphi declaration:
function GetMonitorFromHMONITOR(Handle:HMONITOR; var Display:PEDISP):DWORD; stdcall;
Top
DWORD GetMonitorFromPixel(DWORD x, DWORD y, PEDISP *Display)
Returns WinI2C/DDC display handle for specified desktop point.
Parameters:
| x [IN] - X of dekstop point.
| | y [IN] - Y of dekstop point.
| | Display [OUT] - Pointer to PEDISP variable that will receive WinI2C/DDC display handle.
|
Return value: Zero if success, otherwise error code.
Note: You must enumerate monitors (EnumGetFirst / EnumGetNext) before using this function.
VB declaration:
Function GetMonitorFromPixel (x As Long, y As Long, ByRef Display As Long) As Long
Delphi declaration:
function GetMonitorFromPixel(x:DWORD; y:DWORD; var Display:PEDISP):DWORD; stdcall;
Top
|
|