Direct Entry Access - National Instruments NI-CAN User Manual

Table of Contents

Advertisement

Chapter 2
Developing Your Application
NI-CAN User Manual
application. You can then call the NI-CAN functions without any extra
effort.
For C applications (files with
the following line to the beginning of your code:
#include "nican.h"
For C++ applications (files with
adding the following lines to the beginning of your code:
#define _cplusplus
#include "nican.h"
The
define allows
_cplusplus
from C++ to the C language NI-CAN functions.
For Microsoft Visual C++, link your application with the NI-CAN
language interface for Microsoft C/C++,
For Borland C/C++ (5.0 or later), link your application with the NI-CAN
language interface for Borland C/C++,
C/C++ 4.5, you must use direct entry access for NI-CAN.
For LabWindows/CVI, your application is linked with the NI-CAN
language interface for LabWindows/CVI,
installed automatically based on the installed compatible compiler.
For detailed information on how to compile and link your NI-CAN
application, refer to the
directory.

Direct Entry Access

You can directly access
that allows you to request addresses of functions that a DLL exports.
To use direct entry access, you must first load
C language code fragment illustrates how to call the Win32
function and check for an error:
#include <windows.h>
#include "nican.h"
HINSTANCE NicanLib = NULL;
NicanLib=LoadLibrary("nican.dll");
if (NicanLib == NULL) {
extension), include
.c
extension), include
.cpp
to properly handle the transition
nican.h
nicanmsc.lib
nicanbor.lib
nican.lib
file in the NI-CAN
readme.txt
from any programming environment
nican.dll
2-2
by adding
nican.h
nican.h
.
. For Borland
. This library is
examples
. The following
nican.dll
LoadLibrary
by
ni.com

Advertisement

Table of Contents
loading

Table of Contents