| 1 |
/* |
| 2 |
* Copyright 2015 Google Inc. |
| 3 |
* |
| 4 |
* Use of this source code is governed by a BSD-style license that can be |
| 5 |
* found in the LICENSE file. |
| 6 |
*/ |
| 7 |
#include "include/core/SkTypes.h" |
| 8 |
#if defined(SK_BUILD_FOR_WIN) |
| 9 |
|
| 10 |
#include "src/base/SkLeanWindows.h" |
| 11 |
#include "tools/library/LoadDynamicLibrary.h" |
| 12 |
|
| 13 |
void* SkLoadDynamicLibrary(const char* libraryName) { |
| 14 |
return LoadLibraryA(libraryName); |
| 15 |
} |
| 16 |
|
| 17 |
void* SkGetProcedureAddress(void* library, const char* functionName) { |
| 18 |
return reinterpret_cast<void*>(::GetProcAddress((HMODULE)library, functionName)); |
| 19 |
} |
| 20 |
|
| 21 |
bool SkFreeDynamicLibrary(void* library) { |
| 22 |
return FreeLibrary((HMODULE)library); |
| 23 |
} |
| 24 |
|
| 25 |
#endif//defined(SK_BUILD_FOR_WIN) |