JumpyNET
Well-known member
- Joined
- Apr 4, 2005
- Messages
- 151
My old VB6 code for changing icons does not seem to work with out modifications. Now Im stuck with the SHChangeNotify. Does any one know how to get this API work in VB 2005 Express?
Oh and heres the error Im getting:
A call to PInvoke function JaMP!JaMP.FormAssociations::SHChangeNotify has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.
Code:
Declarations
Private Declare Function SHChangeNotify Lib "Shell32.dll" (ByVal wEventID As Long, ByVal uFlags As Long, ByVal dwItem1 As Long, ByVal dwItem2 As Long) As Long
Private Declare Sub SHChangeNotify Lib "shell32.dll" (ByVal wEventId As Long, ByVal uFlags As Long, ByVal dwItem1 As Object, ByVal dwItem2 As Object)
Const SHCNE_ASSOCCHANGED = &H8000000
Const SHCNF_IDLIST = &H0
In a sub
Notify shell icon has changed
SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, vbNullString, vbNullString)
Oh and heres the error Im getting:
A call to PInvoke function JaMP!JaMP.FormAssociations::SHChangeNotify has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.
Last edited by a moderator: