几何尺寸与公差论坛

 找回密码
 注册
查看: 2780|回复: 0

How to disable SolidWorks memory handler(C++)

[复制链接]
发表于 2007-1-23 22:45:55 | 显示全部楼层 |阅读模式
C++


How to disable SolidWorks memory handler



A DLL add-in runs in the same address space as SolidWorks. If your DLL dynamically allocates memory, then this memory is in the SolidWorks address space.

SolidWorks installs an exception handler that catches all failures to dynamically allocate memory. In some cases, the add-in can adjust its algorithms for such low memory situations. However, the SolidWorks memory handler is invoked upon any such failures.

To install your own memory handler, you can use the VC++ function:


_set_new_handler()


before attempting to dynamically allocate memory. You should always restore the SolidWorks memory handler after you have finished allocating memory.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|几何尺寸与公差论坛

GMT+8, 2024-12-22 13:27 , Processed in 0.034141 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表