diff options
author | kirthika <kirthika@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-04-06 05:17:36 +0000 |
---|---|---|
committer | kirthika <kirthika@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-04-06 05:17:36 +0000 |
commit | 6eb597b23271cdfa30ca8dad20e9225c22ddccef (patch) | |
tree | aab85878abb2a5b2a5d9758f40d1e4554c5d91e2 /ace/DLL.cpp | |
parent | e393cde00188813f73e180c27e1a136aa43bdd4d (diff) | |
download | ATCD-6eb597b23271cdfa30ca8dad20e9225c22ddccef.tar.gz |
Added set_handle () method.
Diffstat (limited to 'ace/DLL.cpp')
-rw-r--r-- | ace/DLL.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ace/DLL.cpp b/ace/DLL.cpp index 961b3e1cafd..f443ab7cc1a 100644 --- a/ace/DLL.cpp +++ b/ace/DLL.cpp @@ -139,3 +139,22 @@ ACE_DLL::get_handle (int become_owner) // Return the handle requested by the user. return this->handle_; } + +// Set the handle for the DLL. By default, the object will be closed +// before it is destroyed. + +int +ACE_DLL::set_handle (ACE_SHLIB_HANDLE handle, + int close_on_destruction) +{ + // Close the handle in use before accepting the next one. + if (this->close () == -1) + ACE_ERROR_RETURN ((LM_ERROR, + "%s\n", this->error ()), + -1); + + this->handle_ = handle; + this->close_on_destruction_ = close_on_destruction; + + return 0; +} |