Need Help with the URLDownloadToFile function

This is a discussion on Need Help with the URLDownloadToFile function within the Windows Programming forums, part of the Platform Specific Boards category; Hi, can someone help me with the URLDownloadToFile function. I don't really understand the last parameter. I looked at msdn ...

  1. #1
    Registered User
    Join Date
    Mar 2002
    Posts
    112

    Need Help with the URLDownloadToFile function

    Hi, can someone help me with the URLDownloadToFile function. I don't really understand the last parameter. I looked at msdn and I found out that it is a pointer to the caller's IBindStatusCallback interface. So I looked at what the IBindStatusCallback interface is but I can't figure out how to add this to my project. Can someone help me out and tell me how to make a IBindStatusCallback interface.

  2. #2
    Registered User
    Join Date
    Aug 2001
    Posts
    223
    why don't you just pass it NULL for the time being.... and test it...

    IBindStatusCallback is a com object and in order to use it you
    must create an object of that type according to normal com creating procedures..... You will need to look more into com to do this.
    zMan

  3. #3
    Registered User
    Join Date
    Mar 2002
    Posts
    112

    Unhappy

    I've tried just using NULL but then it won't compile. Visual c++ gives a linking error for the function.

  4. #4
    Registered User
    Join Date
    Mar 2002
    Posts
    112
    This is the function I am using:
    URLDownloadToFile(NULL, "http://msdn.microsoft.com/library/toolbar/images/mslogo_003399.gif","c:\\MyImage.gif", 0, NULL);

    and this is the error its giving me:
    main.obj : error LNK2001: unresolved external symbol _URLDownloadToFileA@20
    Debug/BananaCo.exe : fatal error LNK1120: 1 unresolved externals

  5. #5
    Registered User johnnie2's Avatar
    Join Date
    Aug 2001
    Posts
    186
    Linker is looking for a function implementation. Include urlmon.lib with your project.
    "Optimal decisions, once made, do not need to be changed." - Robert Sedgewick, Algorithms in C

  6. #6
    Registered User
    Join Date
    Mar 2002
    Posts
    112

    Smile

    Thanks alot man, I've been trying to get this to work for a week.

  7. #7
    Registered User johnnie2's Avatar
    Join Date
    Aug 2001
    Posts
    186
    I've been there before
    "Optimal decisions, once made, do not need to be changed." - Robert Sedgewick, Algorithms in C

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Seg Fault in Compare Function
    By tytelizgal in forum C Programming
    Replies: 1
    Last Post: 10-25-2008, 04:06 PM
  2. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 02:01 AM
  3. In over my head
    By Shelnutt2 in forum C Programming
    Replies: 1
    Last Post: 07-08-2008, 07:54 PM
  4. Including lib in a lib
    By bibiteinfo in forum C++ Programming
    Replies: 0
    Last Post: 02-07-2006, 02:28 PM
  5. Question..
    By pode in forum Windows Programming
    Replies: 12
    Last Post: 12-19-2004, 07:05 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21