BassModuleGet method |
|
Remarks
Obtains the handle of the instance of one of the BASS related modules loaded in memory. This method should be called only after having initialized the component through the InitDJSystem or InitDJSystemEx method.
This component already initializes and exploits the most important decoding and playback features implemented by the BASS module; in some case you could have the need to drive BASS directly in order to perform some particular task not available from the component itself; for achieving this possibility you would have to load and eventually free BASS or its plugins through the LoadLibrary or LoadLibraryEx and the FreeLibrary Windows API functions.
Through this method you have the possibility to access instances already loaded in memory by the multimedia engine AdjMmsEng.dll: indeed, by knowing the HMODULE of BASS.DLL or of some of its plugins, you could get the pointer to all of the functions exported by the various BASS modules through the GetProcAddress Windows API.
IMPORTANT NOTE: Calls to the BASS_Init and BASS_Free functions of BASS.DLL are already managed internally by multimedia engine AdjMmsEng.dll so it's recommended avoiding their usage in order to avoid compatibility issues.
In case you should need to have direct access to the handle (HSTREAM) of a playback stream created through BASS after calling the LoadSound, StreamMixerCreate and similar methods, please, refer to the BassStreamGet method.
For further details about accessing BASS and its plugins directly from your code you can refer to the tutorial How to access BASS library functionalities directly.
Syntax
[Visual Basic] control.BassModuleGet ( nModule as enumBassModules, ByRef hModule as Long ) as enumErrorCodes |
[C++] short control.BassModuleGet ( short nModule, long *hModule ); |
Parameter |
Description |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
nModule |
Number representing the instance of the BASS module whose handle is needed. Supported values are the following:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
hModule |
Reference that, on return from the method call, will contain the handle to the BASS module (HMODULE) as returned by the LoadLibraryEx Windows API function called internally by the multimedia engine AdjMmsEng.dll of the component. |
Return value
Value |
Meaning |
|
|
Negative value |
An error occurred (see the LastError property for further error details) |
enumErrorCodes.NOERROR (0) |
The method call was successful. |