AppDomainSetup::SetNativeFunction Method (String^, Int32, IntPtr)
.NET Framework (current version)
Provides the common language runtime with an alternate implementation of a string comparison function.
Assembly: mscorlib (in mscorlib.dll)
public: [SecurityCriticalAttribute] 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.
| Exception | Condition |
|---|---|
| ArgumentException | functionName is null. |
| ArgumentNullException |
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.
SecurityCriticalAttribute
requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.
.NET Framework
Available since 4.5
Available since 4.5
Show: