c#
public static partial int MessageBoxW(nint hWnd, string text, string caption, uint type)
{
int __retVal;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __caption_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(caption))
fixed (void* __text_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(text))
{
__retVal = __PInvoke(hWnd, (ushort*)__text_native, (ushort*)__caption_native, type);
}
c#
public static partial int MessageBoxW(nint hWnd, string text, string caption, uint type)
{
int __retVal;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __caption_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(caption))
fixed (void* __text_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(text))
{
__retVal = __PInvoke(hWnd, (ushort*)__text_native, (ushort*)__caption_native, type);
}