Resource - EndResource
Posted: Sun Sep 13, 2015 10:32 am
like datasection, but in windows the data will be stored in the resource-section of the execute. I don't know, how linux or mac handle this kind of information, but in worst case, simple handle resources like a datasection.
Labels are used for definied a resource name.
res=OpenResource(<id>,<label>)
Open a Resource, id can be a number or #pb_any, label identificate the resource
len=ResourceSize(<id>)
Return the size of the Resource in bytes
*mem=Resource(<id>)
Return the memory address of the resource
CloseResource(<id>)
close the resource.
Example:
Labels are used for definied a resource name.
res=OpenResource(<id>,<label>)
Open a Resource, id can be a number or #pb_any, label identificate the resource
len=ResourceSize(<id>)
Return the size of the Resource in bytes
*mem=Resource(<id>)
Return the memory address of the resource
CloseResource(<id>)
close the resource.
Example:
Code: Select all
Resource
XML_About:
IncludeBinary "xml\about_dialog.xml"
XML_Main:
IncludeBinary "xml\main_dialog.xml"
Img_Logo:
IncludeBinary "img\Logo.png"
EndResource
res=OpenResource(#pb_any, XML_About)
xml=CatchXML(#pb_any,Resource(res),ResourceSize(res))
FreeResource(res)