Convert "C" to "VB6"

30/04/2005 - 21:54 por Wiley Coyote | Informe spam
Given the following "C" code:

INTERNET_BUFFERS BufferIn = {0};
... other statements
if(!HttpSendRequestEx( hRequest, &BufferIn, NULL, HSR_INITIATE, 0)) --.>
Bufferin used here

I understand all of this, but I need to convert the code so as to use a
BUFFER in VB6.

How would I convert this to be used in VB6?

TX.

Preguntas similare

Leer las respuestas

#1 Angel J. Hernández M.
02/05/2005 - 07:47 | Informe spam
BUFFER is a struct. I need to know what it contains, don't you think?

Regards,


Angel J. Hernández M.
MCP - MCAD - MCSD - MCDBA
http://groups.msn.com/desarrolladoresmiranda


"Wiley Coyote" escribió en el mensaje
news:%
Given the following "C" code:

INTERNET_BUFFERS BufferIn = {0};
... other statements
if(!HttpSendRequestEx( hRequest, &BufferIn, NULL, HSR_INITIATE, 0)) --.>
Bufferin used here

I understand all of this, but I need to convert the code so as to use a
BUFFER in VB6.

How would I convert this to be used in VB6?

TX.



Respuesta Responder a este mensaje
#2 Wiley Coyote
03/05/2005 - 17:03 | Informe spam
I understand that it is a "C" struct. What I am asking, is how do I
represent this in VB6?

Here is what it looks like in "C"

INTERNET_BUFFERS BufferIn;
BufferIn.dwStructSize = sizeof( INTERNET_BUFFERS ); // Must be set or error
will occur
BufferIn.Next = NULL;
BufferIn.lpcszHeader = NULL;
BufferIn.dwHeadersLength = 0;
BufferIn.dwHeadersTotal = 0;
BufferIn.lpvBuffer = NULL;
BufferIn.dwBufferLength = 0;
BufferIn.dwBufferTotal = dwPostSize; // This is the only member used
other than dwStructSize
BufferIn.dwOffsetLow = 0;
BufferIn.dwOffsetHigh = 0;


Here is what I did in "VB6":

Private Type INTERNET_BUFFERS
dwStructSize As Long
Next As Long
lpcszHeader As Long
dwHeadersLength As Long
dwHeadersTotal As Long
lpvBuffer As Long
dwBufferLength As Long
dwBufferTotal As Long
dwOffsetLow As Long
dwOffsetHigh As Long
End Type

To use...
Dim BufferIn As INTERNET_BUFFERS
Dim BufferOut As INTERNET_BUFFERS

Bufferin contains data from a file.

TX.

"Angel J. Hernández M." wrote in message
news:
BUFFER is a struct. I need to know what it contains, don't you think?

Regards,


Angel J. Hernández M.
MCP - MCAD - MCSD - MCDBA
http://groups.msn.com/desarrolladoresmiranda


"Wiley Coyote" escribió en el mensaje
news:%
Given the following "C" code:

INTERNET_BUFFERS BufferIn = {0};
... other statements
if(!HttpSendRequestEx( hRequest, &BufferIn, NULL, HSR_INITIATE, 0)) --.>
Bufferin used here

I understand all of this, but I need to convert the code so as to use a
BUFFER in VB6.

How would I convert this to be used in VB6?

TX.







email Siga el debate Respuesta Responder a este mensaje
Ads by Google
Help Hacer una preguntaRespuesta Tengo una respuesta
Search Busqueda sugerida