Statistics
| Revision:

svn-gvsig-desktop / tags / v1_10_0_Build_1259 / libraries / libjni-readecw-linux / include / NCSDynamicLib.h @ 43233

History | View | Annotate | Download (1.78 KB)

1
/********************************************************
2
** Copyright 1999 Earth Resource Mapping Ltd.
3
** This document contains proprietary source code of
4
** Earth Resource Mapping Ltd, and can only be used under
5
** one of the three licenses as described in the 
6
** license.txt file supplied with this distribution. 
7
** See separate license.txt file for license details 
8
** and conditions.
9
**
10
** This software is covered by US patent #6,442,298,
11
** #6,102,897 and #6,633,688.  Rights to use these patents 
12
** is included in the license agreements.
13
**
14
** FILE:           NCSUtil\dynamiclib.c
15
** CREATED:        Thursday 2 March 2000
16
** AUTHOR:         Mark Sheridan
17
** PURPOSE:        Dynamic library loading routines
18
** EDITS:
19
** [01] 03Nov00         ny        Merge WinCE/PALM SDK changes with Mac port changes
20
 *******************************************************/
21

    
22
#ifndef NCSDYNAMICLIB_H
23
#define NCSDYNAMICLIB_H
24

    
25
#ifndef NCSTYPES_H
26
#include "NCSTypes.h"
27
#endif
28

    
29
#ifdef __cplusplus
30
extern "C" {
31
#endif
32

    
33
#ifdef WIN32
34

    
35
#define NCS_DLEXT ".dll"
36
#define NCS_FUNCADDR FARPROC
37
#define NCS_DLHANDLE void *
38

    
39
#elif defined PALM
40

    
41
#define NCS_DLEXT ".shl"
42
typedef void (*NCS_FUNCADDR)(void);
43
#define NCS_DLHANDLE UInt16
44

    
45
#elif defined MACINTOSH
46

    
47
#define NCS_DLEXT ".dll"
48
typedef void (*NCS_FUNCADDR)(void);
49
#define NCS_DLHANDLE void *
50

    
51
#elif defined POSIX
52

    
53
#ifdef HPUX
54
#define NCS_DLEXT ".sl"
55
#else
56
#define NCS_DLEXT ".so"
57
#endif
58
typedef void (*NCS_FUNCADDR)(void);
59
#define NCS_DLHANDLE void *
60

    
61
#else
62

    
63
        ERROR: Platform not supported.
64

    
65
#endif        /* WIN32 */
66

    
67
NCS_DLHANDLE NCSDlOpen( char* pLibraryName );
68
void NCSDlClose( NCS_DLHANDLE NCSLibararyHandle );
69
NCS_FUNCADDR NCSDlGetFuncAddress(NCS_DLHANDLE NCSLibararyHandle, char *pFunctionName);
70
BOOLEAN NCSDlFuncExists(char *pLibraryName, char *pFunctionName);
71
char *NCSDlError(void);
72

    
73
#ifdef __cplusplus
74
}
75
#endif
76

    
77
#endif