ReneMiner
08-07-2022, 16:39
Sometimes i wish to use a thinbasic-core-function directly from a module,
can it be declared as is to a module in pb?
for example to substitute a function as
String s = App_GetEntrypoint()
' simple as:
Declare Function App_GetEntryPoint {Import|Lib}? "thincore.Dll" Alias "App_GetEntryPoint" () as String
if thinkeable then where can i find the for Alias required correct Upper/Lower-Case-spelling?
I don't like the idea to override the core-function App_SetEntrypoint(<String or functions name>) and recklessl just to disable it - and when i could capture it by overriding the keyword to get the information what new name is used
then i had to pass it further to thinCore - that were the same problem as above when to call App_GetEntrypoint.
So maybe correct case for the Alias or if possible / if it has at all : Are there ordinals - would these be still valid in future versions or are they changing?
Could thincore reply the request of a module if i send like
Hey, core!
I need to use some of your Functions, could you execute a few little commands for me?
it's not even a real function that has to return something - just like a sub and all memory i will need is allocated
already and i will only use virtual variables over my allocated memory.
I just put the thinbasic-code as plain ASCII (or should it be UTF8?) somewhere at memory and send you a pointer and the count of bytes.
In the beginning is a list of locations in memory and how to name and use them. All the little squares where the numbers
are to read or write is on the second page, right after the last byte of code that is a CHR$(28) "File-separator"
$CR & $LF & $SPC are previous - don't swallow the $FS that you will not choke on it, better parse it carefully.
You execute that little bunch of functions as you always do - no foreign dialects - and call me back under codeptr(HereiAm) when you're done.
The answering machine at my office in HereiAm is ready, just remember to mention that pointer that i gave to you.
Just please do not release my scripts memory, since in the appendix are all these valuables, it would make me sad when these were lost.
Or would you be so kind and do it instantly?
Then just let me know when you're done and let the bell sound for a full row of Bits: 0xFFFFFFFF, TRUE , -1 ring-ring,
...or if you can not read my handwriting - sorry i was in a hurry - tell me please - maybe in range from 0x00000001 to 0x7FFFFFF to give me a clue, i have a list of Error-Codes in thinCore.inc, you know...
- i will hang in here then and wait
just making fun. Of course thincore will not reply such letter. But if i wrote a sub that works using virtual variables only,
pass the startbyte and count of bytes of memory that holds thinbasic-code to execute, right after the script would follow the "variables" memory and the virtual variables positions were relative to the memory-position of the scripts last byte.
Kind of embedding thinbasic to a module to allow modules performing operations the thinbasic-way. Maybe one:
When variables start at firstScriptbyte + scriptlength it jumps to a zero-based world. If in such script a metavariable were
present that holds position of the last byte of code ("LBC") , the first variables byte is LBC+1.
can it be declared as is to a module in pb?
for example to substitute a function as
String s = App_GetEntrypoint()
' simple as:
Declare Function App_GetEntryPoint {Import|Lib}? "thincore.Dll" Alias "App_GetEntryPoint" () as String
if thinkeable then where can i find the for Alias required correct Upper/Lower-Case-spelling?
I don't like the idea to override the core-function App_SetEntrypoint(<String or functions name>) and recklessl just to disable it - and when i could capture it by overriding the keyword to get the information what new name is used
then i had to pass it further to thinCore - that were the same problem as above when to call App_GetEntrypoint.
So maybe correct case for the Alias or if possible / if it has at all : Are there ordinals - would these be still valid in future versions or are they changing?
Could thincore reply the request of a module if i send like
Hey, core!
I need to use some of your Functions, could you execute a few little commands for me?
it's not even a real function that has to return something - just like a sub and all memory i will need is allocated
already and i will only use virtual variables over my allocated memory.
I just put the thinbasic-code as plain ASCII (or should it be UTF8?) somewhere at memory and send you a pointer and the count of bytes.
In the beginning is a list of locations in memory and how to name and use them. All the little squares where the numbers
are to read or write is on the second page, right after the last byte of code that is a CHR$(28) "File-separator"
$CR & $LF & $SPC are previous - don't swallow the $FS that you will not choke on it, better parse it carefully.
You execute that little bunch of functions as you always do - no foreign dialects - and call me back under codeptr(HereiAm) when you're done.
The answering machine at my office in HereiAm is ready, just remember to mention that pointer that i gave to you.
Just please do not release my scripts memory, since in the appendix are all these valuables, it would make me sad when these were lost.
Or would you be so kind and do it instantly?
Then just let me know when you're done and let the bell sound for a full row of Bits: 0xFFFFFFFF, TRUE , -1 ring-ring,
...or if you can not read my handwriting - sorry i was in a hurry - tell me please - maybe in range from 0x00000001 to 0x7FFFFFF to give me a clue, i have a list of Error-Codes in thinCore.inc, you know...
- i will hang in here then and wait
just making fun. Of course thincore will not reply such letter. But if i wrote a sub that works using virtual variables only,
pass the startbyte and count of bytes of memory that holds thinbasic-code to execute, right after the script would follow the "variables" memory and the virtual variables positions were relative to the memory-position of the scripts last byte.
Kind of embedding thinbasic to a module to allow modules performing operations the thinbasic-way. Maybe one:
When variables start at firstScriptbyte + scriptlength it jumps to a zero-based world. If in such script a metavariable were
present that holds position of the last byte of code ("LBC") , the first variables byte is LBC+1.