onnxruntime/winml/lib/Api.Ort/OnnxruntimeEnvironment.h
Sheil Kumar efa393e596
WinML should dynamically link against onnxruntime.dll and only system32 for inbox builds (#4615)
* Dynamically link onnxruntime.dll

* fixes

* add preceeding backslash to onnxruntime.dll for inbox builds

* remove /d

* loadlibrary -> loadlibraryex

* use loadlibrary system32 option

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
2020-07-27 09:56:49 -07:00

27 lines
No EOL
550 B
C++

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#pragma warning(push)
#pragma warning(disable : 4505)
namespace _winml {
class OnnxruntimeEnvironment {
public:
OnnxruntimeEnvironment(const OrtApi* ort_api);
HRESULT GetOrtEnvironment(_Out_ OrtEnv** ert_env);
HRESULT EnableDebugOutput(bool is_enabled);
private:
UniqueOrtEnv ort_env_;
};
const OrtApi* GetVersionedOrtApi();
const WinmlAdapterApi* GetVersionedWinmlAdapterApi();
} // namespace _winml
#pragma warning(pop)