EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Network Mounting Points vs. Old Style Mounting Points

Posted: 03/02/2009 17:34:37
by Sid Schipper (Standard support level)
Joined: 03/14/2008
Posts: 285

I found something today that was puzzling. With the old build, even though there were other problems, I could see the network share on other machines and when I did the "Net share" command from a command prompt. With the new build, that is no longer true. I can see the disk as the S: drive on the machine where I mount it, but I cannot see it as the \\P125252\Srb_T share from other machines on the network. That is a change for the worse, I think. Do you have any idea as to why this would happen?
Posted: 03/03/2009 02:09:08
by Volodymyr Zinin (Team)

This is correct behavior. Shares created by means of AddNetworkMountingPoint are only visible on local machine. I.e. it isn't possible to use them for sharing over a network.
For the last case you can use any other type of network redirectors available on the system - Microsoft Networks (that is used SMB protocol for communications), WebDav, AppleTalk, etc.
For example using Microsoft Networks you can do the following:
#define MOUNT_POINT_NAME L"qwerty"
#define SHARE_NAME L"share"

SHARE_INFO_2 ShareInfo;

// Create an "unvisible" mounting point


// Create a share of the Microsoft Networks type
// that will be associated with the mounting point
// created above.

ZeroMemory(&ShareInfo, sizeof(ShareInfo));

ShareInfo.shi2_netname = SHARE_NAME;
ShareInfo.shi2_type = 0;//0x40000000;//STYPE_TEMPORARY
ShareInfo.shi2_remark = L"Some comment";
ShareInfo.shi2_permissions = ACCESS_ALL;
ShareInfo.shi2_max_uses = -1;
//ShareInfo.shi2_current_uses = 0;
ShareInfo.shi2_path = L"\\\\.\\" MOUNT_POINT_NAME L"\\";
ShareInfo.shi2_passwd = NULL;

Status = NetShareAdd( NULL,
                      &ErrIndex );

// Optionally we can assign a drive letter to the share

Error = WNetAddConnection( L"\\\\\\" SHARE_NAME,
                           L"T:" );

Posted: 03/03/2009 03:17:47
by Volodymyr Zinin (Team)

We have decided to add such functionality to CallbackFS. It is going to be done in a short time.
Posted: 03/03/2009 09:59:46
by Sid Schipper (Standard support level)
Joined: 03/14/2008
Posts: 285

I already have this functionality in my application.

The following is a quote from your documentation of the AddNetworkMountingPoint API

One more reason to create a network mounting point is to expose the mounting point as a network share which can be used by other computers.

I don't see how this documantation agrees with your statement above that what I saw was correct behavior.
Posted: 03/03/2009 22:58:19
by Eugene Mayevski (Team)

Is this a question?

Remember that you are talking about pre-release version.

Sincerely yours
Eugene Mayevski
Posted: 03/04/2009 11:13:03
by Sid Schipper (Standard support level)
Joined: 03/14/2008
Posts: 285

Yes it is a question. Are network mounting points exposed to other computers as your documentation says they are, or are they not, as your pre-release version implements them?
Posted: 03/04/2009 12:20:17
by Eugene Mayevski (Team)

In release version the API will use the code that Vladimir posted to create a network share if you tell it to do this by setting the corresponding (to be added) flag in a call to AddNetworkMountingPoint. The mounting points, created by AddNetworkMountingPoint are not automatically visible across network now or in future without the mentioned flag. Does this answer your question?

Sincerely yours
Eugene Mayevski
Posted: 03/04/2009 12:28:03
by Sid Schipper (Standard support level)
Joined: 03/14/2008
Posts: 285

That is sort of an answer.

In Vladimir's posted code he uses the old API AddMountingPoint and then uses the Windows Networking API NetShareAdd to add the network share. My code already does this for standard mounting points.

I was wondering if the new API AddNetworkMountingPoint would do something similar and what it seems like you are saying is that you are going to add a parameter to that call which will make it work like Vladimir's posted code. Does that mean that internally AddNetworkMountingPoint, called with this new parameter to share the drive, will revert back to an old style AddMountingPoint with the added call to NetShareAdd?

Because, if that is the case, then what is the advantage of using this new API over the old one?
Posted: 03/04/2009 12:36:37
by Sid Schipper (Standard support level)
Joined: 03/14/2008
Posts: 285

BTW, if Vladimir really intended in his posted code to use the new call to AddNetworkMountingPoint, then he may find that his code doesn't work. I tried that and I got error 2117 back from the NetShareAdd call, which means "The operation is invalid on a redirected resource.".
Posted: 03/04/2009 13:08:54
by Eugene Mayevski (Team)

There's no such thing as "old style" for AddNetworkMountingPoint. Callback File System 2.5 driver includes a whole new subsystem, network redirector. This required changes in the parameters of AddNetworkMountingPoint() method. Vladimir has posted his old code, right. When he adds this code to AddNetworkMountingPoint, possible problems will be exposed and solved. Then you won't need this code at all.

Sincerely yours
Eugene Mayevski



Topic viewed 40009 times

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


Back to top

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

Got it!