Hello,
I don't understand it, what is wrong?
I create a ActiveX-OCX-File with Visual C++, I add one method with the
class-wizard (automation). The access with Visual Basic is correct. How I
can get the return-value in Python >>>123.456?
My python script:
*****************************************
from win32com.client import *
from win32com.client import constants
dsp=Dispatch("TEST1911.Test1911Ctrl.1")
a= dsp.GetError
print dsp.CLSID
print "\n"
print a
print a.im_class
print a.im_func
print a.im_self
*****************************************
the result:
*****************************************
<method _DTest1911.GetError of _DTest1911 instance at 01160F6C>
win32com.gen_py.7C304785-E2F6-4388-9093-DE82EB751F68x0x1x0._DTest1911
<function GetError at 01157EAC>
<win32com.gen_py.test1911 ActiveX-Steuerelement-Modul._DTest1911>
*****************************************
WHERE IS THE NUMBER 123.456?
My added methods in Visual C++:
*****************************************
double CTest1911Ctrl::GetError()
{
return 123.456;
}
*****************************************
The gen_py:
*****************************************
from win32com.client import DispatchBaseClass
class _DTest1911(DispatchBaseClass):
"""Dispatch-Schnittstelle f�r Test1911 Control"""
CLSID = pythoncom.MakeIID('{DCF013A4-C1AE-46D7-A1EF-27DCC4D94CC8}')
def AboutBox(self):
return self._oleobj_.InvokeTypes(0xfffffdd8, LCID, 1, (24,
0), (),)
def GetError(self):
return self._oleobj_.InvokeTypes(0x1, LCID, 1, (5, 0), (),)
_prop_map_get_ = {
}
_prop_map_put_ = {
*****************************************
Thanks
Marc
_______________________________________________
ActivePython mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activepython