ProcedureDLLs or CDLLs and Datasections
ProcedureDLLs or CDLLs and Datasections
Is it possible to place a Datasection (from which say a binary file could be read) within a ProcedureDLL/CDLL?
Re: ProcedureDLLs or CDLLs and Datasections
Datasections are relocated to the end of the file.
Re: ProcedureDLLs or CDLLs and Datasections
@ Tenaja,
Thanks for the speedy response - so could you run through what would happen if I put a datasection in a procedureDLL
and within that say included binary file a$ (where a$ was a filename fed in as a parameter to the procedureDLL)???
Thanks for the speedy response - so could you run through what would happen if I put a datasection in a procedureDLL
and within that say included binary file a$ (where a$ was a filename fed in as a parameter to the procedureDLL)???
Re: ProcedureDLLs or CDLLs and Datasections
That binary file would be added to the end of the file, not within the proc. All data is relocated. Even if you have a dozen datasections scattered throughout, they are all placed adjacent to each other at the end.
This thread tells you how to view the asm output:
http://purebasic.fr/english/viewtopic.p ... sm#p367475
The asm has your pb code in the comments, and if you search for the datasection label, you'll find your binary.
This thread tells you how to view the asm output:
http://purebasic.fr/english/viewtopic.p ... sm#p367475
The asm has your pb code in the comments, and if you search for the datasection label, you'll find your binary.
Re: ProcedureDLLs or CDLLs and Datasections
Now, if your binary file is code, you could always gosub the datasection label, just make sure to add in the hex code for a return if the binary file does not already have it. (Most likely with a CompilerIf for x86 and x64)
Re: ProcedureDLLs or CDLLs and Datasections
Once again, thanks Tenaja