View Single Post
Old 05-20-2004, 11:41 PM   #4 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,530
sde is on a distinguished road
windows programming .. ugggh .. i'm not even sure if i'm approaching this right.

so far, i have been able to import mmsystem, and load the winmm dll, but i'm not sure how to call this: http://msdn.microsoft.com/library/de...getnumdevs.asp

it is supposed to return the number of midi inputs you have.

how would you call that function? here is what i have so far to load the library:
Code:
#include "stdafx.h"
#include "windows.h"
#include "mmsystem.h"

int _tmain(int argc, _TCHAR* argv[])
{
	HINSTANCE hLib=LoadLibrary("winmm.dll");

	if(hLib == NULL)
	{
		std::cout << "hLib is NULL";
		getchar();
		return 0;
	}

	unsigned long   iNumDevs, i;

	// here i want to call midiInGetNumDevs()
	// and assign it to iNumDevs


  FreeLibrary((HMODULE)hLib);
  getchar();
	
	return 0;
}
does it even look like i'm on the right track?
__________________
Mike
sde is offline   Reply With Quote