-
Notifications
You must be signed in to change notification settings - Fork 8
/
dllmain.hpp
executable file
·87 lines (76 loc) · 2.84 KB
/
dllmain.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
// dllmain.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#pragma once
#if _WIN32
// Including SDKDDKVer.h defines the highest available Windows platform.
// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
#include <SDKDDKVer.h>
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files:
#include <windows.h>
#endif
//#ifndef DWORD
//#define WINAPI
//typedef unsigned long DWORD;
//typedef short WCHAR;
//typedef void * HANDLE;
//#define MAX_PATH PATH_MAX
//typedef unsigned char BYTE;
//typedef unsigned short WORD;
//typedef unsigned int BOOL;
//#endif
// The following ifdef block is the standard way of creating macros which make exporting
// from a DLL simpler. All files within this DLL are compiled with the WELLINDEXCALCULATOR_EXPORTS
// symbol defined on the command line. This symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see
// WELLINDEXCALCULATOR_API functions as being imported from a DLL, whereas this DLL sees symbols
// defined with this macro as being exported.
#ifdef WELLINDEXCALCULATOR_EXPORTS
#if _WIN32
#ifdef __cplusplus
#define WELLINDEXCALCULATOR_API extern "C" __declspec(dllexport)
#else
#define WELLINDEXCALCULATOR_API __declspec(dllexport)
#endif
#else
#ifdef __cplusplus
#define WELLINDEXCALCULATOR_API extern "C"
#else
#define WELLINDEXCALCULATOR_API
#endif
#endif
#else
#if _WIN32
#ifdef __cplusplus
#define WELLINDEXCALCULATOR_API extern "C" __declspec(dllimport)
#else
#define WELLINDEXCALCULATOR_API __declspec(dllimport)
#endif
#else
#ifdef __cplusplus
#define WELLINDEXCALCULATOR_API extern "C"
#else
#define WELLINDEXCALCULATOR_API
#endif
#endif
#endif
// This is the constructor of a class that has been exported.
// This class is exported from the WellIndexCalculator.dll
//class WELLINDEXCALCULATOR_API CWellIndexCalculator {
//public:
// CWellIndexCalculator(void);
// TODO: add your methods here.
//};
// This is an example of an exported variable
void* grid;
// This is an example of an exported function.
WELLINDEXCALCULATOR_API int computeWellIndices(
const char* gridpth,
const double* heel, const double* toe, const double* wellbore_radius,
int* n, int* i, int* j, int* k, double* wi);
WELLINDEXCALCULATOR_API int computeBlockCenter(
const char* gridpth,
const int* heel, const int* toe, double* heelxyz, double* toexyz);