Path: blob/master/external/source/vncdll/winvnc/DynamicFn.cpp
19591 views
/* Copyright (C) 2002-2005 RealVNC Ltd. All Rights Reserved.1* Copyright (C) 2007 Constantin Kaplinsky. All Rights Reserved.2*3* This is free software; you can redistribute it and/or modify4* it under the terms of the GNU General Public License as published by5* the Free Software Foundation; either version 2 of the License, or6* (at your option) any later version.7*8* This software is distributed in the hope that it will be useful,9* but WITHOUT ANY WARRANTY; without even the implied warranty of10* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the11* GNU General Public License for more details.12*13* You should have received a copy of the GNU General Public License14* along with this software; if not, write to the Free Software15* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,16* USA.17*/1819#include "DynamicFn.h"2021DynamicFnBase::DynamicFnBase(const TCHAR* dllName, const char* fnName) : dllHandle(0), fnPtr(0) {22dllHandle = LoadLibrary(dllName);23if (!dllHandle) {24return;25}26fnPtr = GetProcAddress(dllHandle, fnName);27}2829DynamicFnBase::~DynamicFnBase() {30if (dllHandle)31FreeLibrary(dllHandle);32}3334353637