百度百科:http://baike.baidu.com/view/1285880.htm
-------------------------------------------------------------------------------
相关代码:
//查找当前系统mp4默认的播放器
char appPath[MAX_PATH] = {0};
long status = (long)FindExecutable("C:\Documents and Settings\Administrator\桌面\abc.txt", NULL, appPath); //HINSTANCE
printf("status:%d ", status);
if(status > 32)
{
printf("关联的应用程序:%s ", appPath);
}
else if(status == SE_ERR_NOASSOC)
{
printf("没有找到文件类型的关联程序 ");
}
-------------------------------------------------------------------------------
输出结果:
status:42
关联的应用程序:C:WINDOWS otepad.exe
2014-09-22