3

trying out PathFileExists as explainded here:
http://msdn.microsoft.com/en-us/library/windows/desktop/bb773584%28v=vs.85%29.aspx
causes Linker-Errors LNK2028 and LNK2019.
Here is my code:

char buffer1[] = "C:\\temp\\index.xml";
char *lpStr1;
lpStr1 = buffer1;

int retval;

retval = PathFileExistsA(lpStr1);
if (retval == 1 )
{
    this->lbl_stat->Text = "File found!";
}else{
    this->lbl_stat->Text = "File not found!";
}
leatherwolf
  • 99
  • 1
  • 6

1 Answers1

5

As explained at the bottom of the MSDN page, you have to add to the project properties the dependency towards shlwapi.lib (look for "additional libraries" or something like that under the linker settings).

Matteo Italia
  • 123,740
  • 17
  • 206
  • 299