Home
Company
Developer Tools
OCR SDK
WinI2C/DDC
Overview
Features
WinI2C/DDC Lite
Download
Order
Online Help
License Agreement
WiFi-Manager
Utilities
Order
Articles
Contacts
Press
Resellers
Site map
Login


Latest news:
January 31, 2012

WinI2C/DDC v4.02 released!


January 12, 2012

OCR SDK v2.1 released!


December 27, 2011

WiFi-Manager v5.7 released!


December 14, 2011

OCR SDK v2.0 released!









 WinI2C/DDC: Developer's Guide


Getting Started


WinI2C/DDC consists from three files:
  • ddcdrv.sys - The kernel-mode driver supported by Windows 2000/XP/2003/Vista/Windows7. Must be located under "<windows>\system32\drivers" folder.
  • DDCHelper.dll - The library providing driver function call for almost all programming languages under 32-bit Windows versions. Must be located under "<windows>\system32" or any other directory available for the running application.
  • DDCHelperX.dll - ActiveX wrapper for DDCHelper.dll file. Must be located under "<windows>\system32" or any other directory available for the running application. Must be registered through regsvr32.exe before using.
For Windows x64 you should use binaries from "x64" folder of WinI2C/DDC SDK directory. Note trial version has no x64 binaries, therefore it does not support Windows x64, only licensed version does.

Firstly, you should initialize library by calling InitDDCHelper function. It will return S_OK (0) value if success, otherwise it will return error code. WinI2C/DDC driver must be installed, otherwise this function will return ERROR_CANNOTOPENDRIVER value. Use InstallDriver and UninstallDriver functions to install and uninstall driver (note these functions require administration privileges).

After initialization, you should enumerate all available monitors by calling EnumGetFirst and EnumGetNext functions and save received WinI2C/DDC display handles.

...
#include "ddchelper.h"
...
DWORD MyDisplay[10];
int MyDisplayCount=0;

if (EnumGetFirst(&MyDisplay[MyDisplayCount]) == S_OK) // S_OK = 0
{
    MyDisplayCount++;
    while (EnumGetNext(&MyDisplay[MyDisplayCount]) == S_OK)
    {
       MyDisplayCount++;
    }
}

Now you can work with enumerated monitors, for example, the following line of code will set value "50" for the brighness for first enumerated monitor:

SetMonitorBrightness(MyDisplay[0], 50);


Or you can use SetCIValue function:

SetCIValue(MyDisplay[0], 0x10, 50); // 0x10 is the brightness index in DDC/CI specifications.


You should call DeinitDDCHelper function when WinI2C/DDC library is not necessary anymore, this function will release all allocated memory and resources.

WinI2C/DDC package contains demo projects for several programming languages (VB, C++, Delphi, C#, VB.NET), see "Samples" directory for details.




   Copyright ©2002-2011, Nicomsoft Ltd. All Right Reserved.  Privacy Policy  |  Terms of Use