Skip to content

Commit b8101ba

Browse files
committed
Create NativeMethods.cs
1 parent 9049ccc commit b8101ba

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Runtime.InteropServices;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
8+
namespace Server.StreamLibrary
9+
{
10+
public static class NativeMethods
11+
{
12+
[DllImport("msvcrt.dll", CallingConvention = CallingConvention.Cdecl)]
13+
public static extern unsafe int memcmp(byte* ptr1, byte* ptr2, uint count);
14+
15+
[DllImport("msvcrt.dll", CallingConvention = CallingConvention.Cdecl)]
16+
public static extern int memcpy(IntPtr dst, IntPtr src, uint count);
17+
18+
[DllImport("msvcrt.dll", CallingConvention = CallingConvention.Cdecl)]
19+
public static extern unsafe int memcpy(void* dst, void* src, uint count);
20+
}
21+
}

0 commit comments

Comments
 (0)