|
楼主 |
发表于 2009-9-3 22:15:35
|
显示全部楼层
<font face="Verdana">Function ParseResourceFile(ByVal FilePath As String, ByVal FileName As String, ByVal ResType As String, ByVal ResID As Integer, ByVal IfDeleteFile As Boolean) As Boolean<br/> <br/> Dim TempFile() As Byte<br/> Dim PathName As String<br/> Dim intFreeFile As Integer<br/> <br/> <br/> If Right(FilePath, 1) <> "\" Then FilePath = FilePath + "\"<br/> PathName = FilePath + FileName<br/> <br/> If Len(Dir(PathName)) Then<br/> If IfDeleteFile Then<br/> Kill PathName<br/> Else<br/> Exit Function<br/> End If<br/> End If<br/> <br/> TempFile = LoadResData(ResID, ResType)<br/> intFreeFile = FreeFile()<br/> Open PathName For Binary Access Write As #intFreeFile<br/> Put #intFreeFile, , TempFile<br/> Close #intFreeFile<br/> <br/> Erase TempFile<br/> ParseResourceFile = True<br/> <br/>End Function</font> |
|