Summary
Construct an openmpt_module.
Syntax
[DllImport(DLL, EntryPoint = "openmpt_module_create_from_memory2")]
public static extern IntPtr ModuleCreateFromMemory2(byte[] data, UIntPtr size, Libopenmpt.LogFunc logFunc, IntPtr loguser, Libopenmpt.ErrorFunc errorFunc, IntPtr errUser, IntPtr error, IntPtr errorMessagePtr, IntPtr ctls)
The input data can be discarded after an openmpt_module has been constructed successfully.
Attributes
Type |
Description |
DllImportAttribute |
|
Parameters
Name |
Type |
Description |
data |
byte[] |
Data to load the module from. |
size |
UIntPtr |
Amount of data available. |
logFunc |
Libopenmpt.LogFunc |
Logging function where warning and errors are written. The logging function may be called throughout the lifetime of openmpt_module. |
loguser |
IntPtr |
User-defined data associated with this module. This value will be passed to the logging callback function (logfunc) |
errorFunc |
Libopenmpt.ErrorFunc |
Error function to define error behaviour. May be NULL. |
errUser |
IntPtr |
Error function user context. Used to pass any user-defined data associated with this module to the logging function. |
error |
IntPtr |
Pointer to an integer where an error may get stored. May be NULL. |
errorMessagePtr |
IntPtr |
Pointer to a string pointer where an error message may get stored. May be NULL. |
ctls |
IntPtr |
An array of initial ctl and value pairs stored in openmpt_module_initial_ctl, terminated by a pair of NULL and NULL. |
Return Value
Type |
Description |
IntPtr |
A pointer to the constructed openmpt_module, or NULL on failure. |