Sdk functions – Argox PT-9130 User Manual

Page 10

Advertising
background image

PT-90 Mobile Computer SDK Programming Manual 3

SDK Functions

When using SDK to develop their own application program, the programmer should link DLL file

or LIB file, then, include header file SYSAPIAX.H.

The following two examples are given to show how to use LIB file and DLL file while developing

an application program. We will use Visual Studio 2005 to illustrate.

Example 1: Using LIB file.

First, programmer should include sysapiax.lib in the application project.

#include "Sysapiax.h"

main()

{

. . . . .

SetBacklightPWM(100, 100);

. . . . .

}

Example 2: Using DLL file.

HINSTANCE dllHandle = NULL;

typedef DWORD (_stdcall *pfnSetBacklightPWM)(int nACPowerPercent, int

nBatteryPercent);

pfnSetBacklightPWM

m_SetBacklightPWM;

main()

{

dllHandle = LoadLibrary(L"SYSAPIAX.dll");

m_SetBacklightPWM = (pfnSetBacklightPWM) ::GetProcAddress(dllHandle,

_T("SetBacklightPWM"));

m_SetBacklightPWM(0, 0);

FreeLibrary(dllHandle);

}

Advertising