|
|
|
Помогите правильно понять преимущество STDMETHOD (проблема с переводом)
|
|||
|---|---|---|---|
|
#18+
Всем привет! Читаю статью про автоматизацию Офиса. Хочу написать ком-сервер. Не до конца понимаю весь перевод. Вот выдержка из статьи MSDN: HOWTO: Get IDispatch of an Excel or Word Document from an OCX SUMMARY It is common for an OLE control to need the IDispatch of its container. You can often get the IDispatch by using QueryInterface() from immediately accessible interfaces on the server, such as IOleClientSite. However, for some servers, such as Microsoft Excel, this approach fails. Another way to get the IDispatch is by using the GetActiveObject() API to get the server's IDispatch from the ROT. However, this method requires that you must be able to obtain the CLSID or ProgID of the server. Furthermore, ambiguous situations can occur where you can't distinguish between multiple instances of the server. This article uses another approach to obtain the IDispatch, which works for both Microsoft Excel and Microsoft Word, even when multiple instances are running. The steps listed below allow you to build a control that can obtain the IDispatch of the container's Document object. т.е. основную суть вроде уловил, что это лучше, но по каким критериям не до конца понял в фразе: "Furthermore, ambiguous situations can occur where you can't distinguish between multiple instances of the server. " Спасибо! ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 04.10.2006, 12:15 |
|
||
|
|

start [/forum/topic.php?fid=57&fpage=332&tid=2030378]: |
0ms |
get settings: |
6ms |
get forum list: |
14ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
44ms |
get topic data: |
9ms |
get forum data: |
2ms |
get page messages: |
27ms |
get tp. blocked users: |
1ms |
| others: | 214ms |
| total: | 323ms |

| 0 / 0 |
