Oxygen Basic
Programming => Problems & Solutions => Topic started by: Brian Alvarez on May 08, 2018, 05:00:06 AM
-
Why is this messagebox displayed? So far i havent understood the majority of the oxygen messageboxes. :P
What does it mean?
-
Or this one?
-
How can i prevent all this from popping up?
-
First mean that that you dont have oxygen.dll in source folder
use $ filename and compile to standalone exe (with rtl32/64)
or add dll to src folder to compile in mem.
second:
your program probably hang in memory - look into TM
-
Oxygen.dll? It's trying to load oxygen.dll but can't find it.
Filing Error: It's trying to resave the binary file but the file is being used. As Aurel says, it could be stuck, and visible in Task Manager. Sometimes compiling in rapid succession causes this problem, due to OS virus checking delays.
-
And how can i get them via console mode instead of messsagebox?
-
If you look at the DLLC project, Charles pops a console from O2 in many of the examples.
-
I don't know how you are compiling, Brian. If you compile from the console, the -m option diverts output to the console instead of a messagebox.
co2 -m t.o2bas
or
gxo2 -m t.o2bas
-
Charles, i am not using co2 or gxo2, i am using a custom dll caller i made in PowerBASIC to avoid the messageboxes that are displayed with those, because it was displaying messageboxes even with the -m switch. So, the messageboxes must be coming from the dll itself....
This is ny PBCC code:
#COMPILE EXE
#DIM ALL
DECLARE SUB o2_mode LIB "oxygen.dll" ALIAS "o2_mode" (BYVAL m AS LONG)
'DECLARE FUNCTION o2_abst LIB "oxygen.dll" ALIAS "o2_abst" (BYVAL p AS ASCIIZ PTR) AS DWORD ' Asciiz Ptr
DECLARE SUB o2_asmo LIB "oxygen.dll" ALIAS "o2_asmo" (BYVAL p AS ASCIIZ PTR)
'DECLARE SUB o2_basic LIB "oxygen.dll" ALIAS "o2_basic" (BYVAL p AS ASCIIZ PTR)
'DECLARE FUNCTION o2_exec LIB "oxygen.dll" ALIAS "o2_exec" (BYVAL hAddr AS LONG) AS LONG
'DECLARE FUNCTION o2_buf LIB "oxygen.dll" ALIAS "o2_buf" (BYVAL n AS LONG) AS LONG
'DECLARE FUNCTION o2_errno LIB "oxygen.dll" ALIAS "o2_errno" () AS LONG
DECLARE FUNCTION o2_error LIB "oxygen.dll" ALIAS "o2_error" () AS DWORD ' Asciiz Ptr
'DECLARE FUNCTION o2_len LIB "oxygen.dll" ALIAS "o2_len" () AS LONG
'DECLARE FUNCTION o2_prep LIB "oxygen.dll" ALIAS "o2_prep" (BYVAL p AS ASCIIZ PTR) AS DWORD ' Asciiz Ptr
'DECLARE FUNCTION o2_view LIB "oxygen.dll" ALIAS "o2_view" (BYVAL p AS ASCIIZ PTR) AS DWORD ' Asciiz Ptr
FUNCTION PBMAIN () AS LONG
LOCAL FF AS LONG
LOCAL FC AS STRING
LOCAL CL AS STRING
LOCAL SP AS DWORD
LOCAL ER AS ASCIIZ PTR * 255
IF ISTRUE(LEN(DIR$(COMMAND$))) THEN
FF = FREEFILE
ERRCLEAR
OPEN COMMAND$ FOR BINARY AS #FF
IF ERR THEN
STDOUT "File not available: " & $CRLF & COMMAND$
EXIT FUNCTION
END IF
FC = SPACE$(LOF(FF))
GET #FF,,FC
CLOSE #FF
IF ISFALSE(LEN(FC)) THEN
STDOUT "File is empty: " & $CRLF & COMMAND$
EXIT FUNCTION
END IF
CL = "#file """ & TRIM$(PATHNAME$(PATH, COMMAND$), ANY "/\") & "\" & PATHNAME$(NAME, COMMAND$) & ".exe""" & $CR & _
FC
SP = STRPTR(CL)
CALL O2_MODE(9)
O2_ASMO(SP)
ER = O2_ERROR()
IF LEN(TRIM$(@ER, ANY CHR$(0, 32, 34, 10, 13))) THEN
STDOUT TRIM$(@ER, ANY CHR$(0, 32, 34, 10, 13))
ELSE
STDOUT "SUCCESS COMPILING: " & TRIM$(PATHNAME$(PATH, COMMAND$), ANY "/\") & "\" & PATHNAME$(NAME, COMMAND$) & ".exe""
END IF
ELSEIF ISFALSE(LEN(TRIM$(COMMAND$, ANY "0123456789"))) THEN
STDOUT "Filename not provided."
ELSE
STDOUT "File not found: " & COMMAND$
END IF
END FUNCTION
-
Hi Brian,
I've routed "filing Error" through to the standard o2_error output. It was the only error to launch a messagebox directly. I hope to post my updates later today.
However, 'oxygen.dll?' is a runtime error, generated by the app itself. It reports whenever it cannot find/load a declared DLL
-
Perfect! Thanks!
The second message box is OK, most executables alert of non-available DLL's (I did the same in c++ implementation), but I would suggest modifying that message to be clearer and more complete.
-
So far i havent understood the majority of the oxygen messageboxes. :P
That's what "learning curve" is all about. :P
-
So far i havent understood the majority of the oxygen messageboxes. :P
That's what "learning curve" is all about. :P
Mike, lvtam ketnep hitemirako hetnep jultom.
-
Brian,
I'll rework the RunTime errors in the self-compiled Oxygen.dll. It's currently hard-coded in FB GAS and awkward to get at.
-
Mike, lvtam ketnep hitemirako hetnep jultom.
Brian, may I draw your attention that this forum's official languages are English, O2, and asm. Cryptogrphy isn't my strongest point, you know. If all you wanted to say was you'd like to see this topic of yours clean of casual trolling, just say so and I'll delete my comment, and then you'll delete yours. If you don't, I will delete it.
-
Nah, All i wanted was to make the point that one thing is the learning curve, and another the language barrier.
Just like you cannot understand what i meant by that language made up by me (a language that i may be the
only one to know what i meant), i cannot say, try to figure my language up, you will figure it out, its the learning
curve. :)
I would need to explain what each word means, that way you would go up the learning curve my memorizing
each word, instead of making if harder by not letting you know what each word means and then blame the learning
curve. :)
Casual trolling is. OK. Just like i did. :D I just expect others to have a skin as thick as mine if they start it. ;)
-
Brian,
I'll rework the RunTime errors in the self-compiled Oxygen.dll. It's currently hard-coded in FB GAS and awkward to get at.
Thanks Charles! This work i am doint is starting to take form. Oxygen Basic now has BYVAL parameters over here. :)
-
I just expect others to have a skin as thick as mine if they start it. ;)
I got your point, Brian. ;) But beware, a global moderator is always one body ahead of an ordinary forum member, as trolling goes. :D