I got to write a wrapper in C to make use of winmm.dll. There is another application, which will use C wrapper to call winmm API's.
Here is the C# code, can some body help me in converting to C code, I got to have this as dll. so I'm using vc++.net system32 app.
-----------------------------------------------------------------------------------------------------------------------------------------------------
Code:
[DllImport("winmm.dll")]
private static extern long mciSendString(
string strCommand,
StringBuilder strReturn,
int iReturnLength,
IntPtr oCallback);
public void OpenMediaFile(string strFileName)
{
PlayCommand = "Open \"" + strFileName + "\" alias MediaFile";
mciSendString(PlayCommand, null, 0, IntPtr.Zero);
isOpen = true;
}
public void PlayMediaFile(bool loop)
{
if (isOpen)
{
PlayCommand = "Play MediaFile";
if (loop)
PlayCommand += " REPEAT";
mciSendString(PlayCommand, null, 0, IntPtr.Zero);
}
}
---------------------------------------------------------------------------------------------------------
Code:
long __declspec(dllimport) __stdcall mciSendStringA(char*, char *, int ,int *);
int PlayMediaFile()
{
int out = 0;
mciSendStringA("Play MediaFile", "", 0, &out);
return 0;
}
I appreciate if someone help me here.
thanks,

