blob: 5ea4c7b21323a4caf9468f89797bf524e086bfe7 [file] [log] [blame]
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <windows.h>
// Arg1: pointer to a buffer of size MAX_PATH + 1.
bool GetPathOnDisk(wchar_t* buffer) {
if (buffer == nullptr)
return false;
if (::GetModuleFileNameW((HINSTANCE)&__ImageBase, buffer, MAX_PATH) == 0)
return false;
return true;
BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved) {
return TRUE;