Function ExportFileFromRes(ByVal ID As Long, ByVal FileName As String) As Boolean ExportFileFromRes = False Dim bytDbt() As Byte Dim intT As Integer If Dir(FileName) <> "" Then ''''''''双引号内无空格 ExportFileFromRes = False Exit Function End If bytDbt = LoadResData(ID, "CUSTOM") ''''''双引号内无空格 intT = FreeFile Open FileName For Binary As intT Put intT, , bytDbt Close intT ExportFileFromRes = True End Function
ExportFileFromRes = False
Dim bytDbt() As Byte
Dim intT As Integer
If Dir(FileName) <> "" Then ''''''''双引号内无空格
ExportFileFromRes = False
Exit Function
End If
bytDbt = LoadResData(ID, "CUSTOM") ''''''双引号内无空格
intT = FreeFile
Open FileName For Binary As intT
Put intT, , bytDbt
Close intT
ExportFileFromRes = True
End Function