Tags: array, byte, call, convert, dwcount, int32, intptr, method, microsoft, msdn, pbytes, publicstaticbool, sendbytestoprinter, software, string, szprintername, visual
How to convert byte to IntPtr
I have an array of byte and I need to call this method:
publicstaticbool SendBytesToPrinter(string szPrinterName, IntPtr pBytes, Int32 dwCount)
You see? So how am I going to change the byte to IntPtr?
Please help. I will reward you.
Leave a comment...
- 1 Comments
- Just define your method to accept an array. IntPtr is to be used for interop with native code, you can't convert an array to a pointer in safe code, only in unsafe code or when marshaling to unsafe native code. #1; Wed, 03 Oct 2007 21:16:00 GMT