#ifndef _extcode_H
#define _extcode_H
/**
� Copyright 1990-2007 by National Instruments Corp.
All rights reserved.
@file extcode.h
@brief This document reflects what is published in the CIN manual.
DO NOT CHANGE
*/
#define rcsid_extcode "$Id$"
/* define this to keep C++ isms from littering the code */
#ifdef __cplusplus
/* single instance extern C functions: */
#define EXTERNC extern "C"
/* single instance extern C VARIABLES (needed because MSVC unnecessarily
mangles global variable names): */
#define EEXTERNC extern "C"
/* begin of extern c block: */
#define BEGINEXTERNC extern "C" {
/* end of externc block */
#define ENDEXTERNC }
/* default function argument value */
#define DEFAULTARG(a) = a
#else
#define EXTERNC
#define EEXTERNC extern
#define BEGINEXTERNC
#define ENDEXTERNC
#define DEFAULTARG(a)
#endif
#include "platdefines.h"
#include "fundtypes.h"
#if !defined(_FUNCC)
#if MSWin && (ProcessorType == kX86)
#define _FUNCC __cdecl
#else
#define _FUNCC
#endif
#endif
#if !defined(_FUNCSTDCALL)
#if MSWin && (ProcessorType == kX86)
#define _FUNCSTDCALL __stdcall
#else
#define _FUNCSTDCALL
#endif
#endif
BEGINEXTERNC
#ifdef CIN_VERS
#if MSWin && (ProcessorType == kX86)
#pragma pack(1)
#endif
#endif
/* Multi-threaded categorization macros */
#ifndef TH_REENTRANT
/* Function tags */
#define TH_REENTRANT /* function is completely reentrant and calls only same */
#define TH_PROTECTED /* function uses mutex calls protect itself */
#define TH_SINGLE_UI /* function is known to be used only from UI thread */
#define TH_UNSAFE /* function is NOT thread safe and needs to be made so */
/* Variable tags */
#define TH_READONLY /* (global) variable is never written to after startup */
#endif
#if Mac
/*
// 2002.06.11: Because the gcc compiler and the Metrowerks compiler don't exactly
// agree on the powerpc alignment rules (which are complicated when scalars
// larger than 4 bytes are involved), we have decided to use "native" (or
// "natural") alignment, which uses the same simple rules as are used on other
// platforms. Both gcc and Metrowerks seems to agree on these rules.
// (You can read the rules in "MachORuntime.pdf" available at Apple's Developer
// web site http://developer.apple.com/techpubs/. Search for "machoruntime".)
//
// A simple struct that they disagree on is as follows:
// (Tests done with gcc 3.1 and MWerks Pro 7)
// typedef struct {
// char charZero;
// struct {
// double doubleInStruct; // gcc aligns this to 4, MWerks to 8
// } embeddedStruct;
// } FunnyStruct;
//
// Consequences:
// - A LabVIEW defined struct can be used as an alias for a system defined
// struct only when no members are larger than 4 bytes. The LabVIEW source
// code does not currently do this. Users writing CINs and DLLs should avoid
// this as well, or at least be aware of the potential problems.
// - Neither of the compilers mentioned above have a command line or GUI option
// for setting alignment to "native". So we set it via a pragma here.
// - Definitions of structs that may be affected by the difference in alignment
// should never be made before this point in the include files.
// - Any other setting of the aligment options pragma must be temporary (should
// always be matched by a #pragma options align = reset).
*/
#if (Compiler == kGCC) || (Compiler == kMetroWerks)
#pragma options align = natural
#else
#error "Unsupported compiler. Figure out how to set alignment to native/natural"
#endif
/* these must be defined before we start including Mac headers */
#ifndef ACCESSOR_CALLS_ARE_FUNCTIONS
#define ACCESSOR_CALLS_ARE_FUNCTIONS 1
#endif
#ifndef OPAQUE_TOOLBOX_STRUCTS
#define OPAQUE_TOOLBOX_STRUCTS 1
#endif
#include <MacTypes.h>
typedef const uChar ConstStr255[256];
#else
/* All of these types are provided by Types.h on the Mac */
typedef uChar Str255[256], Str31[32], *StringPtr, **StringHandle;
typedef const uChar ConstStr255[256], *ConstStringPtr;
#endif
/*
Manager Error Codes are the error codes defined in labview-errors.txt
ranging from Error Code 1 to Error Code mgErrSentinel-1 (defined below).
These codes are globally defined in the NI Error Codes Database.
THE labview-errors.txt FILE IS AUTOMAGICALLY GENERATED FROM THE
DATABASE... DO NOT EDIT THEM DIRECTLY. When a new manager error
code is created there, this enum of values is updated to permit the
manager errors from being generated from DLLs and other external
blocks of code.
*/
enum { /* Manager Error Codes */
mgNoErr=0,
#if !Mac
noErr = mgNoErr, /* We need to move away from this, Mac OS headers already define it */
#endif
mgArgErr=1,
mFullErr, /* Memory Mgr 2-3 */
mZoneErr,
fEOF, /* File Mgr 4-12 */
fIsOpen,
fIOErr,
fNotFound,
fNoPerm,
fDiskFull,
fDupPath,
fTMFOpen,
fNotEnabled,
rFNotFound, /* Resource Mgr 13-15 */
rAddFailed,
rNotFound,
iNotFound, /* Image Mgr 16-17 */
iMemoryErr,
dPenNotExist, /* Draw Mgr 18 */
cfgBadType, /* Config Mgr 19-22 */
cfgTokenNotFound,
cfgParseError,
cfgAllocError,
ecLVSBFormatError, /* extCode Mgr 23 */
ecLVSBSubrError, /* extCode Mgr 24 */
ecLVSBNoCodeError, /* extCode Mgr 25 */
wNullWindow, /* Window Mgr 26-27 */
wDestroyMixup,
menuNullMenu, /* Menu Mgr 28 */
pAbortJob, /* Print Mgr 29-35 */
pBadPrintRecord,
pDriverError,
pWindowsError,
pMemoryError,
pDialogError,
pMiscError,
dvInvalidRefnum, /* Device Mgr 36-41 */
dvDeviceNotFound,
dvParamErr,
dvUnitErr,
dvOpenErr,
dvAbortErr,
bogusError, /* generic error 42 */
cancelError, /* cancelled by user 43 */
OMObjLowErr, /* object message dispatcher errors 44-52 */
OMObjHiErr,
OMObjNotInHeapErr,
OMOHeapNotKnownErr,
OMBadDPIdErr,
OMNoDPinTabErr,
OMMsgOutOfRangeErr,
OMMethodNullErr,
OMUnknownMsgErr,
mgNotSupported,
ncBadAddressErr, /* Net Connection errors 54-66 */
ncInProgress,
ncTimeOutErr,
ncBusyErr,
ncNotSupportedErr,
ncNetErr,
ncAddrInUseErr,
ncSysOutOfMem,
ncSysConnAbortedErr, /* 62 */
ncConnRefusedErr,
ncNotConnectedErr,
ncAlreadyConnectedErr,
ncConnClosedErr, /* 66 */
amInitErr, /* (Inter-)Application Message Manager 67- */
occBadOccurrenceErr, /* 68 Occurrence Mgr errors */
occWaitOnUnBoundHdlrErr,
occFunnyQOverFlowErr,
fDataLogTypeConflict, /* 71 */
ecLVSBCannotBeCalledFromThread, /* ExtCode Mgr 72*/
amUnrecognizedType,
mCorruptErr,
ecLVSBErrorMakingTempDLL,
ecLVSBOldCIN, /* ExtCode Mgr 76*/
dragSktNotFound, /* Drag Manager 77 - 80*/
dropLoadErr,
oleRegisterErr,
oleReleaseErr,
fmtTypeMismatch, /* String processing (printf, scanf) errors */
fmtUnknownConversion,
fmtTooFew,
fmtTooMany,
fmtScanError,
ecLVSBFutureCIN, /* ExtCode Mgr 86*/
lvOLEConvertErr,
rtMenuErr,
pwdTampered, /* Password processing */
LvVariantAttrNotFound, /* LvVariant attribute not found 90-91*/
LvVariantTypeMismatch, /* Cannot convert to/from type */
axEventDataNotAvailable, /* Event Data Not Available 92-96*/
axEventStoreNotPresent, /* Event Store Not Present */
axOccurrenceNotFound, /* Occurence Not Found */
axEventQueueNotCreated, /* Event Queue not created */
axEventInfoNotAvailable, /* Event Info is not available */
oleNullRefnumPassed, /* Refnum Passed is Null */
omidGetClassGUIDErr, /* Error retrieving Class GUID from OMId 98-100*/
omidGetCoClassGUIDErr, /* Error retrieving CoClass GUID from OMId */
omidGetTypeLibGUIDErr, /* Error retrieving TypeLib GUID from OMId */
appMagicBad, /* bad built application magic bytes */
iviInvalidDowncast, /* IVI Invalid downcast*/
iviInvalidClassSesn, /* IVI No Class Session Opened */
maxErr