Thread: Direct Music Trouble

  1. #1
    Registered User
    Join Date
    Nov 2002
    Posts
    19

    Direct Music Trouble

    Hey guys, a lil prob here. I am trying to intialize the Com for Direct Music. I am using Vc++ .NET and am using the Direct Soundlibrary. Here is my code

    #include <iostream.h>
    #include <stdio.h>
    #include <string.h>
    #include <stdlib.h>
    #include "dmusici.h"
    #include "dsound.h"

    int main()
    {
    LPDIRECTMUSIC8 ldm;
    CoInitialize (NULL);
    IDirectMusicPerformance *performance;
    if (FAILED(CoCreateInstance(CLSID_DirectMusicPerfoman ce,
    NULL,
    CLSCTX_INPROC,
    IID_IDirectMusicPerformance,
    (void **)&performance)))
    {
    // handle error
    }


    getchar();

    return 0;

    }

    My error is that it does not recognize "CLSID_DirectMusicPerfomance" Any ideas or better methods of playing a Midi using Direct Music api? Thanks!!!!!
    May GOD Bless, Strengthen, Guide, and Protect you Always!

  2. #2
    Why does it hang over like that, maybe it's just the way you posted but change it to this:

    CLSID_DirectMusicPerfomance
    Last edited by OneStiffRod; 11-28-2002 at 12:20 AM.
    My Avatar says: "Stay in School"

    Rocco is the Boy!
    "SHUT YOUR LIPS..."

  3. #3
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,130
    How about CLSID_DirectMusicPerformance ?
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  4. #4
    Programming Sex-God Polymorphic OOP's Avatar
    Join Date
    Nov 2002
    Posts
    1,078
    You forgot the r in performance

  5. #5
    I am he who is the man! Stan100's Avatar
    Join Date
    Sep 2002
    Posts
    361
    sry to jump in like this but I needed to know something. FwyWice, what's vc++ .net's difference from regular vc++? sry if the question is a little vague
    Stan The Man. Beatles fan

    When I was a child,
    I spoke as a child,
    I thought as a child,
    I reasoned as a child.
    When I became a man,
    I put childish ways behind me"
    (the holy bible, Paul, in his first letter to the Cor. 13:11)

  6. #6
    Registered User
    Join Date
    Nov 2002
    Posts
    19
    The only real difference I see is that you can create .Net objects and that you can have your code compiled into the new immdeidate language for the Just in Time compiler. Oh and I think the New IDE is A LOT better but that is my opinion. I like the Intellisense A WHOLE lot too!
    May GOD Bless, Strengthen, Guide, and Protect you Always!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Music Programming - Serial Matrix Display (Help needed)
    By CrazyHorse in forum C Programming
    Replies: 1
    Last Post: 11-13-2007, 04:28 PM
  2. Music Programming - Serial Matrix Display
    By CrazyHorse in forum C Programming
    Replies: 1
    Last Post: 11-12-2007, 04:16 PM
  3. Is AOL music crazy?
    By joeprogrammer in forum A Brief History of Cprogramming.com
    Replies: 9
    Last Post: 03-24-2006, 07:24 PM
  4. Help with Direct Music
    By poopy_pants2 in forum Game Programming
    Replies: 16
    Last Post: 04-17-2003, 10:05 PM
  5. Direct Music Illegal Static Member Call error
    By FwyWice in forum Game Programming
    Replies: 4
    Last Post: 11-30-2002, 05:14 PM