MFC VC++6

I have this code:

        // ask user to go online
        if( InternetGoOnline( (LPTSTR)(LPCTSTR)m_strURLPathINI,
GetSafeHwnd(), 0) )
        {
                TRY
                {
                        // our session should already be open
                        // try to open up internet session to my URL
                        pWebFile = (CHttpFile*)iSession.OpenURL(
m_strURLPathINI, 1,
                                INTERNET_FLAG_TRANSFER_BINARY |
INTERNET_FLAG_DONT_CACHE );

                        if(pWebFile != NULL)
                        {

But if the URL is not valid (for example, if I rename the file on my
website) this code will still return a valid pointer to a file, with the
name I requested, but containing other text, in this case NTL text.  I was
wondering that when you click an invalid link on the NTL webservers pages,
it shows a webpage saying it is invalid and I am wondering if this is what
this text file is that it has ended up downloading.

Eitherway, I want to ensure that the file I have downloaded IS my file!  So
I don't understand why it did not warn of something.  Is there a function
call I can do on my URL or some other test I can trap to confirm the URL did
not exist?

Thanks.

Andrew Truckle
CAD Manager
Atkins Survey and Mapping
Avon Way, Langley Park, Chippenham, Wiltshire. SN15 1GG
Telephone:     01249 455032
Switchboard:  01249 455000
Fax:             01249 455045
E-Mail: [EMAIL PROTECTED]
www.atkinsglobal.com <www.atkinsglobal.com> 


This email and any attached files are confidential and copyright protected.
If you are not the addressee, any dissemination of this communication is
strictly prohibited. Unless otherwise expressly agreed in writing, nothing
stated in this communication shall be legally binding.

_______________________________________________
msvc mailing list
[email protected]
See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for 
subscription changes, and list archive.

Reply via email to