This repository has been archived by the owner on May 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathopennurbs_dll.cpp
80 lines (64 loc) · 2.37 KB
/
opennurbs_dll.cpp
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
/* $NoKeywords: $ */
/*
//
// Copyright (c) 1993-2012 Robert McNeel & Associates. All rights reserved.
// OpenNURBS, Rhinoceros, and Rhino3D are registered trademarks of Robert
// McNeel & Associates.
//
// THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
// ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF
// MERCHANTABILITY ARE HEREBY DISCLAIMED.
//
// For complete openNURBS copyright information see <http://www.opennurbs.org>.
//
////////////////////////////////////////////////////////////////
*/
#include "opennurbs.h"
#if !defined(ON_COMPILING_OPENNURBS)
// This check is included in all opennurbs source .c and .cpp files to insure
// ON_COMPILING_OPENNURBS is defined when opennurbs source is compiled.
// When opennurbs source is being compiled, ON_COMPILING_OPENNURBS is defined
// and the opennurbs .h files alter what is declared and how it is declared.
#error ON_COMPILING_OPENNURBS must be defined when compiling opennurbs
#endif
// opennurbs_dll.cpp : Defines the entry point for the Windows DLL application.
//
#if defined(ON_RUNTIME_WIN) && defined(OPENNURBS_EXPORTS)
int APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
static int bRunning = 0;
if ( !bRunning )
{
bRunning = true;
}
switch( ul_reason_for_call ) {
case DLL_PROCESS_ATTACH:
ON_ClassId::IncrementMark(); // make sure each DLL that each process that
// uses OpenNURBS has a unique mark.
break;
// 16 August 2010 Dale Lear:
// These generate too much noise in the output window
//
//case DLL_THREAD_ATTACH:
// ::OutputDebugStringA("OpenNURBS DllMain() ul_reason_for_call = DLL_THREAD_ATTACH\n");
// break;
//case DLL_THREAD_DETACH:
// ::OutputDebugStringA("OpenNURBS DllMain() ul_reason_for_call = DLL_THREAD_DETACH\n");
// break;
//case DLL_PROCESS_DETACH:
// ::OutputDebugStringA("OpenNURBS DllMain() ul_reason_for_call = DLL_PROCESS_DETACH\n");
// break;
//default:
// ::OutputDebugStringA("OpenNURBS DllMain() ul_reason_for_call = ?\n");
// break;
}
return true;
}
///////////////////////////////////////////////////////////////////////////////
//
// For testing crash handling in opennurbs.dll
//
#endif