Alistair Leslie-Hughes leslie_alistair@hotmail.com writes:
+static UINT CALLBACK file_properties_callback(HWND hwnd, UINT uMsg, LPPROPSHEETPAGEW ppsp) +{
- struct file_properties_info *props = (struct file_properties_info *)ppsp->lParam;
- if (uMsg == PSPCB_RELEASE)
- {
if (!InterlockedDecrement(&props->refcount))heap_free(props);- }
Why do you need refcounting?
@@ -379,22 +694,24 @@ static void DoOpenProperties(ContextMenu *This, HWND hwnd) IShellFolder_Release(lpDesktopSF); }
- if (SUCCEEDED(ret))
- {
hpsxa = SHCreatePropSheetExtArrayEx(HKEY_CLASSES_ROOT, wszFiletype, MAX_PROP_PAGES - psh.nPages, lpDo);if (hpsxa != NULL){SHAddFromPropSheetExtArray(hpsxa, Properties_AddPropSheetCallback, (LPARAM)&psh);SHDestroyPropSheetExtArray(hpsxa);}hpsxa = SHCreatePropSheetExtArrayEx(HKEY_CLASSES_ROOT, wszFiletypeAll, MAX_PROP_PAGES - psh.nPages, lpDo);if (hpsxa != NULL){SHAddFromPropSheetExtArray(hpsxa, Properties_AddPropSheetCallback, (LPARAM)&psh);SHDestroyPropSheetExtArray(hpsxa);}IDataObject_Release(lpDo);- }
- if (SUCCEEDED(ret))
- {
init_file_properties_pages(lpDo, Properties_AddPropSheetCallback, (LPARAM)&psh);hpsxa = SHCreatePropSheetExtArrayEx(HKEY_CLASSES_ROOT, wszFiletype, MAX_PROP_PAGES - psh.nPages, lpDo);if (hpsxa != NULL){SHAddFromPropSheetExtArray(hpsxa, Properties_AddPropSheetCallback, (LPARAM)&psh);SHDestroyPropSheetExtArray(hpsxa);}hpsxa = SHCreatePropSheetExtArrayEx(HKEY_CLASSES_ROOT, wszFiletypeAll, MAX_PROP_PAGES - psh.nPages, lpDo);if (hpsxa != NULL){SHAddFromPropSheetExtArray(hpsxa, Properties_AddPropSheetCallback, (LPARAM)&psh);SHDestroyPropSheetExtArray(hpsxa);}IDataObject_Release(lpDo);- }
The indentation is wrong here.