I'm working on a team making a Kinect controller for virtual DJ for my usability class. We're making it in c# but we need to talk to virtual dj to get information to populate our GUI and send commands based on gestures or other inputs. We were worried because we had no idea how to make the plugin in c#, but thankfully we can jsut make calls to the .dll file. The only problem now is none of us have extensive knowledge of c++, and have no idea how to implement the header file. Since all we wanna use the plugin for is an IO for virtual dj and our program, it should be easy, since it seems the command for requests and command in vdjscript are implemented in the derived class; However, we don't even know to just get the basic plugin functionality implemented. Can anybody help me figure this out or provide a bit of sample code so I could try to figure it out?
Mensajes Sat 22 Oct 11 @ 3:25 pm
Either learn COM interop or C++ basically!
I can sort a basic sample when I get home in C++ if it helps.
I can sort a basic sample when I get home in C++ if it helps.
Mensajes Sat 22 Oct 11 @ 4:21 pm
Well we have some people on the team who have taken courses in it, myself included, but we're still having issues with making the plugin. We made an attempt at it but we weren't quite able to get it working, so we just need help with the basics of getting it down.
Mensajes Sat 22 Oct 11 @ 4:27 pm
That would definitely help, we honestly just need to figure out a basic compilable code just to make vdjscript calls, we won't be adding anything else until maybe later in the project.
Mensajes Sat 22 Oct 11 @ 4:46 pm
We're you ever able to find a sample for a basic plugin?
Mensajes Mon 24 Oct 11 @ 8:18 am
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include "VdjPlugin.h"
//////////////////////////////////////////////////////////////////////////
// Class definition
//////////////////////////////////////////////////////////////////////////
class Cmyplugin : public IVdjPlugin
{
public:
HRESULT __stdcall OnLoad();
HRESULT __stdcall OnGetPluginInfo(TVdjPluginInfo *infos);
ULONG __stdcall Release();
private:
};
//////////////////////////////////////////////////////////////////////////
// Initialization
//////////////////////////////////////////////////////////////////////////
HRESULT __stdcall DllGetClassObject(const GUID &rclsid,const GUID &riid,void** ppObject)
{
// This is the standard DLL loader for COM object.
// You don't need to change anything in this function.
if(memcmp(&rclsid,&CLSID_VdjPlugin,sizeof(GUID))!=0) return CLASS_E_CLASSNOTAVAILABLE;
*ppObject=new Cmyplugin();
return NO_ERROR;
}
//------------------------------------------------------------------------
HRESULT __stdcall Cmyplugin::OnLoad()
{
return S_OK;
}
//------------------------------------------------------------------------
HRESULT __stdcall Cmyplugin::OnGetPluginInfo(TVdjPluginInfo *infos)
{
infos->Author="Put your name here";
infos->PluginName="myplugin";
infos->Description="Description of your plugin";
infos->Flag=0;
return S_OK;
}
//------------------------------------------------------------------------
ULONG __stdcall Cmyplugin::Release()
{
delete this;
return 0;
}
Found this at http://www.virtualdj.com/forums/68507/Virtual_DJ_Plugins/Plugins_-_Sources_Codes_or_and_Beta_Version_-_Let_your_links_or_ideas_here_con_t.html
Is this enough to get going with our project?
#include <windows.h>
#include "VdjPlugin.h"
//////////////////////////////////////////////////////////////////////////
// Class definition
//////////////////////////////////////////////////////////////////////////
class Cmyplugin : public IVdjPlugin
{
public:
HRESULT __stdcall OnLoad();
HRESULT __stdcall OnGetPluginInfo(TVdjPluginInfo *infos);
ULONG __stdcall Release();
private:
};
//////////////////////////////////////////////////////////////////////////
// Initialization
//////////////////////////////////////////////////////////////////////////
HRESULT __stdcall DllGetClassObject(const GUID &rclsid,const GUID &riid,void** ppObject)
{
// This is the standard DLL loader for COM object.
// You don't need to change anything in this function.
if(memcmp(&rclsid,&CLSID_VdjPlugin,sizeof(GUID))!=0) return CLASS_E_CLASSNOTAVAILABLE;
*ppObject=new Cmyplugin();
return NO_ERROR;
}
//------------------------------------------------------------------------
HRESULT __stdcall Cmyplugin::OnLoad()
{
return S_OK;
}
//------------------------------------------------------------------------
HRESULT __stdcall Cmyplugin::OnGetPluginInfo(TVdjPluginInfo *infos)
{
infos->Author="Put your name here";
infos->PluginName="myplugin";
infos->Description="Description of your plugin";
infos->Flag=0;
return S_OK;
}
//------------------------------------------------------------------------
ULONG __stdcall Cmyplugin::Release()
{
delete this;
return 0;
}
Found this at http://www.virtualdj.com/forums/68507/Virtual_DJ_Plugins/Plugins_-_Sources_Codes_or_and_Beta_Version_-_Let_your_links_or_ideas_here_con_t.html
Is this enough to get going with our project?
Mensajes Mon 24 Oct 11 @ 10:13 am