I've made a VB program that is run on my Apache server as a CGI program
I'm using the following code, written by Kevin O' Brien, to send text via http
and I would useCode:Sub Send(s As String) '====================== ' Send output to STDOUT '====================== Dim lBytesWritten As Long s = s & vbCrLf WriteFile hStdOut, s, Len(s), lBytesWritten, ByVal 0& End Sub
elsewhere in my project. This all works perfectly fine.Code:Send "<html><head>"
There is an alternate Send sub,
How do I get my picture data into binary data so I can pass it to this sub? And also, would I useCode:Sub SendB(s As String) '============================================ ' Send output to STDOUT without vbCrLf. ' Use when sending binary data. For example, ' images sent with "Content-type image/jpeg". '============================================ Dim lBytesWritten As Long WriteFile hStdOut, s, Len(s), lBytesWritten, ByVal 0& End Sub
Sorry this is such a loaded question, but it's been plaguing me for days.Code:Send "Content-type: image/jpeg" SendB Form1.Picture.Image
-Dallas


Base 2
Reply With Quote