Skip to content

Instantly share code, notes, and snippets.

@Fryguy
Created February 1, 2011 05:45
Show Gist options
  • Save Fryguy/805479 to your computer and use it in GitHub Desktop.
Save Fryguy/805479 to your computer and use it in GitHub Desktop.
shlwapi.h methods
#include <windows.h>
#include <stdio.h>
#include <shlwapi.h>
void main()
{
CHAR *path;
BOOL ret;
path = "C:/projects/rubyinstaller/sandbox";
ret = PathFileExists(path);
printf("%s: %d\n", path, ret);
path = "C:/projects/rubyinstaller/sandbox/does/not/exist";
ret = PathFileExists(path);
printf("%s: %d\n", path, ret);
}
sh-3.1$ gcc test.c -o test.exe
C:\Users\jfrey\AppData\Local\Temp\ccbBiG7k.o:test.c:(.text+0x24): undefined reference to `_imp__PathFileExistsA@4'
C:\Users\jfrey\AppData\Local\Temp\ccbBiG7k.o:test.c:(.text+0x58): undefined reference to `_imp__PathFileExistsA@4'
collect2: ld returned 1 exit status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment