.net - How to get the underlying stdio FILE* of a managed System.IO.FileStream? -


I have one for a C / C ++ library. NET Adapter is writing a method where "Bar" takes a regular stdio file. Is it possible to create an interface so that managed code user can cross a managed file ()? It is without interrupting buffer and code to pipe the data in the middle, apart from this, there is also the impression that what bar (read) does only make things better?

  // Basic code zero times (file *); // interface for system code zero foo (system :: IO :: filestream ^ file) {FILE * stdio_handle = ???; Bar (stdio_handle); }  

/ Code> Handle This is Windows Handle I do not think FileStream is designed to handle a stdio on stdio .

As mentioned by Mark and mentioned in the MSDN link, you handle instead of SafeFileHandle property (if you are on .NET 2.0+) Which is now considered obsolete) may want to consider using it. Although only handles is available in older versions.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -