Subject: Calling LoadLibrary()
From: [email-masked] (drs)

23 Jan 1997 23:17:07 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Reply-To: [email-masked]
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.01Gold (Win95; I)
Original-To: [email-masked]
Original-Sender: [email-masked]

Has anyone successfuly loaded a dll or driver using LoadLibrary? The
following seems like it should work; what am I doing wrong?

/**********************code*************************/
//dll_load.cpp

#include <windows.h>
#include <iostream.h>

main()
{
	HINSTANCE hLibrary;
	hLibrary = LoadLibrary("MMSYSTEM.DLL");
	cout << "This is mmsystem's handle: " 
	     << hLibrary << endl;

	if(hLibrary)
	{
		FreeLibrary(hLibrary);
		return 0;
	}
	else 
	return 0;

}

/**************makefile************************/

#makefile for dll test

dll_load.exe: dll_load.o
	g++ -o dll_load.exe dll_load.o -mwindows

dll_load.o: dll_load.cpp
	g++ -c dll_load.cpp
-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".