EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Sample code for setting custom icons

Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.
#14926
Posted: 11/03/2010 07:56:37
by Christian Schnidrig (Standard support level)
Joined: 10/25/2010
Posts: 44

Code

[2460] CbFsMntNtf!RegisterStorageIconOverlay:  RegOverlays.Open(HKEY_LOCAL_MACHINE, ICON_OVERLAYS, SamDesired) != ERROR_SUCCESS
[2460]     ErrorCode(0)
[2460]
[2460] NPGetCaps 2
[2460]   WNNC_NET_TYPE
[2460] NPGetCaps 4
[2460]   WNNC_USER
[2460] NPGetCaps 6
[2460]   WNC_CONNECTION
[2460] NPGetCaps 11
[2460]   WNNC_ENUMERATION
[2460] NPGetCaps 9
[2460]   WNNC_ADMIN
[2460] NPGetCaps 8
[2460]   WNNC_DIALOG
[2460] NPOpenEnum
[2460] querying device name A:
[2460] device name is \Device\Floppy0
[2460] querying device name C:
[2460] device name is \Device\HarddiskVolume3
[2460] querying device name D:
[2460] device name is \Device\CdRom0
[2460] querying device name W:
[2460] device name is \Device\CbFs3Nr\;W:;0;00000000000102cf;WINDOOF;Wuala
[2460] NpEnumResource
[2460] NpCloseEnum
[2768] CbFsMntNtf!RegisterStorageIconOverlay:  RegOverlays.Open(HKEY_LOCAL_MACHINE, ICON_OVERLAYS, SamDesired) != ERROR_SUCCESS
[2768]     ErrorCode(0)
[2768]
[2768] NPGetCaps 2
[2768]   WNNC_NET_TYPE
[2768] NPGetCaps 4
[2768]   WNNC_USER
[2768] NPGetCaps 6
[2768]   WNC_CONNECTION
[2768] NPGetCaps 11
[2768]   WNNC_ENUMERATION
[2768] NPGetCaps 9
[2768]   WNNC_ADMIN
[2768] NPGetCaps 8
[2768]   WNNC_DIALOG
[2768] NPOpenEnum
[2768] querying device name A:
[2768] device name is \Device\Floppy0
[2768] querying device name C:
[2768] device name is \Device\HarddiskVolume3
[2768] querying device name D:
[2768] device name is \Device\CdRom0
[2768] querying device name W:
[2768] device name is \Device\CbFs3Nr\;W:;0;00000000000102cf;WINDOOF;Wuala
[2768] NpEnumResource
[2768] NpCloseEnum
#14927
Posted: 11/03/2010 08:29:48
by Vladimir Cherniga (EldoS Corp.)

Ok, could you redo the test with attached version. I have not properly initialized ErrorCode value by mistake. Thank you in advance.


[ Download ]
#14931
Posted: 11/03/2010 09:36:39
by Christian Schnidrig (Standard support level)
Joined: 10/25/2010
Posts: 44

Code
[3888] CbFsMntNtf!RegisterStorageIconOverlay:  RegOverlays.Open(HKEY_LOCAL_MACHINE, ICON_OVERLAYS, SamDesired) != ERROR_SUCCESS
[3888]     ErrorCode(0)
[3888]
[3888] NPGetCaps 2
[3888]   WNNC_NET_TYPE
[3888] NPGetCaps 4
[3888]   WNNC_USER
[3888] NPGetCaps 6
[3888]   WNC_CONNECTION
[3888] NPGetCaps 11
[3888]   WNNC_ENUMERATION
[3888] NPGetCaps 9
[3888]   WNNC_ADMIN
[3888] NPGetCaps 8
[3888]   WNNC_DIALOG
[3888] NPOpenEnum
[3888] querying device name A:
[3888] device name is \Device\Floppy0
[3888] querying device name C:
[3888] device name is \Device\HarddiskVolume3
[3888] querying device name D:
[3888] device name is \Device\CdRom0
[3888] querying device name W:
[3888] device name is \Device\CbFs3Nr\;W:;0;00000000000102cf;WINDOOF;Wuala
[3888] NpEnumResource
[3888] NpCloseEnum
[2484] CbFsMntNtf!RegisterStorageIconOverlay:  RegOverlays.Open(HKEY_LOCAL_MACHINE, ICON_OVERLAYS, SamDesired) != ERROR_SUCCESS
[2484]     ErrorCode(0)
[2484]
[2484] NPGetCaps 2
[2484]   WNNC_NET_TYPE
[2484] NPGetCaps 4
[2484]   WNNC_USER
[2484] NPGetCaps 6
[2484]   WNC_CONNECTION
[2484] NPGetCaps 11
[2484]   WNNC_ENUMERATION
[2484] NPGetCaps 9
[2484]   WNNC_ADMIN
[2484] NPGetCaps 8
[2484]   WNNC_DIALOG
[2484] NPOpenEnum
[2484] querying device name A:
[2484] device name is \Device\Floppy0
[2484] querying device name C:
[2484] device name is \Device\HarddiskVolume3
[2484] querying device name D:
[2484] device name is \Device\CdRom0
[2484] querying device name W:
[2484] device name is \Device\CbFs3Nr\;W:;0;00000000000102cf;WINDOOF;Wuala
[2484] NpEnumResource
[2484] NpCloseEnum
#14932
Posted: 11/03/2010 09:47:35
by Vladimir Cherniga (EldoS Corp.)

Ok, this is not my day, please use the attached version, last try.


[ Download ]
#14935
Posted: 11/03/2010 10:49:19
by Christian Schnidrig (Standard support level)
Joined: 10/25/2010
Posts: 44

Code
[3680] CbFsMntNtf!RegisterStorageIconOverlay:  RegOverlays.Open(HKEY_LOCAL_MACHINE, ICON_OVERLAYS, SamDesired) != ERROR_SUCCESS
[3680]     ErrorCode(5)
[3680]
[3680] NPGetCaps 2
[3680]   WNNC_NET_TYPE
[3680] NPGetCaps 4
[3680]   WNNC_USER
[3680] NPGetCaps 6
[3680]   WNC_CONNECTION
[3680] NPGetCaps 11
[3680]   WNNC_ENUMERATION
[3680] NPGetCaps 9
[3680]   WNNC_ADMIN
[3680] NPGetCaps 8
[3680]   WNNC_DIALOG
[3680] NPOpenEnum
[3680] querying device name A:
[3680] device name is \Device\Floppy0
[3680] querying device name C:
[3680] device name is \Device\HarddiskVolume3
[3680] querying device name D:
[3680] device name is \Device\CdRom0
[3680] querying device name W:
[3680] device name is \Device\CbFs3Nr\;W:;0;00000000000102cf;WINDOOF;Wuala
[3680] NpEnumResource
[3680] NpCloseEnum
[2512] CbFsMntNtf!RegisterStorageIconOverlay:  RegOverlays.Open(HKEY_LOCAL_MACHINE, ICON_OVERLAYS, SamDesired) != ERROR_SUCCESS
[2512]     ErrorCode(5)
[2512]
[2512] NPGetCaps 2
[2512]   WNNC_NET_TYPE
[2512] NPGetCaps 4
[2512]   WNNC_USER
[2512] NPGetCaps 6
[2512]   WNC_CONNECTION
[2512] NPGetCaps 11
[2512]   WNNC_ENUMERATION
[2512] NPGetCaps 9
[2512]   WNNC_ADMIN
[2512] NPGetCaps 8
[2512]   WNNC_DIALOG
[2512] NPOpenEnum
[2512] querying device name A:
[2512] device name is \Device\Floppy0
[2512] querying device name C:
[2512] device name is \Device\HarddiskVolume3
[2512] querying device name D:
[2512] device name is \Device\CdRom0
[2512] querying device name W:
[2512] device name is \Device\CbFs3Nr\;W:;0;00000000000102cf;WINDOOF;Wuala
[2512] NpEnumResource
[2512] NpCloseEnum
#14953
Posted: 11/04/2010 06:05:47
by Vladimir Cherniga (EldoS Corp.)

Try with attached version:
- uninstall icons;
- replace CbFSMntNtf3.dll with new one;
- install icons;
- reboot;
- set icon;


[ Download ]
#14956
Posted: 11/04/2010 09:59:22
by Christian Schnidrig (Standard support level)
Joined: 10/25/2010
Posts: 44

Does not work:

Code
[HKEY_LOCAL_MACHINE\SOFTWARE\VsMntNtf]

[HKEY_LOCAL_MACHINE\SOFTWARE\VsMntNtf\DriveIconMappings]

[HKEY_LOCAL_MACHINE\SOFTWARE\VsMntNtf\DriveIconMappings\0]
"CLSID"="{4EDA30AB-F80E-4AC5-BAFB-503B869E460B}"
"IconPath"="C:\\Users\\christian\\workspace\\CBFS\\installer\\icon.ico"
"TmpIconPath"="C:\\Users\\CHRIST~1\\AppData\\Local\\Temp\\icoE967.tmp"
"IconId"="wuala"
"IconIndex"=dword:00000000
"StorageType"=dword:00000006



[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\EldosIconOverlay]
@="{5BB532A2-BF14-4CCC-86B7-71B81EF6F8BC}"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\EnhancedStorageShell]
@="{D9144DCD-E998-4ECA-AB6A-DCD83CCBA16D}"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\SharingPrivate]
@="{08244EE6-92F0-47f2-9FC9-929BAA2E7235}"


No key in HKEY_CLASSES_ROOT\CLSID
#14958
Posted: 11/04/2010 11:24:48
by Vladimir Cherniga (EldoS Corp.)

Did you install icons with admin privileges ? What does DebugView report ? Also make sure that CbFSMntNtf3.dll not placed in your working directory.
#14965
Posted: 11/05/2010 04:34:29
by Christian Schnidrig (Standard support level)
Joined: 10/25/2010
Posts: 44

Yes, I had admin privileges.
CbFsMntNtf3.dll is not in the working directory.

Code
[460] NpCloseEnum
[936] NPGetCaps 2
[936]   WNNC_NET_TYPE
[936] NPGetCaps 4
[936]   WNNC_USER
[936] NPGetCaps 6
[936]   WNC_CONNECTION
[936] NPGetCaps 11
[936]   WNNC_ENUMERATION
[936] NPGetCaps 9
[936]   WNNC_ADMIN
[936] NPGetCaps 8
[936]   WNNC_DIALOG
[936] NPOpenEnum
[936] querying device name A:
[936] device name is \Device\Floppy0
[936] querying device name C:
[936] device name is \Device\HarddiskVolume3
[936] querying device name D:
[936] device name is \Device\CdRom0
[936] querying device name W:
[936] device name is \Device\CbFs3Nr\;W:;0;000000000001060d;WINDOOF;Wuala
[936] NpEnumResource
[936] NpCloseEnum
#14970
Posted: 11/05/2010 07:15:32
by Vladimir Cherniga (EldoS Corp.)

I mean - did you started you app through the menu - run as administrator, and then invoke installicon() ?
Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages

Reply

Statistics

Topic viewed 78887 times

Number of guests: 2, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!