[core] handle search improvements

* Fix memory leaks due to not releasing the heap
* Also speed up lookups by not reopening the same process twice in a row
* Also make the usb_debug variable global so we can use uuprintf everywhere
This commit is contained in:
Pete Batard 2017-04-29 17:14:16 +01:00
parent fec0813073
commit d1927ac1ef
7 changed files with 304 additions and 66 deletions

View file

@ -2170,8 +2170,9 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
case WM_COMMAND:
#ifdef RUFUS_TEST
if (LOWORD(wParam) == IDC_TEST) {
char* choices[] = { "Choice 1", "Choice 2", "Choice 3" };
SelectionDyn("Test Choice", "Unused", choices, ARRAYSIZE(choices));
SearchProcess("\\Device\\Harddisk5\\DR5", TRUE, TRUE);
// char* choices[] = { "Choice 1", "Choice 2", "Choice 3" };
// SelectionDyn("Test Choice", "Unused", choices, ARRAYSIZE(choices));
break;
}
#endif