My question is a little general, so i\'m not looking for an exact answer, but possibly some directions to look into that will help me...
I\'m trying to write data to a serial port via P/Invoke (explicitly not with the SerialPort-class). Here\'s what I have so far:
As a C# developer, I think many of us have the experience as calling unmanaged code from managed code.
Problem:Assume you have a machine on which some .NET assembly registers, loads, and/or runs correctly.This assembly may reference unmanaged DLLs via p/invoke, it may utilize COM objects, and it may ac
I\'ve started upgrading a .NET 2.0 WinForms application to .NET 4.0.Well, OK, the upgrade process was just a matter of switching platform target, but making it actually work.I assumed that\'s all ther
I am trying to use the following code to get the MBR from PhysicalDrive0: private static byte[] ReadMbr(string lpFileName)
For example, this is from .NET Framework source file UnsafeNativeMethods.cs: [DllImport(ExternDll.User32, ExactSpelling=true, CharSet=CharSet.Auto)]
First a background question: In general, what is the difference between int and IntPtr?My guess is that it is an actual object rather than a value like an int or byte is.Assuming that is true:
I\'m writing a program in .NET 3.5, that in some places has to go out and execute code from hardware APIs. This is all good, and working in 32-bit Windows 7, Windows XP, etc. The problem com
I\'ve got an unmanaged C++ dll which is being called from a C# app, I\'m trying to get the C# app to catch all exceptions so that in the event of the dll failing due to an unmanaged exception then the