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 null.

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.6

  • SecurityCriticalAttribute 

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

Show:
© 2014 Microsoft