Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!ames!apple!well!cbm From: cbm@well.UUCP (Chris Muir) Newsgroups: comp.sys.mac.programmer Subject: Re: Using MIDI Manager from ThinkSpeed C. How? Help! Message-ID: <13519@well.UUCP> Date: 8 Sep 89 21:38:35 GMT References: <336@castle.ed.ac.uk> Reply-To: cbm@well.UUCP (Chris Muir) Organization: Whole Earth 'Lectronic Link, Sausalito, CA Lines: 37 In message <336@castle.ed.ac.uk>, nick@lfcs.ed.ac.uk (Nick Rothwell) writes: =So, what's wrong with something like =this: = = pascal OSErr MIDISignIn(clientID, refCon, icon, name) = OSType clientID; = long refCon; = Handle icon; = StringPtr name; = { = asm { = move.l #(((long)midiSignIn<<16) + midiToolNum), D0 = dc.w 0xA800 /* sound manager trap. */ = } = } I can barely read C but, what about the parameters to this trap? Does C push them in the order the trap wants to see them? Is StringPtr == Str255? Why can't you use the routine in the .h file that came with the MM? pascal OSErr MIDISignIn(OSType clientID, long refCon, Handle icon, Str255 name) = {0x203C,4,midiToolNum,0xA800}; Have you called SndDispVersion first? I believe SndDispVersion does some important initialization. -- _______________________________________________________________________________ Chris Muir | "There is no language in our lungs {hplabs,pacbell,ucbvax,apple} | to tell the world just how we feel" !well!cbm | - A. Partridge