Ingreso rápido:  

Forum: VirtualDJ Plugins

Tema: Neet some help with SendCommand()

Este tópico es antiguo y puede contener información incorrecta para la nueva versión.

ChacklPRO InfinityMember since 2007
Hello!

My problem today is tricky....

evertytime i activate the plugin i want to send a commad to VDJ to clone the deck.

And now:

SendCommand("clone_deck 3",1);
does not work.

This one works:
SendCommand("clone_deck",1);

Everytime if i want to send an action with a space between, the send command does not work.

How can i get this fixed?

Best regards, C.Hackl
 

Mensajes Thu 19 Apr 12 @ 8:22 am
SBDJPRO Infinity Member since 2006
What value are you returning for rclsid in DllGetClassObject?
 

Mensajes Thu 19 Apr 12 @ 10:06 am
ChacklPRO InfinityMember since 2007
SBDJ wrote :
What value are you returning for rclsid in DllGetClassObject?


Since it is my first VDJ plugin, i have to tell you, that i don't know where to put it to the code and what value I have to take :(
I've read the SDK, serached all on google and the VDJ site.... but there are still questions i have and one of them ist that.

But i dont whant to ask evry silly question, i want to learn it on my own :P - and i hop i'll get that :D

Would you be so kind to help me with that DllGetClassObject / SendCommand thing?

Best regards, C.Hackl
 

Mensajes Thu 19 Apr 12 @ 10:17 am
ChacklPRO InfinityMember since 2007
i'm using the layouts of microsoft visual studio 2008 that i've found here at the page and this shows me this:

HRESULT VDJ_API 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;
if(memcmp(&riid,&IID_IVdjPluginDsp,sizeof(GUID))!=0) return CLASS_E_CLASSNOTAVAILABLE;
*ppObject=new Cslipmode();
return NO_ERROR;

Or do i have to change something?
 

Mensajes Thu 19 Apr 12 @ 11:04 am
SBDJPRO Infinity Member since 2006
That means you are using the v5 SDK, hence the old SendCommand format.

If you use the latest SDK from here:

http://www.virtualdj.com/wiki/Developers.html

And use: if(memcmp(&rclsid,&CLSID_VdjPlugin6,sizeof(GUID))!=0) return CLASS_E_CLASSNOTAVAILABLE;

This means you can then use VDJScript commands.
 

Mensajes Thu 19 Apr 12 @ 7:30 pm
ChacklPRO InfinityMember since 2007
Ok i've downloadet and saved all those files to the SDK.

But now i get a lot of Errors in the Basic Plugin where i want to write the code. Is there any basic plugin coder for the SDK V6?

Best Regarts
 

Mensajes Fri 20 Apr 12 @ 1:43 am
ChacklPRO InfinityMember since 2007
Ok at the moment i get an error here:

VdjPlugin.h:
//////////////////////////////////////////////////////////////////////////
// GUID definitions

#ifndef VDJCLASSGUID_DEFINED
#define VDJCLASSGUID_DEFINED
static const GUID CLSID_VdjPlugin6 = { 0x37db664a, 0x6cf1, 0x4768, { 0xbc, 0x69, 0x32, 0x68, 0x13, 0xbf, 0xb, 0xf4 } };
static const GUID CLSID_VdjPlugin5 = { 0x2e1480fe, 0x4ff4, 0x4539, { 0x90, 0xb3, 0x64, 0x5f, 0x5d, 0x86, 0xf9, 0x3b } };
static const GUID IID_IVdjPluginBasic = { 0x865a6bbe, 0xed4b, 0x4bd5, { 0x93, 0xfe, 0x25, 0xa6, 0x26, 0xe2, 0x56, 0x1f } };
#else
extern static const GUID CLSID_VdjPlugin6;
extern static const GUID CLSID_VdjPlugin5;
extern static const GUID IID_IVdjPluginBasic;
#endif

//////////////////////////////////////////////////////////////////////////
// DLL export function

#ifndef NODLLEXPORT
#ifdef __cplusplus
extern "C" {
#endif
VDJ_EXPORT HRESULT __stdcall DllGetClassObject(const GUID &rclsid,const GUID &riid,void** ppObject);
#ifdef __cplusplus
}
#endif
#endif


This is the initalisation in the plugin:
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_VdjPlugin6,sizeof(GUID))!=0) return CLASS_E_CLASSNOTAVAILABLE;
if(memcmp(&riid,&IID_IVdjPluginDsp,sizeof(GUID))!=0) return CLASS_E_CLASSNOTAVAILABLE;
*ppObject=new Cmy_plugin4();
return NO_ERROR;
}


Vistual Studio tells me:
error C2375: 'DllGetClassObject': Newdeffinition, different attachment

It tells me a mistake at the deklaration od an "DllGetClassObject"

Regards
 

Mensajes Fri 20 Apr 12 @ 2:21 am
ChacklPRO InfinityMember since 2007
Ok thanks i got it:

I addet at first lines at my pluging:
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include "vdjDsp.h"
 

Mensajes Fri 20 Apr 12 @ 2:48 am
SBDJPRO Infinity Member since 2006
That'll sort it - #define WIN32_LEAN_AND_MEAN :)
 

Mensajes Fri 20 Apr 12 @ 2:20 pm
ChacklPRO InfinityMember since 2007
Big thanks man!

Would it be possible to update the SDK for Visual Studio 2008, so that you are able to load a effectlayout if you start it?

I got now all and i exported a working effekt. But till a releas it will take some time, that i can get clear with c++. I just learnd Visual Basic at scool an c++ is a bit different :P

Thanks for help,
Regards, C.hackl
 

Mensajes Sat 21 Apr 12 @ 8:58 am


(Los tópicos y foros antiguos son automáticamente cerrados)