Page 1 of 1

DLL Call Shell32 w/ SHChangeNotify

PostPosted: Sat Apr 27, 2013 9:25 am
by smokinbanger
Iv'e tried using hwp's hpwDllCall plugin to refresh file association icons using SHChangeNotify (http://msdn.microsoft.com/en-us/library/windows/desktop/bb762118(v=vs.85).aspx) in shell32 with:
Code: Select all
hpwDllCall "C:\Windows\System32\shell32.dll" "SHChangeNotify" "SHCNE_ASSOCCHANGED, 0, IntPtr.Zero, IntPtr.Zero" ""
and
Code: Select all
hpwDllCall "C:\Windows\System32\shell32.dll" "SHChangeNotify" "SHCNE_ASSOCCHANGED, 0, 0" ""

Both methods just kill the running pub without refreshing the icons. Does anyone know how to call shell32 properly and/or a vbscript to refresh explorer icons?

Re: DLL Call Shell32 w/ SHChangeNotify

PostPosted: Sat Apr 27, 2013 11:31 am
by dec
Hello,

Just for your information, the npRefreshDesktop action of my npUtil plugin try to doing this. In fact the action use both SHChangeNotify and send the "F5" key to the "Progman" window, trying to inform the system about the file association changes.

Re: DLL Call Shell32 w/ SHChangeNotify

PostPosted: Sat Apr 27, 2013 12:41 pm
by HPW
hpwDllCall was not designed as a generic Dll-call plugin.
Only one sort of Dll with one parameter and one calling convention.
So here it seems not to be the right tool for the job.