Hi John,
Thanks for investigating.
Detaching the console is a fair compromise. It flashes briefly on the screen at the start of the program.
I think we have differing file mappings. I am running the script from the OxygenBasic folder alongside Oxygen.dll. SB knows where the extension modules are located but not the .bas declaration files, so I put the module declarations directly into the demo script.
(I'm using Notepad++)
When the SB script is run, you may see the console flash on and off the screen then A message box should appear with the greeting.
Still no luck with o2_error. The expression you tried still pushes a Long integer onto the CPU stack causing a GPF.
I think that DYC has no provision for handling an empty argument list.
Charles
This includes Console detach:
'---------------------------------
'USING OXYGEN WITH SCRIPTBASIC DYC
'---------------------------------
'ScriptBasic
'INCLUDE cio.bas
'INCLUDE dyc.bas
module cio
declare sub ::detach alias "sbdetach" lib "cio"
end module
cio::Detach()
module dyc
declare sub ::dyc alias "dyc" lib "dyc"
end module
'OXYGEN SOURCE CODE
'------------------
src="""
print "Greetings from OxygenBasic!"
""" & chr$(0)
dyc::dyc("ms,i,OXYGEN.DLL,o2_mode,L",0)
dyc::dyc("ms,i,OXYGEN.DLL,o2_basic,Z",src)
'how do we make dll calls that have no arguments?
'e=dyc::dyc("ms,i,OXYGEN.DLL,o2_errno,L",undef)
e=0
if e=0 then
dyc::dyc("ms,i,OXYGEN.DLL,o2_exec,L",0)
endif