Click here to Skip to main content
15,897,185 members
Home / Discussions / C#
   

C#

 
GeneralRe: MCSD 70-316 Pin
Feng Qin19-Jun-02 1:06
Feng Qin19-Jun-02 1:06 
GeneralRe: MCSD 70-316 Pin
Not Active19-Jun-02 8:35
mentorNot Active19-Jun-02 8:35 
GeneralCenter text in a RichTextBox Pin
kyledunn18-Jun-02 10:30
kyledunn18-Jun-02 10:30 
GeneralRe: Center text in a RichTextBox Pin
John Mautari19-Jun-02 21:13
John Mautari19-Jun-02 21:13 
GeneralRe: Center text in a RichTextBox Pin
John Mautari19-Jun-02 21:17
John Mautari19-Jun-02 21:17 
GeneralRe: Center text in a RichTextBox Pin
kyledunn20-Jun-02 1:00
kyledunn20-Jun-02 1:00 
Generalderived webservice causes exception Pin
Steve Severance18-Jun-02 6:35
Steve Severance18-Jun-02 6:35 
QuestionHow to use BinaryWriter to write memory? Pin
Zombies with Coffee, LLC18-Jun-02 5:45
professionalZombies with Coffee, LLC18-Jun-02 5:45 
My latest place that I'm stuck...

I call a function using DllImport that returns a pointer to some memory. How do I now write it to a file? The Write method doesn't take a pointer.

Thanks guys!

----------------------------------------------------------------

IntPtr pOutputBuffer = IntPtr.Zero;
IntPtr pInputBuffer = bmData.Scan0;

int iResult = wsq_compress_raw( pInputBuffer, ..., ref pOutputBuffer, ... );

FileStream pStream = new FileStream( strPathName, FileMode.Create, FileAccess.Write );
BinaryWriter pWriter = new BinaryWriter( pStream );

pWriter.Write( pOutputBuffer, 0, iCompressFileSize ); // Error

pWriter.Close( );
pStream.Close( );

AnswerRe: How to use BinaryWriter to write memory? Pin
18-Jun-02 6:11
suss18-Jun-02 6:11 
GeneralRe: How to use BinaryWriter to write memory? Pin
Zombies with Coffee, LLC18-Jun-02 6:23
professionalZombies with Coffee, LLC18-Jun-02 6:23 
GeneralRe: How to use BinaryWriter to write memory? Pin
18-Jun-02 7:25
suss18-Jun-02 7:25 
GeneralRe: How to use BinaryWriter to write memory? Pin
Zombies with Coffee, LLC18-Jun-02 9:14
professionalZombies with Coffee, LLC18-Jun-02 9:14 
GeneralRe: How to use BinaryWriter to write memory? Pin
18-Jun-02 9:54
suss18-Jun-02 9:54 
GeneralRe: How to use BinaryWriter to write memory? Pin
Zombies with Coffee, LLC18-Jun-02 10:30
professionalZombies with Coffee, LLC18-Jun-02 10:30 
GeneralRe: How to use BinaryWriter to write memory? Pin
Eric Gunnerson (msft)19-Jun-02 5:54
Eric Gunnerson (msft)19-Jun-02 5:54 
Generalhowto: multi-languaged gui Pin
Rüpel18-Jun-02 0:29
Rüpel18-Jun-02 0:29 
GeneralRe: howto: multi-languaged gui Pin
Zombies with Coffee, LLC18-Jun-02 6:09
professionalZombies with Coffee, LLC18-Jun-02 6:09 
GeneralRe: howto: multi-languaged gui Pin
Rüpel18-Jun-02 20:51
Rüpel18-Jun-02 20:51 
GeneralRe: howto: multi-languaged gui Pin
Zombies with Coffee, LLC19-Jun-02 3:55
professionalZombies with Coffee, LLC19-Jun-02 3:55 
GeneralRe: howto: multi-languaged gui Pin
Michael Mac19-Jun-02 3:57
Michael Mac19-Jun-02 3:57 
GeneralRe: howto: multi-languaged gui Pin
Michael Mac19-Jun-02 4:35
Michael Mac19-Jun-02 4:35 
GeneralRe: howto: multi-languaged gui Pin
Rüpel21-Jun-02 0:51
Rüpel21-Jun-02 0:51 
GeneralRe: howto: multi-languaged gui Pin
Michael Mac21-Jun-02 2:13
Michael Mac21-Jun-02 2:13 
QuestionCan not close the window Pin
Iftekhar Ivaan17-Jun-02 9:22
Iftekhar Ivaan17-Jun-02 9:22 
AnswerRe: Can not close the window Pin
Rüpel18-Jun-02 0:09
Rüpel18-Jun-02 0:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.