81
Problems & Solutions / Re: COM OLE
« Last post by JRS on March 18, 2021, 04:03:36 PM »it doesn't look like O2 supports VT_DISP. (iDispatch variant type)
Code: OxygenBasic
- ' O2 Sage BOI
- $filename "t.exe"
- uses COM/COMutil
- CoInitialize null
- CreateInterfaceByName "ProvideX.Script" oscript
- CallByName(oscript, "Init", BSTR {"C:\Sage\Sage 100 Standard\MAS90\Home"})
- VARIANT va[2]
- va.vt[1]=VT_BSTR : va[1].bstrval="SY_Session"
- va.vt[2]=VT_DISP
- CallByNameV(oscript, METHOD, "NewObject", va, 2)
- Print va[2].lval
- oscript.Release
- CoUninitialize