actually you are right, it doesn't will check more thanks
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)
actually you are right, it doesn't will check more thanks
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)
i took an MFC application written in VS2010 opened in in win8 with visual studio 2012 got the following errors: error C1083: Cannot open include file: "tmschema.h": No such file or directory (afxwin.h) it returns in several cases anyway can help? thanks
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)
the trick was not to call again internetopenurl (since it opens a new session), but to call httpsendrequest...
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)
Hi all i am using the method InternetOpenUrl with a callback then i can tell when status complete that proxy authentication is needed in MSDN it says to call InternetSetOption with the proxy user name and password and then call resend the problem is that i don't know how to call resend because if i call InternetOpenUrl again then it says again when complete that proxy authentication is required ??? can any1 help?
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)
take a look at this example (listed at the bottom of the page) that is shown in MSDN: http://msdn.microsoft.com/en-us/library/aa384220%28VS.85%29.aspx[^]
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)
one would thought that when user name and password are incorrect either in the callback would return proxy_authenticate_error or authenticate will be called again ok i will dig more into it thanks again
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)
One more thing if i may... i was able to work with IAuthenticate implementation (the method 'authenticate' did the trick) problem is that the actual authentication occurs only once, and if the user and password are incorrect i don't reach the method 'authenticate' again. what am i missing wrong here? thanks again
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)
your example helped me a lot and now it works 100% so thanks for that
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)
ok now i know which link to press ;) thanks again
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)
thanks a lot for your answer... i couldn't find in the site you gave where to d/l the code that implements the WBAuthenticate...can u direct me or give me direct link please thanks again
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)
i am using URLDownloadToCache method, also implemented my own class class CBindStatusCallbackImpl : public IBindStatusCallback for call back and bindings... i read in the MSDN that in order to support proxy handling i need to handle IAuthenticate and the method Authenticate...problem is i don't know how ? couldn't find any example code for that can any1 help me? i am desperate thanks in advanced
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)
well figured it out... it turns out the 2nd parameter is an out parameter which contains the file that was downloaded and placed in the internet temporary files... so now it works ok thanks myself i guess :)
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)
ok i've digging into it i've found out i can use URLDownloadToCacheFile and set the reserved flag to BINDF_GETNEWESTVERSION this works, but now i have a newer problem that when URLDownloadToCacheFile returns the HRESULT says E_OUTOFMEMORY this is the code i use int nLen = m_sFile.GetLength()* sizeof(TCHAR); HRESULT hr = URLDownloadToCacheFile (NULL,m_sUrl,m_sFile.GetBuffer(nLen),nLen,BINDF_GETNEWESTVERSION,&c);
In MSDN it states that if the result is E_OUTOFMEMORY it means that The buffer length is invalid or there was insufficient memory to complete the operation. what am i doing wrong here? thanks for any reply
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)
Hi all, I am using URLDownloadToFile with IBindStatusCallback i would like the OnProgress to show a real progress the problem is that i see in my output that one of the OnProgress statuses is BINDSTATUS_CACHEFILENAMEAVAILABLE how to tell the interface to d/l the file everytime...i saw in MSDN that i need to set up a flag in the GetBindInfo method...but i need an example code for that thanks in advanced
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)
this sort of reply is in appropriate, if you can see below i got a really good reply who took my question seriously shame on you....
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)
once again - thank you!
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)
thanks for the reply - it did solve the problem now the chunck are 2048 bytes each time - good! the second problem still remains - high CPU about 80% - how can i solve this? thanks again for your kind reply
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)
what do you mean? can you give an example
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)
thanks for the reply... i can not use other methods other than what i've posted in my code (for stupid reasons go figure) so i would still like any help regarding my issues thanks again
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)
i use InternetOpenUrl (as async) to receive a file from a url. this is the code i use : BOOL CMyCode::RequestFile( LPCTSTR lpszUrl ) { m_hInternet = InternetOpen(_T("MyCode"), INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, INTERNET_FLAG_ASYNC); if (!m_hInternet) { return FALSE; } InternetSetStatusCallback(m_hInternet, CMyCode::InternetStatusCallback); InternetOpenUrl(m_hInternet, lpszUrl, NULL, 0, INTERNET_FLAG_RELOAD | INTERNET_FLAG_PRAGMA_NOCACHE | INTERNET_FLAG_NO_CACHE_WRITE, (DWORD) this); return TRUE; } void __stdcall CMyCode::InternetStatusCallback (HINTERNET hSession, DWORD Context, DWORD Status, LPVOID pInformation, DWORD InfoLength) { CMyCode* pThis = (CMyCode*) Context; if (!pThis) { return; } switch (Status) { case INTERNET_STATUS_RESPONSE_RECEIVED: m_dwNumytes2Read = (*(DWORD *)pInformation); break; case INTERNET_STATUS_HANDLE_CREATED: m_hHttpSession = * (HINTERNET *) pInformation; // Copy break; case INTERNET_STATUS_REQUEST_COMPLETE: CompleteRequest(); break; case INTERNET_STATUS_HANDLE_CLOSING: break; default: ATLTRACE(_T("Status is %ld\n"), Status); break; } } 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); if (!dwBytesRead) bOK = FALSE; // .. progress handling } if (pBuff) delete []pBuff; Abort(); //... done }
the code works ok only i have 2 major problems: 1. the file is received in a chunks of 267/268 Bytes each time i call InternetReadFile???? 2. the CPU reaches 80% until the file is download completely can any1 help me here? thanks in advanced
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)