Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
|
|
Source code |
1 2 3 4 5 |
#define WIN32_LEAN_AND_MEAN #include <windows.h> #include <iostream.h> #include <fstream.h> #include <string.h> |
|
|
Source code |
1 |
HINSTANCE libhandle=LoadLibrary("c:\\program files\\steinberg\\vstplugins\\muon\\cm101.dll");
|
|
|
Source code |
1 2 3 4 5 6 7 |
QLibrary myLib("c:\\program files\\steinberg\\vstplugins\\muon\\cm101.dll");
myLib.load();
if (myLib.isLoaded()) {
// use myLib.resolve("...") to load the functions
}
|
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
#include <QLibrary>
#include "audioeffectx.h"
const int blocksize=512;
const float samplerate=44100.0f;
long VSTCALLBACK host(AEffect *effect, long opcode, long index, long value, void *ptr, float opt);
void main()
{
/////////////////////////////////////////////////////////////////////
//
/// Loading a plugin
//
////////////////////////////////////////////////////////////////////
//create a pointer for the plugin we're going to load
AEffect* ptrPlug = NULL;
bool editor;
//find and load the DLL and get a pointer to is main function
//this has a prototype like this: AEffect *main(audioMaterCallback audioMaster)
QLibrary theVst("C:\\Program Files\\VstPlugins\\Crystal.dll"};
if (theVst.isLoaded())
{
//DLL was loaded OK
AEffect* (__cdecl* getNewPlugInstace) (audioMasterCallback);
getNewPlugInstance=(AEffect*(__cdecl*)(audioMasterCallback))GetProcAddress(theVst, "main");
|
Quoted
getNewPlugInstance = (AEffect*(__cdecl*)(audioMasterCallback)) theVst.resolve("main");