Leaked source code of windows server 2003
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
// Copyright (c) 1997-1999 Microsoft Corporation
//
// Self-freeing DLL class
//
// 10-9-98 sburns
#ifndef SAFEDLL_HPP_INCLUDED
#define SAFEDLL_HPP_INCLUDED
class SafeDLL { public:
// Constructs an instance that will on-demand load the named dll.
//
// dllName - name of the dll to be loaded.
explicit SafeDLL(const String& dllName);
// calls FreeLibrary on the DLL
~SafeDLL();
HRESULT GetProcAddress(const String& functionName, FARPROC& result) const; private:
mutable HMODULE module; String name; };
#endif // SAFEDLL_HPP_INCLUDED
|