Немного смущает метод new в DEV_Com. Вторая ветка условия не выполнится никогда:
X++:
public void new(anytype _interface)
{
COM com;
COMVariant var;
;
super();
if (typeof(_interface) == Types::Class && classidget(_interface) == classnum(COM))
{
com = _interface;
this.attach(com.interface());
com = null;
}
else if (typeof(_interface) == Types::Class && classidget(_interface) == classnum(COM))
{
var = _interface;
this.attach(com.iDispatch());
var = null;
}
else if (typeof(_interface) == Types::Integer)
this.attach(_interface);
this.attachMethods();
}
Видимо там подразумевftnся условие для COMVariant, и тогда должно быть:
X++:
...
else if (typeof(_interface) == Types::Class && classidget(_interface) == classnum(COMVariant))
{
var = _interface;
this.attach(var.iDispatch());
var = null;
}
...