Jeffrey Bush writes:
>
>
> The problem is the conversion from a Python long to a C# number, not
anything to do with the file handle itself.
> This worked for me: (after your "print handle")
>
>
> cs_handle = IntPtr.Overloads[Int64](Int64(handle))
> fs = FileStream(cs_handle, True)
>
Aha, t
As I said in my message, you can using IntPtr.Overloads[Int64](handle).
Jeff
On Tue, Jul 21, 2015 at 11:12 AM, Dan Lenski wrote:
> Ron Harding via PythonDotNet writes:
>
> > perhaps re-directed command line calls for stdin, stdout, stderr in c#
> interacting with python i/o command line calls(
The problem is the conversion from a Python long to a C# number, not
anything to do with the file handle itself.
This worked for me: (after your "print handle")
cs_handle = IntPtr.Overloads[Int64](Int64(handle))
fs = FileStream(cs_handle, True)
Jeff
On Mon, Jul 20, 2015 at 9:19 PM, Ron Harding
>how do I cast a win32 file handle to an IntPtr?
i ran into this in the past as well; specifically when i started using FTDI USB
devices on DLPdesign development kits. the library is written in c++ MFC code.
After providing data marshal/platform invoke i applied the intptr in c#. The
USB de
Ron Harding via PythonDotNet writes:
> perhaps re-directed command line calls for stdin, stdout, stderr in c#
interacting with python i/o command line calls(although in python it is
common practice to daisy chain commands).
Unfortunately, I cannot redirect the output of the C# library to a
co
perhaps re-directed command line calls for stdin, stdout, stderr in c#
interacting with python i/o command line calls(although in python it is common
practice to daisy chain commands).
i have used this many times to get out of scrapes for 3rd party process calls
in c#.
good luck!
Ron “The desir