Ingreso rápido:  

Forum: VirtualDJ Plugins

Tema: I could use some help with GetInfo()

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

I'm writing a custom mapper and I have a little problem:

I call GetInfo to get various int values. Everything works as it should!

But if I call GetInfo to get char* values while it works fine in runtime, when I try to close the app it hungs...

Can anyone help me please?

 

Mensajes Thu 03 Apr 08 @ 4:31 pm
SBDJPRO Infinity Member since 2006
I've not had that problem, any chance of a sample of how you're declaring, calling and using?

Regards,

Scott
 

Mensajes Fri 04 Apr 08 @ 10:33 pm
Among other parts of code I will post only the parts that matter...


class PhantomDj : public IVdjPluginDevice
{
public:
char ArtistA[36]; char ArtistB[36]; char TitleA[36]; char TitleB[36];
HRESULT hrs;}

HRESULT __stdcall PhantomDj::OnTimer()
{
if (DeckInfo[0]->Status>0){
hrs=GetInfo("Author 1",&ArtistA);
SetText(0,DENON4500_TEXT_LINE1,ArtistA);}
}

ULONG __stdcall PhantomDj::Release()
{
return S_OK;
}

On the Release I also tried delete
ULONG __stdcall PhantomDj::Release()
{
delete this;
return 0;
}

With no success

As I said, it works fine during runtime.... It hangs the app when I try to exit so I believe it has something to do with the destructor...
If I don't use GetInfo to get ArtistA everything works fine... Also I don't experience any issues when I read int values ..

PS: My C++ knowledge is very limited... I'm mostly a VB programmer... I just write this mapper while I try to learn the basics on the same time....
 

Mensajes Mon 07 Apr 08 @ 4:13 am
djcelPRO InfinityModeratorMember since 2004
PhantomDeejay wrote :
char ArtistA[36];
HRESULT hrs;

hrs=GetInfo("Author 1",&ArtistA);


use:

char ArtistA[512]="";
GetInfo("Author 1",ArtistA);

ArtistA is already a pointer
( <=> char *ArstistA=new char[512]; )
 

Mensajes Mon 07 Apr 08 @ 9:39 am


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