Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#define __COMMON_H

#include "precomp.hxx"
#include <vcclr.h>

using namespace System::Security;

Expand Down Expand Up @@ -64,7 +65,7 @@ private ref class Util sealed

__declspec(noinline) const cli::interior_ptr<const System::Char> static GetPtrToStringChars(System::String^ s)
{
return CriticalPtrToStringChars(s);
return PtrToStringChars(s);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ namespace MS { namespace Internal { namespace Text { namespace TextInterface
{
System::String^ uriString = uri->AbsoluteUri;
IDWriteFontCollection* dwriteFontCollection = NULL;
pin_ptr<const WCHAR> uriPathWChar = CriticalPtrToStringChars(uriString);
pin_ptr<const WCHAR> uriPathWChar = PtrToStringChars(uriString);

IntPtr pIDWriteFontCollectionLoaderMirror = Marshal::GetComInterfaceForObject(
_wpfFontCollectionLoader,
Expand Down Expand Up @@ -299,7 +299,7 @@ namespace MS { namespace Internal { namespace Text { namespace TextInterface
if (isLocal)
{
//Protect the pointer to the filepath from being moved around by the garbage collector.
pin_ptr<const WCHAR> uriPathWChar = CriticalPtrToStringChars(filePathUri->LocalPath);
pin_ptr<const WCHAR> uriPathWChar = PtrToStringChars(filePathUri->LocalPath);

// DWrite currently has a slow lookup for the last write time, which
// introduced a noticable perf regression when we switched over.
Expand Down Expand Up @@ -385,7 +385,7 @@ namespace MS { namespace Internal { namespace Text { namespace TextInterface
{
System::String^ filePath = filePathUri->AbsoluteUri;
//Protect the pointer to the filepath from being moved around by the garbage collector.
pin_ptr<const WCHAR> uriPathWChar = CriticalPtrToStringChars(filePath);
pin_ptr<const WCHAR> uriPathWChar = PtrToStringChars(filePath);

IntPtr pIDWriteFontFileLoaderMirror = Marshal::GetComInterfaceForObject(
fontFileLoader,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// See the LICENSE file in the project root for more information.

#include "FontCollection.h"
#include <wpfvcclr.h>

namespace MS { namespace Internal { namespace Text { namespace TextInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// See the LICENSE file in the project root for more information.

#include "LocalizedStrings.h"
#include "wpfvcclr.h"

namespace MS { namespace Internal { namespace Text { namespace TextInterface
{
Expand Down Expand Up @@ -144,7 +143,7 @@ namespace MS { namespace Internal { namespace Text { namespace TextInterface
}
else
{
pin_ptr<const wchar_t> localeNameWChar = CriticalPtrToStringChars(localeName);
pin_ptr<const wchar_t> localeNameWChar = PtrToStringChars(localeName);
BOOL exists = FALSE;
UINT32 localeNameIndex = 0;
HRESULT hr = _localizedStrings->Value->FindLocaleName(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

#include "precomp.hxx"
#include "util2.h"
#include <wpfvcclr.h>


namespace MS { namespace Internal { namespace FontCache {

Expand All @@ -15,7 +13,7 @@ bool Util2::GetRegistryKeyLastWriteTimeUtc(System::String ^ registryKey, [System
{
HKEY hkey = NULL;

pin_ptr<const wchar_t> registryKeyUnmanaged = CriticalPtrToStringChars(registryKey);
pin_ptr<const wchar_t> registryKeyUnmanaged = PtrToStringChars(registryKey);

if (::RegOpenKeyExW(HKEY_LOCAL_MACHINE, registryKeyUnmanaged, 0, KEY_QUERY_VALUE, &hkey) == ERROR_SUCCESS)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#pragma once

#include <vcclr.h>

namespace MS { namespace Internal { namespace FontCache {

Expand Down
61 changes: 0 additions & 61 deletions src/Microsoft.DotNet.Wpf/src/DirectWriteForwarder/CPP/wpfvcclr.h

This file was deleted.