C#中实现Delphi中的StrMove(,,,)方法

最近接触通讯代码,将Delphi转C#时碰到些转换问题,经多方查找终于解决,故将其记录以供他人和自己今后参考。如有雷同,纯属巧合:

        Delphi:

                     function StrMove(Dest: PChar; const Source: PChar; Count: Cardinal): PChar;

       C#:

                  调用msvcrt.dll中的memcpy方法如下:

                 [DllImport("msvcrt.dll", EntryPoint = "memcpy", CallingConvention = CallingConvention.Cdecl, SetLastError = false)]
                 public static extern string MemCopy(byte[] dest, byte[] src, int count);

你可能感兴趣的:(delphi开发,C#开发)