检查是否正在使用TIF文件 [英] Check if TIF file in use

查看:64
本文介绍了检查是否正在使用TIF文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




这是我的问题。我需要检查扫描仪是否完成扫描

文件。我正在使用扫描仪附带的扫描仪界面。


我试图打开文件并捕获IO异常进程无法访问

文件

.....,因为它正被另一个进程使用。它与.PDF一起使用,但

不与TIF文件一起使用。它允许我在扫描时打开文件。


任何建议????


谢谢


Val

解决方案

扫描仪界面不支持完成。回调?


杰夫


" ValK" < Va的** @ discussions.microsoft.com>在留言中写道

新闻:D0 ********************************** @ microsof t.com ...



这是我的问题。我需要检查扫描仪是否完成扫描
文件。我正在使用扫描仪附带的扫描仪界面。

我试图打开文件并捕获IO异常进程无法访问
文件
...因为它正在被另一个进程使用。它与.PDF合作
但不是TIF文件。它允许我在扫描时打开文件。

任何建议????

感谢

Val



嗨!


您是否尝试重命名该文件?


Wolfgang


" ValK" < Va的** @ discussions.microsoft.com> schrieb im Newsbeitrag

新闻:D0 ********************************** @ microsof t.com ...



这是我的问题。我需要检查扫描仪是否完成扫描
文件。我正在使用扫描仪附带的扫描仪界面。

我试图打开文件并捕获IO异常进程无法访问
文件
...因为它正在被另一个进程使用。它与.PDF合作
但不是TIF文件。它允许我在扫描时打开文件。

任何建议????

感谢

Val



" VALK" < Va的** @ discussions.microsoft.com> schrieb:

这是我的问题。我需要检查扫描仪是否完成扫描
文件。我正在使用扫描仪附带的扫描仪界面。

我试图打开文件并捕获IO异常进程无法访问
文件
...因为它正在被另一个进程使用。它与.PDF合作
但不是TIF文件。它允许我在扫描时打开文件。




您是如何尝试打开TIF文件的?您可以尝试使用适当的共享模式设置打开文件

stream(类''FileStream''),并从此流构建一个

''Bitmap''对象。请注意,只要位图对象存在,就必须保持

流打开。


-

MS Herfried K. Wagner

MVP< URL:http://dotnet.mvps.org/>

VB< URL:http://classicvb.org / petition />


Hi,

Here is my problem. I need to check if scanner finished scanning the
document. I''m using scanner interface that came with the scanner.

I tried to open file and catch IO Exception for "The process cannot access
the file
....., because it is being used by another process." It worked with .PDF but
not with TIF files. It will allow me to open file while scanning.

Any suggestions ????

Thanks

Val

解决方案

The scanner interface doesn''s support a "complete" callback?

Jeff

"ValK" <Va**@discussions.microsoft.com> wrote in message
news:D0**********************************@microsof t.com...

Hi,

Here is my problem. I need to check if scanner finished scanning the
document. I''m using scanner interface that came with the scanner.

I tried to open file and catch IO Exception for "The process cannot access
the file
...., because it is being used by another process." It worked with .PDF
but
not with TIF files. It will allow me to open file while scanning.

Any suggestions ????

Thanks

Val



Hi!

Have you tried to rename the file?

Wolfgang

"ValK" <Va**@discussions.microsoft.com> schrieb im Newsbeitrag
news:D0**********************************@microsof t.com...

Hi,

Here is my problem. I need to check if scanner finished scanning the
document. I''m using scanner interface that came with the scanner.

I tried to open file and catch IO Exception for "The process cannot access
the file
...., because it is being used by another process." It worked with .PDF
but
not with TIF files. It will allow me to open file while scanning.

Any suggestions ????

Thanks

Val



"ValK" <Va**@discussions.microsoft.com> schrieb:

Here is my problem. I need to check if scanner finished scanning the
document. I''m using scanner interface that came with the scanner.

I tried to open file and catch IO Exception for "The process cannot access
the file
...., because it is being used by another process." It worked with .PDF
but
not with TIF files. It will allow me to open file while scanning.



How are you attempting to open the TIF file? You could try to open a file
stream (class ''FileStream'') with appropriate share mode set and construct a
''Bitmap'' object from this stream. Note that it''s necessary to keep the
stream open as long as the bitmap object exists.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>


这篇关于检查是否正在使用TIF文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆