Deditec USB-OPTOIN-8_B Hoja De Datos
![Deditec](https://files.manualsbrain.com/attachments/a76b78ffc5e50c07b8e4d95d0426c3f3908f6d10/common/fit/150/50/bc1d513137811a3530c47242f8c7f5c641167c30149915d948b33926cce6/brand_logo.gif)
DELIB API Referenz | Seite
52
4.5. Programmier-Beispiel
//********************************************************************
//********************************************************************
//********************************************************************
//********************************************************************
//********************************************************************
//
//
// product: usb-optoin-8-relais-8 (ModuleID = USB_OPTOIN_8_RELAIS_8)
// configuration: digital-outputs
// programming language: vc
//
//
// (c) DEDITEC GmbH, 2011
// web: http://www.deditec.de/
// mail: vertrieb@deditec.de
//
//
//********************************************************************
//********************************************************************
//********************************************************************
//********************************************************************
//********************************************************************
//
//
// Please include the following library on linking: delib.lib
//
// This can be done at the project settings (Project/Settings/Link ->
// Object/library modules) .. extend the existing line with the ending
// "$(DELIB_LIB)\delib.lib"
(with quotation marks)
//
// Including the header file delib.h (Project/Settings/C/C++ -> select
category
// "Preprocessor" -> Additional inlude directories) .. enter the line
// "$(DELIB_INCLUDE)"
(with quotation marks)
#include <windows.h>
#include <stdio.h>
#include "conio.h"
#include "delib.h"
// -------------------------------------------------------------------
// GetLastError function
BOOL IsError()
{
unsigned char msg[500];
if (DapiGetLastError() != DAPI_ERR_NONE)
{
DapiGetLastErrorText((unsigned char*) msg, sizeof(msg));
printf("Error Code = %x * Message = %s\n", 0, msg);