Sets the value of a pointer config option.
Namespace: Un4seen.Bass
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.2
Syntax
[DllImportAttribute("bass")] public static bool BASS_SetConfigPtr( BASSConfig option, IntPtr newvalue )
Parameters
- option
- Type: Un4seen.BassBASSConfig
The option to set the value of... one of the following (BASSConfig). - newvalue
- Type: SystemIntPtr
The new option value (as an IntPtr). See the option's documentation for details on the possible values.
Return Value
Type: BooleanIf successful, is returned, else is returned. Use BASS_ErrorGetCode to get the error code.
Remarks
Other config options may be supported by Add-Ons, see the documentation.
ERROR CODE | Description |
---|---|
BASS_ERROR_ILLPARAM | option is invalid. |
Examples
The following example copies the contents of a managed String into unmanaged memory:
// create an unmanaged pointer containing a copy of the string IntPtr myUserAgentPtr = Marshal.StringToHGlobalAnsi("radio42"); Bass.BASS_SetConfigPtr(BASSConfig.BASS_CONFIG_NET_AGENT, myUserAgentPtr); // make sure to free the myUserAgentPtr! Marshal.FreeHGlobal(myUserAgentPtr);
See Also