Adding the path to the include file, Declaration in the source file, Load library statement – Yokogawa PC-Based MX100 User Manual
Page 1054
![background image](/manuals/360310/1054/background.png)
20-11
IM MX190-01E
20
DARWIN for Extended API - Visual C -
20.4 Program for Loading Instantaneous Value Data
- DARWIN/Visual C -
Adding the Path to the Include File
Add the path of the include file (DAQDA100.h) to the project. The method of adding
the include file varies depending on the environment used.
Declaration in the Source File
Write the declaration in the source file.
#include "DAQDA100Reader.h"
Note
The include files of the common section (DAQHandler.h, DAQDARWIN, and
DAQDA100) are referenced from the include file described above. Thus, declaration
for it is not necessary.
Load Library Statement
The statement below is added so that the executable module (.dll) of the extension
API can link to the process.
The executable module (.dll) of the extension API is mapped within the address
space (LoadLibrary). Next, the address of the export function in the executable
module is retrieved (GetProcAddress).
The callback type of the function pointer is the function name with a prefix “DLL”
added and converted to uppercase. It is defined in the include file of the extension
API.
HMODULE pDll = LoadLibrary("DAQDA100");
DLLOPENDA100READER openDA100Reader =
(DLLOPENDA100READER)GetProcAddress(pDll, "openDA100Reader";