.NET FrameworkInvocación de plataforma


Sintaxis

  • [DllImport ("Example.dll")] static extern void SetText (string inString);
  • [DllImport ("Example.dll")] static extern void GetText (StringBuilder outString);
  • Texto de cadena [MarshalAs (UnmanagedType.ByValTStr, SizeConst = 32)];
  • [MarshalAs (UnmanagedType.ByValArray, SizeConst = 128)] byte [] byteArr;
  • [StructLayout (LayoutKind.Sequential)] public struct PERSON {...}
  • [StructLayout (LayoutKind.Explicit)] public struct MarshaledUnion {[FieldOffset (0)] ...}

Invocación de plataforma Ejemplos relacionados