Quick Sign In:  

Forum: VirtualDJ Plugins

Topic: Problem with GetInfo (MAC)

This topic is old and might contain outdated or incorrect information.

k090PRO InfinityMember since 2006
I have a stupid problem I can't resolve.


char string1[128];
char string2[128];
char *Filename;
int Status;

Filename = NULL;
GetInfo("FileName", &Filename);
GetInfo("Status", &Status);
wsprintf (string1, "Filename: %s", Filename);
wsprintf (string2, "Status: %d", Status);


My problem is that plugin crash when get Filename.
If I change command to

GetInfo("FileName", Filename);

I always receive (null).

I don't know where I make a mistake. I have no problem to get Status. Its similar but doesn't work :(

 

Posted Mon 09 Feb 09 @ 5:33 pm
djcelPRO InfinityModeratorMember since 2004
You have to allocate your pointer. You can use a buffer of 512 char if you are not sure.
 

Posted Tue 10 Feb 09 @ 1:41 am
k090PRO InfinityMember since 2006
Thanks, it works.
 

Posted Tue 10 Feb 09 @ 3:12 am


(Old topics and forums are automatically closed)