information about the "Unknown" application instead of admitting that
nothing is registered. The solution is to add ASSOCF_INIT_IGNOREUNKNOWN
to the flags parameter. Also update dead URLs.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26488
a592a061-630c-0410-9148-
cb99ea01b6c8
DWORD bufSize = MAX_PATH + 100;
TCHAR buf[MAX_PATH + 100];
DWORD bufSize = MAX_PATH + 100;
TCHAR buf[MAX_PATH + 100];
- // reference: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc
- // /platform/shell/reference/shlwapi/registry/assocquerystring.asp
+ // reference: http://msdn.microsoft.com/en-us/library/bb773471.aspx
char const * action = (mode == VIEW) ? "open" : "edit";
char const * action = (mode == VIEW) ? "open" : "edit";
- return S_OK == AssocQueryString(0, ASSOCSTR_EXECUTABLE,
- full_ext.c_str(), action, buf, &bufSize);
+ return S_OK == AssocQueryString(ASSOCF_INIT_IGNOREUNKNOWN,
+ ASSOCSTR_EXECUTABLE, full_ext.c_str(), action, buf, &bufSize);
}
bool autoOpenFile(string const & filename, auto_open_mode const mode)
{
}
bool autoOpenFile(string const & filename, auto_open_mode const mode)
{
- // reference: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc
- // /platform/shell/reference/functions/shellexecute.asp
+ // reference: http://msdn.microsoft.com/en-us/library/bb762153.aspx
string const win_path = to_local8bit(from_utf8(convert_path(filename, PathStyle(windows))));
char const * action = (mode == VIEW) ? "open" : "edit";
return reinterpret_cast<int>(ShellExecute(NULL, action,
string const win_path = to_local8bit(from_utf8(convert_path(filename, PathStyle(windows))));
char const * action = (mode == VIEW) ? "open" : "edit";
return reinterpret_cast<int>(ShellExecute(NULL, action,
DWORD bufSize = MAX_PATH + 100;
TCHAR buf[MAX_PATH + 100];
DWORD bufSize = MAX_PATH + 100;
TCHAR buf[MAX_PATH + 100];
- // reference: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc
- // /platform/shell/reference/shlwapi/registry/assocquerystring.asp
+ // reference: http://msdn.microsoft.com/en-us/library/bb773471.aspx
char const * action = (mode == VIEW) ? "open" : "edit";
char const * action = (mode == VIEW) ? "open" : "edit";
- return S_OK == AssocQueryString(0, ASSOCSTR_EXECUTABLE,
- full_ext.c_str(), action, buf, &bufSize);
+ return S_OK == AssocQueryString(ASSOCF_INIT_IGNOREUNKNOWN,
+ ASSOCSTR_EXECUTABLE, full_ext.c_str(), action, buf, &bufSize);
}
bool autoOpenFile(string const & filename, auto_open_mode const mode)
{
}
bool autoOpenFile(string const & filename, auto_open_mode const mode)
{
- // reference: http://msdn.microsoft.com/library/default.asp
- // ?url=/library/en-us/shellcc/platform/shell/reference/functions/
- // shellexecute.asp
+ // reference: http://msdn.microsoft.com/en-us/library/bb762153.aspx
char const * action = (mode == VIEW) ? "open" : "edit";
return reinterpret_cast<int>(ShellExecute(NULL, action,
to_local8bit(from_utf8(filename)).c_str(), NULL, NULL, 1)) > 32;
char const * action = (mode == VIEW) ? "open" : "edit";
return reinterpret_cast<int>(ShellExecute(NULL, action,
to_local8bit(from_utf8(filename)).c_str(), NULL, NULL, 1)) > 32;