Sign In:     


Forum: VirtualDJ Plugins

Topic: Problem with GetInfo (MAC)

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

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
You have to allocate your pointer. You can use a buffer of 512 char if you are not sure.
 

Thanks, it works.
 



(Old topics and forums are automatically closed)