Public Class Form1
Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
Private Const ERROR_SUCCESS As Long = 0
Private Const BINDF_GETNEWESTVERSION As Long = &H10
Private Const INTERNET_FLAG_RELOAD As Long = &H80000000
Public Function DownloadFile(ByVal strUrl As String, ByVal strLFile As String) As Boolean
DownloadFile = URLDownloadToFile(0&, strUrl, strLFile, BINDF_GETNEWESTVERSION, 0&) = ERROR_SUCCESS
End Function
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Call DownloadFile("파일주소", "디렉터리")
Shell("디렉터리", vbNormalFocus)
End Sub
End Class
----------------------------------------------------------------------------------------------------------
주석은 소스 막 짜느라 시간이(ㅈㅅ) ........
비베 2010 익스프레스 이구요
빨간부분에서 accessviolationexception 오류가 납니다...
지금 개인 서버 접속기를 만드는데 미치겠습니다 이것때문에 -;..
오류 원인과 해결법좀 알려주세요! ㅠ
