Exemplo n.º 1
0
 internal static void CopyStringUni(string str, IntPtr dst, int nChars)
 {
     using (HGlobalPtr pStr =
                new HGlobalPtr(Marshal.StringToHGlobalUni(str)))
     {
         Copy(pStr.Ptr, dst, nChars * sizeof(char));
     }
 }
Exemplo n.º 2
0
 internal static void CopyStringAnsi(string str, IntPtr dst, int nChars)
 {
     using (HGlobalPtr pStr =
                new HGlobalPtr(Marshal.StringToHGlobalAnsi(str)))
     {
         Copy(pStr.Ptr, dst, nChars);
     }
 }