[IronPython] Creating PythonEngine in VB6

Patrick Haener patrick.haener at btopenworld.com
Sat Oct 1 22:47:10 CEST 2005


Hi,
I am trying to use IronPython to script .Net classes with VB6 from within Excel.
The VB6  function below should create a Python engine, but throws a runtime error 80131604.
Thanks
Patrick
 
Function NewIronPythonInterpreter() As IronPython.PythonEngine
Dim rt As New mscoree.CorRuntimeHost
rt.Start
Dim unk As IUnknown
rt.GetDefaultDomain unk
Dim ad As AppDomain
Set ad = unk
' creating a BasicConsole object works
Dim x As IronPython.BasicConsole
Set x = ad.CreateInstanceFrom(IronPythonAssembly, "IronPython.Hosting.BasicConsole").Unwrap
Dim r As IronPython.PythonEngine
' Creating a Python engine generates a Runtime error # 80131604
Set r = ad.CreateInstanceFrom(IronPythonAssembly, "IronPython.Hosting.PythonEngine").Unwrap
Set NewIronPyt



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20051001/deb4b78f/attachment.html>


More information about the Ironpython-users mailing list