在使用C版本的64-bit NI-IMAQ驱动时出现错误-1074396857



主要软件:
主要软件版本: 1.0
主要软件修正版本: N/A
次要软件: Driver Software>>NI-IMAQ

问题:

我在64-bit操作系统(Vista或Window 7)中使用C DLL,当我试图使用imgSessionConfigure配置一个任务的时候,出现错误-1074396857,详细信息如下所示:

This 32-bit device is operating on a 64-bit OS with more than 3GB of physical memory. This configuration could allocate 64-bit memory which is unsupported by the device. To solve this problem, reduce the amount of physical memory in the system.

我的计算机确实有超过3 GBs的内存,而且我不能减少它。是否有方法解决这样的问题呢?



解答:

注意:National Instruments公司不建议使用该方法,可能导致潜在的内存错误,因此,请慎重使用。

为了关闭该检测,可以调用IMAQ.dll的private函数niimaquDisable32bitPhysMemLimitEnforcement,该函数的定义为:int niimaquDisable32bitPhysMemLimitEnforcement(SESSION_ID boardid).

所有应用需要的内存分配均是由imgCreateBuffer()imgDisposeBuffer()来分配。

解释

当你访问的地址空间大于3 GBs,即超出了DLL文件所限定的32bit的内存范围,将会引起程序的不稳定。使用 imgCreateBuffer() 和 imgDisposeBuffer() 函数可以避免访问32-bit之外的地址空间,因此,允许您使用超过3GBs内存的系统。



相关链接: KnowledgeBase 43G8SD5L: Which NI Vision Products Support Windows Vista?

附件:





报告日期: 11/02/2010
最近更新: 12/24/2012
文档编号: 5F1FICV7