diff options
author | Gerald Combs <gerald@wireshark.org> | 2012-10-03 19:45:05 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2012-10-03 19:45:05 +0000 |
commit | bdd98d63cdc5e6d6f3e3dedb80a49b63a87b391a (patch) | |
tree | 86ee0c5255a14eac50b026647221f4e78cc1c25a /ui/win32 | |
parent | c74466c744bd3160d9482188ea5f84750cb7003b (diff) |
Fix compilation on Windows. Add back and fix function definitions,
fix doxygen d ocumentation, other fixes.
svn path=/trunk/; revision=45298
Diffstat (limited to 'ui/win32')
-rw-r--r-- | ui/win32/file_dlg_win32.c | 13 | ||||
-rw-r--r-- | ui/win32/file_dlg_win32.h | 16 |
2 files changed, 23 insertions, 6 deletions
diff --git a/ui/win32/file_dlg_win32.c b/ui/win32/file_dlg_win32.c index 164d0898e5..2c233779aa 100644 --- a/ui/win32/file_dlg_win32.c +++ b/ui/win32/file_dlg_win32.c @@ -106,6 +106,13 @@ typedef enum { #define FILE_DEFAULT_COLOR 2 +static UINT_PTR CALLBACK open_file_hook_proc(HWND of_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param); +static UINT_PTR CALLBACK save_as_file_hook_proc(HWND of_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param); +static UINT_PTR CALLBACK export_specified_packets_file_hook_proc(HWND of_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param); +static UINT_PTR CALLBACK merge_file_hook_proc(HWND mf_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param); +static UINT_PTR CALLBACK export_file_hook_proc(HWND of_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param); +static UINT_PTR CALLBACK export_raw_file_hook_proc(HWND of_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param); +static UINT_PTR CALLBACK export_sslkeys_file_hook_proc(HWND of_hwnd, UINT ui_msg, WPARAM w_param, LPARAM l_param); static void range_update_dynamics(HWND sf_hwnd, packet_range_t *range); static void range_handle_wm_initdialog(HWND dlg_hwnd, packet_range_t *range); static void range_handle_wm_command(HWND dlg_hwnd, HWND ctrl, WPARAM w_param, packet_range_t *range); @@ -445,7 +452,7 @@ win32_export_specified_packets_file(HWND h_wnd, GString *file_name, savable_file_types = wtap_get_savable_file_types(cfile.cd_t, cfile.linktypes); if (savable_file_types == NULL) - return; /* shouldn't happen - the "Save As..." item should be disabled if we can't save the file */ + return FALSE; /* shouldn't happen - the "Save As..." item should be disabled if we can't save the file */ g_range = range; g_compressed = FALSE; @@ -1758,7 +1765,7 @@ export_specified_packets_file_hook_proc(HWND sf_hwnd, UINT msg, WPARAM w_param, break; #endif default: - range_handle_wm_command(sf_hwnd, cur_ctrl, w_param, &g_range); + range_handle_wm_command(sf_hwnd, cur_ctrl, w_param, g_range); break; } break; @@ -2013,6 +2020,8 @@ range_handle_wm_command(HWND dlg_hwnd, HWND ctrl, WPARAM w_param, packet_range_t HWND cur_ctrl; TCHAR range_text[RANGE_TEXT_MAX]; + if (!range) return; + switch(w_param) { case (BN_CLICKED << 16) | EWFD_CAPTURED_BTN: case (BN_CLICKED << 16) | EWFD_DISPLAYED_BTN: diff --git a/ui/win32/file_dlg_win32.h b/ui/win32/file_dlg_win32.h index 1a23ad1ede..1b7345a5f4 100644 --- a/ui/win32/file_dlg_win32.h +++ b/ui/win32/file_dlg_win32.h @@ -60,11 +60,12 @@ check_savability_t win32_check_save_as_with_comments(HWND parent, capture_file * /** Open the "Save As" dialog box. * * @param h_wnd HWND of the parent window. - * @param cf capture_file structure for the capture to be saved + * @param cf capture_file Structure for the capture to be saved + * @param file_name File name. May be empty. + * @param file_type Wiretap file type. + * @param compressed Compress the file with gzip. * @param must_support_comments TRUE if the file format list should * include only file formats that support comments - * @param dont_reopen TRUE if the file is to be closed after it's - * saved, so we don't need to reopen it after saving it * * @return TRUE if packets were discarded when saving, FALSE otherwise */ @@ -76,8 +77,15 @@ gboolean win32_save_as_file(HWND h_wnd, capture_file *cf, /** Open the "Export Specified Packets" dialog box. * * @param h_wnd HWND of the parent window. + * @param cf capture_file Structure for the capture to be saved + * @param file_name File name. May be empty. + * @param file_type Wiretap file type. + * @param compressed Compress the file with gzip. + * @param range Range of packets to export. + * + * @return TRUE if packets were discarded when saving, FALSE otherwise */ -void win32_export_specified_packets_file(HWND h_wnd, GString *file_name, +gboolean win32_export_specified_packets_file(HWND h_wnd, GString *file_name, int *file_type, gboolean *compressed, packet_range_t *range); |