Hello Petri,
I think the issue lies with how you are viewing your information and the fact that you're initializing your values to NULL. According to the All Printer parameter of the NIReports_GetPrinters function, if you pass NULL to this parameter, it indicates that you do not need this information.
Also, in the documentation for this parameter, it shows a helpful example, I have modifed it and posted it below. You should add a watch statement for the printer variable, and notice that everytime you hit the breakpoint set on NIReport_FreeMemory, the value of printer will be set to the name of one of your printers. In other words, you should hit the breakpoint seven times (1 for each printer on your system, and 1 for the NULL at the end of the list).
void GetAndFreePrinters (void)
{
char **allPrinters;
char **printer;
NIReport_GetPrinters (NULL, &allPrinters);
printer = allPrinters;
while (*printer != NULL)
// you should put a breakpoint on the line below so you can see what value is stored
// in printer before it is freed
NIReport_FreeMemory (*printer++);
NIReport_FreeMemory (allPrinters);
}
Hope that helps.
Wendy L
LabWindows/CVI Developer Newsletter