Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

using System; using System.Runtime.InteropServices; classAPItest { [DllImport("winmm.

dll")] publicstaticexternlong PlaySound(string filename,long h,long d); staticvoid Main(String[]args) { long r; string fname = "C:\\Users\\ictlab\\Desktop\\Linux\test.wav"; r = PlaySound(fname, 0, 1); } }

--------------------------------------------------using System; using System.Runtime.InteropServices; classAPItest { [DllImport("user32dll")] staticexternint MessageBox(IntPtr i, string text, string cap, int type); publicstaticvoid Main() { MessageBox(IntPtr.Zero, "Please do not close the door", "Atention", 0); } } ------using System; using System.Text; using System.Runtime.InteropServices; classAPItest { [DllImport("user32dll")] staticexternint GetWindowsDirectory(StringBuilder sb, int maxchars); staticvoid Main() { StringBuilder s = newStringBuilder(256);

You might also like