【发布时间】:2013-07-26 07:07:36
【问题描述】:
我在调用 GetPrivateProfileString 命令后无法删除文件。我有以下代码:
'Read the INI File
sb = New StringBuilder(500)
Select Case FileType
Case "Scanner File"
res = GetPrivateProfileString("ScannerSetings", "ScannerType", "", sb, sb.Capacity, Filename)
Case "Scale File"
res = GetPrivateProfileString("ScaleSetings", "ScaleType", "", sb, sb.Capacity, Filename)
End Select
'If the result is a value store it, otherwise move it to unprocessed
If res <> 0 Then InputArray.Add(sb.ToString)
File.Delete(Filename)
从 INI 文件中读取详细信息后,当我尝试删除该文件时,我收到以下错误:进程无法访问文件 'R:\Drop\011_11_Scanner' 因为它正在被另一个人使用过程。
在退出应用程序之前,我什至无法手动删除这些文件。 任何帮助将不胜感激。
谢谢
【问题讨论】: