hendrikw | b1ac52f | 2015-10-01 18:29:34 -0700 | [diff] [blame] | 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 | */ |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 7 | #include "include/core/SkTypes.h" |
Mike Klein | 8f11d4d | 2018-01-24 12:42:55 -0500 | [diff] [blame] | 8 | #if defined(SK_BUILD_FOR_WIN) |
mtklein | 1ee7651 | 2015-11-02 10:20:27 -0800 | [diff] [blame] | 9 | |
Ben Wagner | ab6eefe | 2019-05-20 11:02:49 -0400 | [diff] [blame] | 10 | #include "src/core/SkLeanWindows.h" |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 11 | #include "src/ports/SkOSLibrary.h" |
hendrikw | b1ac52f | 2015-10-01 18:29:34 -0700 | [diff] [blame] | 12 | |
| 13 | void* DynamicLoadLibrary(const char* libraryName) { |
jvanverth | 7a897c0 | 2016-01-04 08:14:18 -0800 | [diff] [blame] | 14 | return LoadLibraryA(libraryName); |
hendrikw | b1ac52f | 2015-10-01 18:29:34 -0700 | [diff] [blame] | 15 | } |
| 16 | |
| 17 | void* GetProcedureAddress(void* library, const char* functionName) { |
cjacek | c721196 | 2016-01-25 07:27:36 -0800 | [diff] [blame] | 18 | return reinterpret_cast<void*>(::GetProcAddress((HMODULE)library, functionName)); |
hendrikw | b1ac52f | 2015-10-01 18:29:34 -0700 | [diff] [blame] | 19 | } |
mtklein | 1ee7651 | 2015-11-02 10:20:27 -0800 | [diff] [blame] | 20 | |
Mike Klein | 8f11d4d | 2018-01-24 12:42:55 -0500 | [diff] [blame] | 21 | #endif//defined(SK_BUILD_FOR_WIN) |