WinMMMciSendString Method
Sends a command string to an MCI device.
The device that the command is sent to is specified in the command string.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("WinMM.dll", EntryPoint = "mciSendString", CharSet = CharSet.Auto,
BestFitMapping = false, ThrowOnUnmappableChar = true, SetLastError = true)]
public static int MciSendString(
string command,
StringBuilder buffer,
int bufferSize,
IntPtr hWndCallback
)
<DllImportAttribute("WinMM.dll", EntryPoint := "mciSendString", CharSet := CharSet.Auto,
BestFitMapping := false, ThrowOnUnmappableChar := true, SetLastError := true>]
Public Shared Function MciSendString (
command As String,
buffer As StringBuilder,
bufferSize As Integer,
hWndCallback As IntPtr
) As Integer
Dim command As String
Dim buffer As StringBuilder
Dim bufferSize As Integer
Dim hWndCallback As IntPtr
Dim returnValue As Integer
returnValue = WinMM.MciSendString(command,
buffer, bufferSize, hWndCallback)
public:
[DllImportAttribute(L"WinMM.dll", EntryPoint = L"mciSendString", CharSet = CharSet::Auto,
BestFitMapping = false, ThrowOnUnmappableChar = true, SetLastError = true)]
static int MciSendString(
String^ command,
StringBuilder^ buffer,
int bufferSize,
IntPtr hWndCallback
)
[<DllImportAttribute("WinMM.dll", EntryPoint = "mciSendString", CharSet = CharSet.Auto,
BestFitMapping = false, ThrowOnUnmappableChar = true, SetLastError = true)>]
static member MciSendString :
command : string *
buffer : StringBuilder *
bufferSize : int *
hWndCallback : IntPtr -> int
No code example is currently available or this language may not be supported.
- command String
-
Pointer to a null-terminated string that specifies an MCI command string.
For a list, see https://msdn.microsoft.com/en-us/library/windows/desktop/dd743572(v=vs.85).aspx.
- buffer StringBuilder
- StringBuilder that receives return information.
If no return information is needed, this parameter can be .
- bufferSize Int32
-
Size, in characters, of the return buffer specified by the buffer parameter.
- hWndCallback IntPtr
-
A IntPtr to a callback window if the "notify" flag was specified in the command string.
Int32
Returns zero if successful or an error otherwise.
The low-order word of the returned DWORD value contains the error return value.
If the error is device-specific, the high-order word of the return value is the driver identifier;
otherwise, the high-order word is zero. For a list of possible error values, see MCIERR Return Values.
To retrieve a text description of return values,
pass the return value to the
MciGetErrorString(Int32, StringBuilder, Int32) function