// Copyright (c) 2012 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 "base/win/metro.h" #include "base/string_util.h" namespace base { namespace win { HMODULE GetMetroModule() { return GetModuleHandleA("metro_driver.dll"); } wchar_t* LocalAllocAndCopyString(const string16& src) { size_t dest_size = (src.length() + 1) * sizeof(wchar_t); wchar_t* dest = reinterpret_cast(LocalAlloc(LPTR, dest_size)); base::wcslcpy(dest, src.c_str(), dest_size); return dest; } } // namespace win } // namespace base