Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Help with midiOutOpen()

jasonjason United KingdomMember Posts: 88 ✭✭
Hi all.

Can anyone spot a problem with the following snippet of code. I'm just trying to open the midi out device in order to send a few short messsages.

HMIDISTRM stream = NULL;
LPHMIDIOUT lphmo = NULL;
MIDIOUTCAPS caps;

unsigned int dev = midiOutGetNumDevs() - 1;

int result = midiOutGetDevCaps( dev, &caps, sizeof( MIDIOUTCAPS ) );
int result0 = midiOutOpen( lphmo, dev, 0, 0, CALLBACK_NULL );

The midiOutOpen() function is returning with

MMSYSERR_INVALPARAM The specified pointer or structure is invalid.

Would this error occur if the device is already open by another application or the OS (Win XP)?

Any help much appreciated. Jason

Comments

  • briandavisbriandavis Member Posts: 1
    I'm having exactly the same problem in Win XP (using VB .NET), but haven't found a solution yet.
  • Justin BibJustin Bib USAMember Posts: 0

    ______ { http://forcoder.org } free video tutorials and ebooks about { Java PL/SQL Objective-C MATLAB Swift PHP Go Perl Assembly C C# R Delphi C++ Scratch Visual Basic .NET Python Visual Basic JavaScript Ruby COBOL Alice Transact-SQL Fortran Kotlin Lisp Erlang VBScript SAS Scheme Hack Apex ML Awk F# Rust Ada Dart Scala Crystal ABAP Lua Logo Prolog Julia FoxPro D Clojure LabVIEW Bash } ____________

Sign In or Register to comment.