This request is somehow related to this bug report.
I think it would be great if PureBasic DLLs could automatically use the String and Object Manager of the main PureBasic executable. PureBasic DLLs could export a special method or call a special method of the executable at the time it's attached. This should not break other DLLs or executables, it should just work if both binaries are compiled using PB. This would allow easy usage of string variables as return value and the DLLs, in my case plugins, could also access gadgets created by the executable.
What do you think? Maybe this could be enabled/disabled in the compiler options.
Make PureBasic DLLs use EXE String and Object Manager
Re: Make PureBasic DLLs use EXE String and Object Manager
Its not just the string manager and object manager. For this to work properly, all of PB's internals would need to be designed to be shareable with dlls. Thats a huge amount of work (and extra code in every exe/dll) just for returning some strings from a dll.
quidquid Latine dictum sit altum videtur
Re: Make PureBasic DLLs use EXE String and Object Manager
Oh, I thought that there are some base internals that all other heaps, etc. are based upon. Is it possible that this happens anytime? I just finished converting all my includes to DLLs/plugins that I can re-use in my projects. That allows me to easily update small portions of the code instead of the whole program.
Maybe there could be a special function to move a string, list, etc. pointer to another global heap? BTW-- Are the handles returned by gadget procedures used with #PB_Any global or also local as the custom IDs?
Maybe there could be a special function to move a string, list, etc. pointer to another global heap? BTW-- Are the handles returned by gadget procedures used with #PB_Any global or also local as the custom IDs?