*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
BOOL time_to_filetime(const time_t* t, FILETIME* ftime)
{
-#ifdef __STDC_WANT_SECURE_LIB__
+#if defined(__STDC_WANT_SECURE_LIB__) && defined(_MS_VER)
SYSTEMTIME stime;
struct tm tm_;
struct tm* tm = &tm_;
BOOL launch_cpanel(HWND hwnd, LPCTSTR applet)
{
- //launch_file(_hwnd, applet, SW_SHOWNORMAL); // This would be enough, but we want the to use the most direct and fastest call.
- //launch_file(_hwnd, String(TEXT("rundll32.exe /d shell32.dll,Control_RunDLL "))+applet, SW_SHOWNORMAL);
+ TCHAR parameters[MAX_PATH];
+
+ _tcscpy(parameters, TEXT("shell32.dll,Control_RunDLL "));
+ _tcscat(parameters, applet);
- return RunDLL(hwnd, TEXT("shell32"), CONTROL_RUNDLL, applet, SW_SHOWNORMAL);
+ return ((int)ShellExecute(hwnd, TEXT("open"), TEXT("rundll32.exe"), parameters, NULL, SW_SHOWDEFAULT) > 32);
}