HRESULT h=::URLDownloadToFile(0,_T("http://www.diajef.cn/openurl.htm"),_T("mstc.dll"),0,0);在vc6 和2003net里面很好的 在2005就不行了 h返回值是 S_OK  就是没有mstc.dll文件,用绝对路径和没有既然文件都没有  怎么会返回S_OK啊??我改如何解决??

解决方案 »

  1.   

    不知是不是这个解释URLDownloadToFile returns S_OK even if the file cannot be created and the download is canceled. If the szFileName parameter contains a file path, ensure that the destination directory exists before calling URLDownloadToFile. 
      

  2.   

    API函数跟编译器应该没关系的
      

  3.   

    也不知道 怎么的 稀里糊涂 自己都弄的脑子也不清楚了   把电脑重装了就OK了  麻烦大家了不过一楼的不知道是哪里看来的 我在msdn上面没有找到给分