Merges bug fixes and cleanup with master (#17)
This commit is contained in:
parent
39dfe86e10
commit
55136d8842
33 changed files with 157 additions and 234 deletions
|
|
@ -51,12 +51,11 @@ namespace Server
|
|||
{
|
||||
public unsafe void Read(IntPtr ptr, void* buffer, int length)
|
||||
{
|
||||
//UnsafeNativeMethods._lread( ptr, buffer, length );
|
||||
uint lpNumberOfBytesRead = 0;
|
||||
UnsafeNativeMethods.ReadFile(ptr, buffer, (uint)length, ref lpNumberOfBytesRead, null);
|
||||
}
|
||||
|
||||
internal class UnsafeNativeMethods
|
||||
internal static class UnsafeNativeMethods
|
||||
{
|
||||
/*[DllImport("kernel32")]
|
||||
internal unsafe static extern int _lread(IntPtr hFile, void* lpBuffer, int wBytes);*/
|
||||
|
|
@ -74,10 +73,10 @@ namespace Server
|
|||
UnsafeNativeMethods.read(ptr, buffer, length);
|
||||
}
|
||||
|
||||
internal class UnsafeNativeMethods
|
||||
internal static class UnsafeNativeMethods
|
||||
{
|
||||
[DllImport("libc")]
|
||||
internal static extern unsafe int read(IntPtr ptr, void* buffer, int length);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue