Author: mlytwyn
Date: Thu May 19 19:01:45 2016
New Revision: 39792
URL: http://svn.gna.org/viewcvs/gnustep?rev=39792&view=rev
Log:
Add version check in debug for Shell32.dll
Modified:
libs/back/branches/gnustep_testplant_branch/Source/win32/MSUserNotifications/TaskbarNotifications/TaskbarNotifications.mm
Modified:
libs/back/branches/gnustep_testplant_branch/Source/win32/MSUserNotifications/TaskbarNotifications/TaskbarNotifications.mm
URL:
http://svn.gna.org/viewcvs/gnustep/libs/back/branches/gnustep_testplant_branch/Source/win32/MSUserNotifications/TaskbarNotifications/TaskbarNotifications.mm?rev=39792&r1=39791&r2=39792&view=diff
==============================================================================
---
libs/back/branches/gnustep_testplant_branch/Source/win32/MSUserNotifications/TaskbarNotifications/TaskbarNotifications.mm
(original)
+++
libs/back/branches/gnustep_testplant_branch/Source/win32/MSUserNotifications/TaskbarNotifications/TaskbarNotifications.mm
Thu May 19 19:01:45 2016
@@ -77,10 +77,11 @@
void _removeProcessInfo();
void _removeApplicationIconForID(UINT appIconID);
-static HANDLE gHandleDLL = NULL;
-static HWND gHandleWin = NULL;
-static UINT gNotifyMsg = 0;
-static UINT gNotifyCnt = 0;
+static HANDLE gHandleDLL = NULL;
+static HWND gHandleWin = NULL;
+static UINT gNotifyMsg = 0;
+static UINT gNotifyCnt = 0;
+static DLLVERSIONINFO gShell32DllVersion = { 0 };
// Objective-C/GNUstep references...
static NSString *gUuidString = nil;
@@ -161,6 +162,40 @@
// Register our message window type......
_registerWindowsClass();
+
+#if defined(DEBUG)
+ // Get Shell32 DLL version information...
+ HMODULE hShell32Dll = LoadLibrary(TEXT("Shell32.dll"));
+ if (hShell32Dll == NULL)
+ {
+ NSLog(@"%s:unable to load library Shell32.dll - error: %d",
__PRETTY_FUNCTION__, GetLastError());
+ }
+ else
+ {
+ DLLGETVERSIONPROC procaddr =
(DLLGETVERSIONPROC)GetProcAddress(hShell32Dll, TEXT("DllGetVersion"));
+
+ if (procaddr == NULL)
+ {
+ NSLog(@"%s:Shell32.dll version info function 'DllGetVersion' missing",
__PRETTY_FUNCTION__);
+ }
+ else
+ {
+ // Setup the size parameter for the structure...
+ gShell32DllVersion.cbSize = sizeof(gShell32DllVersion);
+
+ // Get the version information...
+ procaddr(&gShell32DllVersion);
+ NSLog(@"%s:Shell32.dll version info - major: %d minor: %d build: %d
platform %d", __PRETTY_FUNCTION__,
+ gShell32DllVersion.dwMajorVersion,
+ gShell32DllVersion.dwMinorVersion,
+ gShell32DllVersion.dwBuildNumber,
+ gShell32DllVersion.dwPlatformID);
+ }
+#endif
+
+ // cleanup...
+ FreeLibrary(hShell32Dll);
+ }
// Register the windows notify message we want...
gNotifyMsg = RegisterWindowMessage(NOTIFY_MESSAGE_NAME);
@@ -844,6 +879,7 @@
NSLog(@"%s:%d:ID %d", __PRETTY_FUNCTION__, __LINE__, noteinfo->uniqueID);
_setupNotifyData(notifyData);
+ //s_setupNotifyDataTextInfo(notifyData, "", "");
notifyData.uID = _addApplicationIcon(GetCurrentProcessId(), NULL, icon);
// Show the notification.
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs