What means value returned by "long = mciSendString()" in MCI

595 views Asked by At

try to work with MCI and found some sample with code like long = mciSendString(); what means this value

try it, my code

[DllImport("winmm.dll")]
    private static extern long mciSendString(string strCommand,
        StringBuilder strReturn, int iReturnLength, IntPtr hwndCallback);
...
private string MPlayerCommand; // command for MCI usage
private long error;
....
public void play()
    {
        MPlayerCommand = "play MediaFile";
        error = mciSendString(MPlayerCommand, null, 0, IntPtr.Zero);
    }

return me value like

returned value

and each time (even if open same file) this value is different - main q - what is this value means???

1

There are 1 answers

0
DarkUrse On

You should read mciSendString documentation regarding the meaning of the returned value. Here's a list of these possible values.

But in any case, your signature of the mciSendString method is wrong, it returns an Int32 (DWORD) and not an Int64 (long).

I hope this will help you, even though this thread is quite old.