?
Solved

MIDI Input API call

Posted on 1997-03-30
3
Medium Priority
?
732 Views
Last Modified: 2008-02-26
I'm using Visual Basic 5.0 (Pro) and want to be able to use the MIDI input API call (specifically the midiInOpen function).

Can anyone help me with this? I've got MIDI Output working fine (exceptionally well, in fact), and I know I can get the Input working as VB5 supports DLL callbacks, but I don't really know where to start!

Thanks!
A.G.
0
Comment
Question by:Afterglow
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 1

Accepted Solution

by:
YiannisVolos earned 150 total points
ID: 1424849
Hello, I think I have an answer to your question...

Insert a module and then paste the following in the module. This will load the function MidiInOpen. Put this code on one line.
--MODULE--------------------------------------------------------------
Declare Function midiInOpen Lib "MMSYSTEM" (lphMidiIn As Integer, ByVal udeviceid As Integer, ByVal dwCallback As Long, ByVal dwInstance As Long, ByVal dwFlags As Long) As Integer

Public Const MCI_MODE_OPEN = (MCI_STRING_OFFSET + 18)

Public Const MCI_MODE_PAUSE = (MCI_STRING_OFFSET + 17)

Public Const MCI_MODE_PLAY = (MCI_STRING_OFFSET + 14)

Public Const MCI_MODE_RECORD = (MCI_STRING_OFFSET + 15)

Public Const MCI_MODE_SEEK = (MCI_STRING_OFFSET + 16)

Public Const MCI_MODE_STOP = (MCI_STRING_OFFSET + 13)

Public Const MCI_MODE_NOT_READY = (MCI_STRING_OFFSET + 12)

Public Const MCI_LOAD_FILE = &H100&

This will help you start ...
0
 

Author Comment

by:Afterglow
ID: 1424850
Hi,

Sorry - I'd already got that far, and could call the procedure successfully (returned a non-error value) but I haven't been successful in receiving the callbacks from it, even though I used the AddressOf [function] operator when calling it.

Have you/anyone managed to do this with VB5 yet?

Thanks!
A.G.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month14 days, 6 hours left to enroll

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question