- HOME
- Post in | c/c++/레퍼런스
- Post at | 2013. 1. 16. 11:21 | by 밀크빵.
- View comment
PathFindSuffixArray 경로에 찾고자 하는 문자열 있는지 확인
#include <stdio.h>
#include <Windows.h>
#include <shlwapi.h>
#pragma comment(lib, "shlwapi.lib")
int main()
{
char lpPath[] = "c:\\Windows\\System32\\notepad.exe";
char *apszSuffix[] = {"zip", "exe", "txt"};
int nSuffixSize = sizeof(apszSuffix) / sizeof(apszSuffix[0]);
const char *lpMathedSuffix;
lpMathedSuffix = PathFindSuffixArray(lpPath, apszSuffix, nSuffixSize);
if(lpMathedSuffix != NULL)
printf("Match : %s\n", lpMathedSuffix);
else
puts("Suffix does not matched");
return 0;
}
'c/c++ > 레퍼런스' 카테고리의 다른 글
ITaskSettings interface (0) | 2014.03.04 |
---|---|
ILogonTrigger interface (0) | 2014.03.03 |
Shellexecute() (0) | 2013.02.06 |