BASS.NET API for the Un4seen BASS Audio LibraryBassSfxBASS_SFX_PluginCreate Method BASS.NET API for the Un4seen BASS Audio Library
Creates a plugin object for use in the SFX.

Namespace: Un4seen.Bass.AddOn.Sfx
Assembly: Bass.Net (in Bass.Net.dll) Version:

[DllImportAttribute("bass_sfx.dll", EntryPoint = "BASS_SFX_PluginCreateW", 
	CharSet = CharSet.Auto)]
public static int BASS_SFX_PluginCreate(
	string file,
	IntPtr hWnd,
	int width,
	int height,
	BASSSFXFlag flags


Type: SystemString
The filename and path of the plugin to load.
Type: SystemIntPtr
The handle of the window where the plugin is to be rendered.
Type: SystemInt32
The initial width for the plugins rendering window.
Type: SystemInt32
The initial height for the plugins rendering window.
Type: Un4seen.Bass.AddOn.SfxBASSSFXFlag
Any combination of these flags (see BASSSFXFlag):
BASS_SFX_SONIQUE_OPENGLRender sonique plugins using OpenGL.
BASS_SFX_SONIQUE_OPENGL_DOUBLEBUFFERUse OpenGL double buffering with sonique plugins.

Return Value

Type: Int32
If successful, the new SFX plugin handle is returned, else 0 is returned.

Once you create a plugin using this function you can perform a number of different function calls on it. The width and height parameters are only useful for BassBox, WMP, and Sonique plugins. Winamp ignores these parameters so you can just pass in 0 for winamp plugins. Windows Media Player plugins can be created using the full path to a dll file or by using the CLSID GUID from the registry.

Mainly you might use the BASS_SFX_PluginStart(Int32), BASS_SFX_PluginSetStream(Int32, Int32) or BASS_SFX_PluginRender(Int32, Int32, IntPtr) methods.

Note: This method uses the unicode overload of the native API (BASS_SFX_PluginCreateW).

ERROR CODEDescription
BASS_SFX_ERROR_INITBASS_SFX_Init(IntPtr, IntPtr) has not been successfully called.
BASS_SFX_ERROR_FILEOPENCan't open the plugin file.
BASS_SFX_ERROR_FORMATUnsupported plugin format.
BASS_SFX_ERROR_GUIDCan't open WMP plugin using specified GUID.
BASS_SFX_ERROR_MEMThere is insufficient memory.
BASS_SFX_ERROR_UNKNOWNSome other mystery problem!


' create a plugin object
Dim sfx As Integer = BassSfx.BASS_SFX_PluginCreate("corona.svp", pictureBox1.Handle, pictureBox1.Width, pictureBox1.Height, BASSSFXFlag.BASS_SFX_DEFAULT)
If sfx <> 0 Then 
    ' loaded file successfully
End If
// create a plugin object
int sfx = BassSfx.BASS_SFX_PluginCreate("corona.svp", pictureBox1.Handle, pictureBox1.Width, pictureBox1.Height, BASSSFXFlag.BASS_SFX_DEFAULT);
if (sfx != 0)
    // loaded file successfully
See Also