Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / DLL Strucutures and Runtime...

Author
Message
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 11th Jul 2003 10:11
i should really have titled my last topic that, wish i could edit topic titles and such like i can on phpBB so i don't have like 60posts about the same subject ho hum.

well anyways, i'm wondering about the structure and running of the DLLs

i know that essentially

APIENTRY you place the key things which are run as the DLL starts
Constructor is run to declare the global memory use
Destructure is run to destroy declared memory

now i know if you place a dllexport definition to a function you can use it externally, if you don't then you can only use it internally.
you then have the freecode (outside of a function) which is run only once when the DLL is loaded for exclusive features and loading.

so basically this leaves the GlobalCorePointer, which i have a feeling is run once.

(hopefully this is all right so far)
so then how exactly would i put something into the DLL which is run in a loop until the DLL is exited?

reason i ask is because if i create a Terrain (which is now working) it'll appear in the DBP worldspace quite happily, i have instances of it working ... and each time i use the "Update RavenTerrain 1" function it updates the terrain.

however as i want to include a Polygon form of MipMapping, i would like to also have it so that it'll recalcuate the MipMap each loop.
I mean i can just leave it to the update command, but i'd prefer this not to be a worry when you use it.

i'm sure one of you guys knows howto do it, or be able to tell me "nope thats impossible"
http://members.lycos.co.uk/timesaga/p.gif[/img]
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 11th Jul 2003 10:35
Nope, that's impossible

There is no way (currently) to inject your code into the existing sync cycle. The nearest I can offer is a new sync command that you can register callbacks with from your DLL.

DLL startup order is:
DLLmain with an argument of DLL_PROCESS_ATTACH
Constructor
ReceiveCoreDataPtr

DLL shutdown order is:
Destructor
DLLmain with an argument of DLL_PROCESS_DETACH
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 11th Jul 2003 11:16
oh well... i was hoping i missed something guess not
thanks though

Login to post a reply

Server time is: 2026-07-18 07:31:36
Your offset time is: 2026-07-18 07:31:36