EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Sample code for setting custom icons

Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.
#14129
Posted: 08/06/2010 16:52:07
by Mridul Pentapalli (Standard support level)
Joined: 11/30/2009
Posts: 26

Hi,

I have not got SetIcon to work correctly in the sample VMounter code. The icon shown in Windows Explorer is always the default.

Can you please post some sample code to create a storage with a custom icon?

Regards,
Mridul.
#14131
Posted: 08/07/2010 01:55:52
by Eugene Mayevski (EldoS Corp.)

You must install the icon before setting it using InstallIcon.

Also lease assign the license ticket to your user account before we continue. The ticket itself and the procedure of it's use are specified in the registration e-mail that was sent to you upon license purchase.


Sincerely yours
Eugene Mayevski
#14140
Posted: 08/09/2010 10:52:33
by Mridul Pentapalli (Standard support level)
Joined: 11/30/2009
Posts: 26

Hi,

In the vMounter sample C# application, I have successfully installed an icon with

CallbackFileSystem.InstallIcon("C:\\Program Files (x86)\\EldoS\\Callback File System\\Samples\\dotNET\\C#\\VMounter\\Home.ico", "Home", ref reboot);

After rebooting, I have done the following:

CallbackFileSystem.SetRegistrationKey(sRegKey);
mCbFs.CreateStorage();
mCbFs.SetIcon("Home");
mCbFs.MountMedia(5000);
mCbFs.SetIcon("Home");
mCbFs.AddMountingPoint(edtMountinPoint.Text);
mCbFs.SetIcon("Home");

I am not able to get the custom icon for the drive at all. I created a test icon with all possible combinations of Image Types (16*16, 1bit all the way to 256*256, 24bit).

My boss is out on leave & he has the registration details. I will try to get the license ticket attached to my account in the afternoon (US Central time).

Regards,
Mridul.
#14141
Posted: 08/09/2010 12:07:00
by Vladimir Cherniga (EldoS Corp.)

Hi,
does CbFsMntNtf3.dll helper dll installed too ? Check with process explorer utility (Ctrl+F from the app view) that dll is loaded into the explorer.exe process.
#14142
Posted: 08/09/2010 12:42:56
by Mridul Pentapalli (Standard support level)
Joined: 11/30/2009
Posts: 26

CbfsMntNtf3.dll is installed using

CallbackFileSystem.Install(dlgOpenDrv.FileName, mGuid, true, CallbackFileSystem.CBFS_MODULE_DRIVER | CallbackFileSystem.CBFS_MODULE_MOUNT_NOTIFIER_DLL |
CallbackFileSystem.CBFS_MODULE_NET_REDIRECTOR_DLL, ref Reboot);

I see that the DLL is loaded in explorer using Process Explorer.

Regards,
Mridul.


#14165
Posted: 08/11/2010 08:49:19
by Vladimir Cherniga (EldoS Corp.)

Please post here registry settings from HKLM\Software\VsMntNtf path and from
SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers
#14166
Posted: 08/11/2010 10:13:57
by Mridul Pentapalli (Standard support level)
Joined: 11/30/2009
Posts: 26

Hi,

I figured out the issue thanks to your registry settings notes.

1. The path to the temporary icon was incorrect. It was mapping to a different TEMP folder. I changed it to the correct temp folder & checked that the icoXXXX.tmp files exist. I suspect that it's specific to my machine, but I will let you know if I see it happen on other systems.

2. The key HKLM\Software\VsMntNtf\DriveIconMappings had a permission of Read Control for Users, and explorer (or CbfsMntNtf3.dll) was trying to open the key with read/write permissions and that failed with ACCESS DENIED. Once I manually added Full Control for Users to that registry key, everything worked fine.

Will you be fixing this issue in the next release? Also, do you have an ETA for the next pre-release?

Regards,
Mridul.
#14167
Posted: 08/11/2010 11:28:27
by Vladimir Cherniga (EldoS Corp.)

Hi,
1. Please specify the TEMP path where the icoXXX.tmp was placed and the temp path from registry.

2. Could you specify in more detail, when the HKLM\Software\VsMntNtf\DriveIconMappings was falied to access, during installation of icon or at the other moments ?
Thanks.
#14172
Posted: 08/11/2010 15:28:49
by Mridul Pentapalli (Standard support level)
Joined: 11/30/2009
Posts: 26

1. The icoXXXX.tmp files were in C:\Users\mridulp.MEDIAFOUR\AppData\Local\Temp, but the registry path was C:\Users\mridul~1~MED\AppData\Local\Temp. This was because the TEMP environment variable on my system was messed up.

2. The ACCESS_DENIED for the registry key happened after opening Explorer. Steps to repro:

a. Modify the sample application to Install an icon during InstallDrivers callback.
b. Modify the sample application to call SetIcon on MountMedia().
c. Run the application & install the drivers. Verify that the icon is installed too.
d. Reboot if required.
e. Run the application & Create storage, Mount Media and add mounting point.
f. Kill explorer. Run ProcMon and include Explorer.exe.
g. Start explorer and search ProcMon log for DriveIconMappings. It shows ACCESS_DENIED.

Hope this helps.

Regards,
Mridul.
#14176
Posted: 08/13/2010 06:25:21
by Vladimir Cherniga (EldoS Corp.)

Could you recheck the issue with access restrictions using attached dll(zipped). You may replace the installed dll with a new one. Simply rename the installed dll and copy the new one to the target directory, then reboot the computer.


[ Download ]
Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.

Reply

Statistics

Topic viewed 78898 times

Number of guests: 1, 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!