AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX: Программирование
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 30.11.2002, 07:53   #1  
Borisov Nikolai is offline
Borisov Nikolai
Участник
 
2 / 10 (1) +
Регистрация: 30.11.2002
? Создание экземпляра COM по его CLSID
Можно ли в Axapta сделать что-то подобное
CreateOLEObject("CLSID") ?
Старый 02.12.2002, 10:37   #2  
Wamr is offline
Wamr
----------------
Лучший по профессии 2014
Лучший по профессии AXAWARD 2013
 
1,737 / 858 (32) +++++++
Регистрация: 15.01.2002
Адрес: Москва
Записей в блоге: 7
класс COM
new
Run on: Called
Description
The COM constructor creates an object of the COM class and optionally instantiates a COM object on any given computer to be attached to the COM class.

The first argument for new is the class name (see remarks) of the COM object to instantiate. If the class name is omitted no COM object is instantiated for the COM class, thus the attach method should be used to attach a COM object to the COM class.

The second argument for new is the name of the remote computer on which the COM object is to be instantiated. If the computer name is omitted the COM object is instantiated on the local computer. If the computer name is specified, it is required that the DCOM system component has been installed on both the local and remote computer as well as that the actual COM object in question supports DCOM and has been properly configured on both the local and remote computer. The DCOM system component is a standard component of Windows 98, Windows NT, and later. On Windows 95 the DCOM system component must be installed explicit.

Syntax
public final void new( [str _className, str _computerName] )

Arguments
className : The class name of the COM object to instantiate (optional).
computerName : The name of the remote computer on which the COM object should be instantiated (optional).
Remarks
The class name of a COM object is either its ProgID (programmatic identifier) or CLSID (class identifier):

ProgIDs have the following format: <program>.<component>.<version> (e.g. "AXAPI.Axapta.1 "). Note that the version element of the ProgID can often be omitted.

CLSID s are 128 bit values and have to following format: {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} (e.g. "{80F444A1-46FF-11D2-8459-0008C7A0D1EA}").

Example
PHP код:
{
    
// instantiate a COM object on local computer
    
COM comLocal  = new COM("MyCOM.Object");
 
    
// instantiate a COM object on remote computer
    
COM comRemote = new COM("MyCOM.Object""\\MyServer"); 
 
    
// don't instatiate any COM object yet
    
COM com = new COM();
    
    
// see the example under the 'attach' method as well

 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Kurt Hatlevik: Sneak preview of the WMS E&E Blog bot DAX Blogs 0 20.11.2008 01:10
msdynamicsax: VB script that test the com connector for Dynamics Ax 4.0 Blog bot DAX Blogs 0 25.08.2008 18:05
Solutions Monkey: Enterprise Portal Screencasts at Channel9.msdn.com Blog bot DAX Blogs 6 01.07.2008 19:38
Создание экземпляра класса Dict* AndyD DAX: Программирование 22 23.03.2007 16:01
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 06:32.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.