I have been going around in circles trying to add a value to ASPathName and was wandering if anybody could provide me with an example.
Say I have a file c:\test.pdf
and when I click any action which displays an AVAppOpenDialog I want this file to be returned.
So Say I click Open...
Instead of opening a dialog to let the user choose their desired pdf I have the following code,
ASFile asFile;
char *filePath = "/C/test.pdf";
asPathName = ASFileSysCreatePathFromDIPath(ASGetDefaultFileSys(), filePath, 0);
ASFileSysOpenFile(ASGetDefaultFileSys(), asPathName, ASFILE_READ, (ASFile *)&asFile);
*outNumASPathNames = 1;
*outASPathNames = &asPathName;
*ioChosenFilterIndex = -1;
*outFileSys = ASGetDefaultFileSys();
ASFileSysReleasePath(0,asPathName);
This does open up the desired pdf, but i get an error message
Could not open the file 'ASFileHandle'. What does this mean? And am I doing something wrong?