Jasinski Technical Wiki

Navigation

Home Page
Index
All Pages

Quick Search
»
Advanced Search »

Contributor Links

Create a new Page
Administration
File Management
Login/Logout
Your Profile

Other Wiki Sections

Software

PoweredBy

Using the Windows API in .Net Languages

RSS
Modified on Fri, Jan 16, 2009, 12:47 PM by Administrator Categorized as Windows API
The following code demonstrates how to declare a Windows API function in C#. You can convert code between C# and VB.NET at this website.

using System.Runtime.InteropServices;

namespace Mup
{
    class MidiFile
    {
        [DllImport("winmm.dll")] 
        private static extern int mciSendString(string strCommand, 
            StringBuilder strReturn, int iReturnLength, IntPtr
            hwndCallback);

    }
}

ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.