CatchModule()
Syntax
Result = CatchModule(#Module, MemoryAddress, Size)Description
Load the specified module from the given memory area. If #PB_Any is used as '#Module' parameter, the new module number will be returned as 'Result'. If the 'Result' is not 0, the module has been correctly loaded and is ready to be played with the function PlayModule(), else the module loading has failed. If another module was previously loaded with the same #Module number, then the previous module is automatically freed.
ModPlug supports a lot of module formats, which includes: Protracker (4 channels), FastTracker (up to 32 channels, 16 bit quality), Impulse Tracker, etc.
This function is useful when using the 'IncludeBinary' PureBasic keyword. Then modules can be packed inside the executable. Nevertheless, use this option with care, as it will take more memory than storing the module in an external file (the module is both in executable memory and load in physical memory).
Example:CatchModule(0, ?Module, ?ModuleEnd-?Module) End DataSection Module: IncludeBinary "Module.xm" ModuleEnd: EndDataSection
Supported OS
All