Export (0) Print
Expand All

AppDomainSetup::SetNativeFunction Method

.NET Framework 4.5

Provides the common language runtime with an alternate implementation of a string comparison function.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

public:
void SetNativeFunction(
	String^ functionName, 
	int functionVersion, 
	IntPtr functionPointer
)

Parameters

functionName
Type: System::String

The name of the string comparison function to override.

functionVersion
Type: System::Int32

The function version. For .NET Framework 4.5, its value must be 1 or greater.

functionPointer
Type: System::IntPtr

A pointer to the function that overrides functionName.

ExceptionCondition
ArgumentException

functionName is nullptr.

ArgumentNullException

functionVersion is not 1 or greater.

-or-

functionPointer is IntPtr::Zero.

The following string comparison and sorting methods can be overridden by the SetNativeFunction method:

  • IsNLSDefinedString

  • CompareStringEx

  • LCMapStringEx

  • FindNLSStringEx

  • CompareStringOrdinal

  • GetNLSVersion

For information about these functions, see National Language Support Functions.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5

  • SecurityCriticalAttribute 

    requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft