Click here to Skip to main content
15,895,667 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionInternetOpenUrl - urgent help needed Pin
YaronNir10-Jan-10 20:13
YaronNir10-Jan-10 20:13 
AnswerRe: InternetOpenUrl - urgent help needed Pin
«_Superman_»10-Jan-10 20:16
professional«_Superman_»10-Jan-10 20:16 
GeneralRe: InternetOpenUrl - urgent help needed Pin
YaronNir10-Jan-10 20:20
YaronNir10-Jan-10 20:20 
GeneralRe: InternetOpenUrl - urgent help needed Pin
Bram van Kampen11-Jan-10 16:28
Bram van Kampen11-Jan-10 16:28 
GeneralRe: InternetOpenUrl - urgent help needed Pin
YaronNir11-Jan-10 20:49
YaronNir11-Jan-10 20:49 
AnswerRe: InternetOpenUrl - urgent help needed Pin
Richard MacCutchan11-Jan-10 1:53
mveRichard MacCutchan11-Jan-10 1:53 
GeneralRe: InternetOpenUrl - urgent help needed Pin
YaronNir11-Jan-10 1:55
YaronNir11-Jan-10 1:55 
GeneralRe: InternetOpenUrl - urgent help needed Pin
Richard MacCutchan11-Jan-10 3:15
mveRichard MacCutchan11-Jan-10 3:15 
You have the following code (btw could you edit your original message and put the code between <pre></pre> tags):
case INTERNET_STATUS_RESPONSE_RECEIVED:
    m_dwNumytes2Read = (*(DWORD *)pInformation);
    break;
    // intermediate lines omitted

void CMyCode::CompleteRequest()
{
    LPBYTE pBuff = new BYTE[m_dwNumytes2Read];
    ZeroMemory(pBuff, m_dwNumytes2Read);

    DWORD dwBytesRead(0);
    BOOL bOK(TRUE);
    while (bOK)
    {
    bOK = InternetReadFile (m_hHttpSession, pBuff, m_dwNumytes2Read, &dwBytesRead);
    // intermediate lines omitted
}

The value of m_dwNumytes2Read is set when you process the INTERNET_STATUS_RESPONSE_RECEIVED message and is relevant to the status information, so it is probably less than the amount of data that may be available. Try resetting it to some bigger value before calling InternetReadFile() for example:
dwNumytes2Read = 2048;
LPBYTE pBuff = new BYTE[m_dwNumytes2Read];
DWORD dwBytesRead;
BOOL bOK(TRUE);
while (bOK)
{
bOK = InternetReadFile (m_hHttpSession, pBuff, m_dwNumytes2Read, &dwBytesRead);
// ...

GeneralRe: InternetOpenUrl - urgent help needed Pin
YaronNir11-Jan-10 3:19
YaronNir11-Jan-10 3:19 
GeneralRe: InternetOpenUrl - urgent help needed Pin
Richard MacCutchan11-Jan-10 4:09
mveRichard MacCutchan11-Jan-10 4:09 
GeneralRe: InternetOpenUrl - urgent help needed Pin
YaronNir11-Jan-10 4:32
YaronNir11-Jan-10 4:32 
QuestionUsing Crystal Report in VC++ (VS 2008). Pin
lsubash64@gmail.com10-Jan-10 18:42
lsubash64@gmail.com10-Jan-10 18:42 
QuestionMulti-line string into dialog box Pin
itkid10-Jan-10 18:31
itkid10-Jan-10 18:31 
AnswerRe: Multi-line string into dialog box Pin
KingsGambit10-Jan-10 18:38
KingsGambit10-Jan-10 18:38 
AnswerRe: Multi-line string into dialog box Pin
David Crow11-Jan-10 5:31
David Crow11-Jan-10 5:31 
QuestionDeskband/Tray App using MFC (+ $700) Pin
d1557710-Jan-10 16:55
d1557710-Jan-10 16:55 
AnswerRe: Deskband/Tray App using MFC (+ $700) Pin
«_Superman_»10-Jan-10 19:22
professional«_Superman_»10-Jan-10 19:22 
QuestionHow to write C or C++ program that locks desktop icons placement? Pin
rain-1310-Jan-10 9:55
rain-1310-Jan-10 9:55 
AnswerRe: How to write C or C++ program that locks desktop icons placement? [modified] Pin
A*****10-Jan-10 15:09
A*****10-Jan-10 15:09 
GeneralRe: How to write C or C++ program that locks desktop icons placement? Pin
A*****10-Jan-10 19:36
A*****10-Jan-10 19:36 
GeneralRe: How to write C or C++ program that locks desktop icons placement? Pin
rain-1311-Jan-10 3:00
rain-1311-Jan-10 3:00 
GeneralRe: How to write C or C++ program that locks desktop icons placement? Pin
A*****11-Jan-10 13:42
A*****11-Jan-10 13:42 
AnswerRe: How to write C or C++ program that locks desktop icons placement? Pin
Rolf Kristensen13-Jan-10 11:53
Rolf Kristensen13-Jan-10 11:53 
QuestionCatch drag'n'drop event Pin
tibiz10-Jan-10 8:19
tibiz10-Jan-10 8:19 
AnswerRe: Catch drag'n'drop event Pin
«_Superman_»10-Jan-10 15:44
professional«_Superman_»10-Jan-10 15:44 

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.