diff options
-rw-r--r-- | capture_errs.h | 2 | ||||
-rw-r--r-- | gtk/capture_dlg.c | 20 |
2 files changed, 6 insertions, 16 deletions
diff --git a/capture_errs.h b/capture_errs.h index f04a36b93f..b96adac6ad 100644 --- a/capture_errs.h +++ b/capture_errs.h @@ -26,6 +26,8 @@ #ifdef HAVE_LIBPCAP #ifdef _WIN32 +/* error message, if WinPcap couldn't be loaded */ +/* will use g_strdup, don't forget to g_free the returned string! */ extern char *cant_load_winpcap_err(const char *app_name); #endif /* _WIN32 */ diff --git a/gtk/capture_dlg.c b/gtk/capture_dlg.c index 1509bbc53f..e4aac968bd 100644 --- a/gtk/capture_dlg.c +++ b/gtk/capture_dlg.c @@ -1236,23 +1236,11 @@ capture_start_cb(GtkWidget *w _U_, gpointer d _U_) #ifdef _WIN32 /* Is WPcap loaded? */ if (!has_wpcap) { + char * err_msg = cant_load_winpcap_err("Ethereal"); + simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, - "Unable to load WinPcap (wpcap.dll); Ethereal will not be able\n" - "to capture packets.\n\n" - "In order to capture packets, WinPcap must be installed; see\n" - "\n" - " http://www.winpcap.org/\n" - "\n" - "or the mirror at\n" - "\n" - " http://winpcap.mirror.ethereal.com/\n" - "\n" - "or the mirror at\n" - "\n" - " http://www.mirrors.wiretapped.net/security/packet-capture/winpcap/\n" - "\n" - "for a downloadable version of WinPcap and for instructions\n" - "on how to install WinPcap."); + err_msg); + g_free(err_msg); return; } #endif |