29 references to PtrToStringAnsi
Microsoft.CodeAnalysis.Workspaces.MSBuild.Contracts (1)
MonoMSBuildDiscovery.cs (1)
61var result = Marshal.PtrToStringAnsi(ptr); // uses UTF8 on Unix
Microsoft.Diagnostics.DataContractReader.Legacy (2)
SOSDacImpl.cs (2)
6560string cdacName = Marshal.PtrToStringAnsi((nint)ppNames[i])!; 6561string dacName = Marshal.PtrToStringAnsi((nint)ppNamesLocal[i])!;
Microsoft.ML.LightGbm (2)
WrappedLightGbmInterface.cs (2)
242string mes = Marshal.PtrToStringAnsi(charPtr); 291return Marshal.PtrToStringAnsi(src);
Microsoft.ML.TimeSeries (1)
FftUtils.cs (1)
208throw Contracts.Except(Marshal.PtrToStringAnsi(ErrorMessage(status)));
PresentationCore (2)
System\Windows\Media\Imaging\PropVariant.cs (2)
600array[i] = Marshal.PtrToStringAnsi(ptr); 676return Marshal.PtrToStringAnsi(pszVal);
System.Diagnostics.EventLog (2)
System\Diagnostics\Reader\NativeWrapper.cs (2)
1269return Marshal.PtrToStringAnsi(val.AnsiString); 1367stringArray[i] = ansi ? Marshal.PtrToStringAnsi(ptr[i]) : Marshal.PtrToStringUni(ptr[i]);
System.DirectoryServices.Protocols (4)
System\DirectoryServices\Protocols\Interop\LdapPal.Linux.cs (1)
176internal static string PtrToString(IntPtr requestName) => Marshal.PtrToStringAnsi(requestName);
System\DirectoryServices\Protocols\ldap\LdapConnection.Linux.cs (3)
162defaults.realm = Marshal.PtrToStringAnsi(outValue); 167defaults.authcid = Marshal.PtrToStringAnsi(outValue); 172defaults.authzid = Marshal.PtrToStringAnsi(outValue);
System.IO.Compression (1)
System\IO\Compression\Zstandard\ZstandardUtils.cs (1)
45return System.Runtime.InteropServices.Marshal.PtrToStringAnsi(errorNamePtr) ?? $"Unknown error {error}";
System.Private.CoreLib (1)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\AnsiStringMarshaller.cs (1)
41=> Marshal.PtrToStringAnsi((IntPtr)unmanaged);
System.Private.Windows.Core (2)
Windows\Win32\System\Variant\VARIANT.cs (2)
169return Marshal.PtrToStringAnsi(*(IntPtr*)data); 850result[i] = Marshal.PtrToStringAnsi(data[i]);
System.Security.Cryptography (8)
src\runtime\src\libraries\Common\src\Interop\Windows\Crypt32\Interop.FindOidInfo.cs (1)
28return Marshal.PtrToStringAnsi(pszOID);
System\Security\Cryptography\X509Certificates\CertificatePal.Windows.cs (4)
86return Marshal.PtrToStringAnsi(certContext->pCertInfo->SubjectPublicKeyInfo.Algorithm.pszObjId)!; 100string keyAlgorithmOid = Marshal.PtrToStringAnsi(pCertContext->pCertInfo->SubjectPublicKeyInfo.Algorithm.pszObjId)!; 214return Marshal.PtrToStringAnsi(pCertContext->pCertInfo->SignatureAlgorithm.pszObjId)!; 384string oidValue = Marshal.PtrToStringAnsi(pCertExtension->pszObjId)!;
System\Security\Cryptography\X509Certificates\FindPal.Windows.cs (3)
144string? actual = Marshal.PtrToStringAnsi(pTemplateExt->pszObjId); 243string actual = Marshal.PtrToStringAnsi(pOids[i])!; 265string actual = Marshal.PtrToStringAnsi(pCertPolicyInfo->pszPolicyIdentifier)!;
System.Security.Cryptography.Pkcs (2)
Internal\Cryptography\Pal\Windows\HelpersWindows.cs (1)
29return Marshal.PtrToStringAnsi(psz)!;
src\runtime\src\libraries\Common\src\Interop\Windows\Crypt32\Interop.FindOidInfo.cs (1)
28return Marshal.PtrToStringAnsi(pszOID);
UIAutomationTypes (1)
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsCLR.cs (1)
2126return Marshal.PtrToStringAnsi(val);