磁盘空间不足,无法完成此操作 [英] there is insufficient disk space to complete this operation

查看:308
本文介绍了磁盘空间不足,无法完成此操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我正在做一个基于Windows的应用程序.在我的项目扫描工具中可用.wia类用于扫描目的.我的扫描仪是"UMAX Astra 2500".在此扫描仪的PC上运行正常.我部署了此应用程序设置在客户端系统中.他们出于同一目的使用"Fujitsu-fi"扫描仪.如果我尝试扫描客户端系统中的任何内容以预览部分正在工作,但是如果我单击扫描"按钮,则错误显示为"从WIA Imaging获取失败,磁盘空间不足以完成此操作.


要扫描的代码部分如下所述:

Hi all,
I am doing a windows based application.In my project scanning facility is available.The wia classes are used for scanning purpose.My scanner is "UMAX Astra 2500".It is working fine in my pc with this scanner.I deployed this application setup in the client system.They are using "Fujitsu-fi" scanner for the same purpose.If I am trying to scan anything in the client system up to preview part is working.But if I am clicking scan button the error comes as ''Acquire from WIA Imaging failed,there is insufficient disk space to complete this operation'' .For this problem what i check and plz give a solution to me fix this problem.


the code part to scan is described below:

private void menuFileAcquire_Click(object sender, System.EventArgs e)
    {
    WiaClass wiaManager = null;     // WIA manager COM object
    CollectionClass wiaDevs = null;     // WIA devices collection COM object
    ItemClass wiaRoot = null;       // WIA root device COM object
    CollectionClass wiaPics = null;     // WIA collection COM object
    ItemClass wiaItem = null;       // WIA image COM object

    try
        {
        wiaManager = new WiaClass();        // create COM instance of WIA manager

        wiaDevs = wiaManager.Devices as CollectionClass;            // call Wia.Devices to get all devices
        if ((wiaDevs == null) || (wiaDevs.Count == 0))
            {
            MessageBox.Show(this, "No WIA devices found!", "WIA", MessageBoxButtons.OK, MessageBoxIcon.Stop);

            return;
            }

        object selectUsingUI = System.Reflection.Missing.Value;         // = Nothing
        wiaRoot = (ItemClass) wiaManager.Create(ref selectUsingUI); // let user select device
        if (wiaRoot == null)                                            // nothing to do
            return;

        // this call shows the common WIA dialog to let the user select a picture:
        wiaPics = wiaRoot.GetItemsFromUI(WiaFlag.SingleImage, WiaIntent.ImageTypeColor) as CollectionClass;
        if (wiaPics == null)
            return;

        bool takeFirst = true;                      // this sample uses only one single picture
        foreach (object wiaObj in wiaPics)          // enumerate all the pictures the user selected
            {


            if (takeFirst)
                {
                DisposeImage();                     // remove previous picture
                wiaItem = (ItemClass) Marshal.CreateWrapperOfType(wiaObj, typeof(ItemClass));

                Cursor.Current = Cursors.WaitCursor;                // could take some time
                this.Refresh();
                wiaItem.Transfer(imagePath + imageFileName, false);         // transfer picture to our temporary file
                pictureBox.Image = Image.FromFile(imagePath + imageFileName);   // create Image instance from file
                tmenuFileSaveAs.Enabled = true;                     // enable "Save as" menu entry
                takeFirst = false;                                  // first and only one done.
                }
            Marshal.ReleaseComObject(wiaObj);                   // release enumerated COM object
            }
        }
    catch (Exception ee)
        {
        MessageBox.Show(this, "Acquire from WIA Imaging failed\r\n" + ee.Message, "WIA", MessageBoxButtons.OK, MessageBoxIcon.Stop);
        Application.Exit();
        }
    finally
        {
        if (wiaItem != null)
            Marshal.ReleaseComObject(wiaItem);      // release WIA image COM object
        if (wiaPics != null)
            Marshal.ReleaseComObject(wiaPics);      // release WIA collection COM object
        if (wiaRoot != null)
            Marshal.ReleaseComObject(wiaRoot);      // release WIA root device COM object
        if (wiaDevs != null)
            Marshal.ReleaseComObject(wiaDevs);      // release WIA devices collection COM object
        if (wiaManager != null)
            Marshal.ReleaseComObject(wiaManager);       // release WIA manager COM object
        Cursor.Current = Cursors.Default;               // restore cursor
        }
    }



单击扫描按钮是错误消息框
从WIA Imaging处获取失败
磁盘空间不足,无法完成此操作"



感谢和问候
shamseena

[edit]添加了代码块-OriginalGriff [/edit]



The Error comes in message box by clicking scan button is
"Acquire from WIA Imaging failed
there is insufficient disk space to complete this operation"



thanks and regards
shamseena

[edit]code block added - OriginalGriff[/edit]

推荐答案

从您所说的内容来看,我猜您应该检查磁盘上的可用空间,而不是可用的内存:
即使有足够的内存,磁盘空间也不足以完成此操作"

磁盘空间!=内存

问候
Espen Harlinn
From what you say, I would guess you should check the available space on disk, and not available memory:
"there is insufficient disk space to complete this operation'' even though there is lot of memory"

disk space != memory

Regards
Espen Harlinn


这篇关于磁盘空间不足,无法完成此操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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