几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   SolidWorks二次开发 (http://www.dimcax.com/hust/forumdisplay.php?f=111)
-   -   What essential difference is ISldWorks between OLE Automation and COM? (http://www.dimcax.com/hust/showthread.php?t=1404)

huangyhg 2007-09-04 12:55 PM

What essential difference is ISldWorks between OLE Automation and COM?
 
Question:

What essential difference is ISldWorks between OLE Automation and COM?

Background:

SW OLE Automation

Yanhua

huangyhg 2007-09-04 12:55 PM

回复: What essential difference is ISldWorks between OLE Automation and COM?
 
Dear Yanhua,

The OLE versions of the APIs pass SW objects back and forth using dispatch pointers. The COM versions are much more strongly typed, passing raw pointers, ( a pointer to a face) for example.

The COM versions should be slightly more effecient.

Some of the COM apis pass back raw arrays of pointers, and VB cannot handle those. VB also cannot tolerate IUnknown pointers, and some of the COM apis pass those back as well.

For the most part, C++ programmers tend to use the COM versions so they don't have to deal with lots of dispatch pointers. VB programmers tend to use the OLE versions, because that is a lot easier to do in VB, and some of the COM versions aren't going to work.

I hope this helps answer you question.

Regards,
Scott Stanley


所有的时间均为北京时间。 现在的时间是 11:15 AM.