Thread: How to open a midi in directX

  1. #1
    Registered User
    Join Date
    Sep 2001

    How to open a midi in directX

    I've tried to use mciSendString() to open a midi in directX, but it gave me such error message:error LNK2001: unresolved external symbol __imp__mciSendStringA@16
    fatal error LNK1120: 1 unresolved externals

    I don't know why, I've included such DSOUND.LIB AND DSOUND.H, even winmm.dll in my project also, but it didn't work, anyone can figure it out, or anyother ways to work on it.

    Thank you very much
    Don't laugh at me,I am just a SuperNewbie.

  2. #2
    Used Registerer jdinger's Avatar
    Join Date
    Feb 2002
    You can't play midi files with DirectSound, you need to use DirectMusic for midi's. Check out the SDK doc's for how to set it up (it's not the same as setting up the other DX components, you have to initialize COM, etc.). If you need more help check out under their DX tutorial section.

  3. #3
    Registered User
    Join Date
    Sep 2001
    Thanx, so what is that mciSendString() for, I saw someone used this in DirectX? that was quite simple if I can.

  4. #4
    train spotter
    Join Date
    Aug 2001
    near a computer
    Opps read the post properly first
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  5. #5
    Registered User
    Join Date
    Apr 2002
    hiya, mci*** functiosn are not part of the dx, you could serach for MCI overview on the msdn,

    from msdn,
    The Media Control Interface (MCI) provides standard commands for playing multimedia devices and recording multimedia resource files. These commands are a generic interface to nearly every kind of multimedia device

  6. #6
    Registered User Esss's Avatar
    Join Date
    Aug 2001
    Alternatively, you could always read the help.

    Library: Use Winmm.lib."


    #pragma comment(lib, "winmm.lib")

    to your source code, or add winmm.lib to your project.
    Like a rat in a maze who says,
    "Watch me choose my own direction"
    Are you under the illusion
    The path is winding your way?
    - Rush

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Too many files open?
    By homer_3 in forum C++ Programming
    Replies: 2
    Last Post: 11-11-2008, 10:17 PM
  2. Open Source and Security
    By DavidP in forum A Brief History of
    Replies: 17
    Last Post: 06-17-2008, 01:23 AM
  3. Open Software License 3.0 Explained
    By laserlight in forum A Brief History of
    Replies: 8
    Last Post: 01-08-2008, 08:10 PM
  4. To open or not to open ?
    By darfader in forum C Programming
    Replies: 7
    Last Post: 09-24-2003, 08:14 AM
  5. Ghost in the CD Drive
    By Natase in forum A Brief History of
    Replies: 17
    Last Post: 10-12-2001, 05:38 PM