|
-
Mar 17th, 2000, 10:25 AM
#1
Thread Starter
New Member
Public Declare Function WriteFile Lib "kernel32" _
(ByVal hFile As Long, ByVal lpBuffer As Any, ByVal nNumberOfBytesToWrite As Long, _
lpNumberOfBytesWritten As Long, Optional ByVal lpOverlapped As Long = 0&) As Long
Dim lBytesWritten As Long
Dim hStdIn As Long
Dim hStdOut As Long
Dim iPos As Integer
Dim startStr, endStr, httpStr, hyStr As String
startStr = "HTTP/1.0 200 OK" & vbCrLf & "Content-Type: _ text/html" & vbCrLf & vbCrLf & "hello"
hStdOut = stdout()
WriteFile hStdOut, startStr, Len(startStr + Ch(3)), _ lBytesWritten
this is a vb application that try to change to cgi. the file is in a module. after make bla.exe file, the error says
"type mismatched" and highlighted the startStr in WriteFile
DOES ANYBODY HAS ANY IDEA ABOUT HOW TO FIX THIS PROBLEM? I THOUGHT IT SUPPOSE TO BE STRING.
the example in microsoft website about writing cgi applications in visual basic is doing the same thing, I have all the things declared just like that(all public.. all functions) and it is working well, so what is wrong with mine?
http://support.microsoft.com/support.../Q239/5/88.ASP
THANK YOU VERY MUCH.
-
Mar 18th, 2000, 12:12 AM
#2
Frenzied Member
This may or may not help , but you have not actually declared startStr as String. You have declared it as Variant
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|