How can I support UNC in my file system?

In the first, I can not English well…

I have a file system using sample code base NulMRx.

It can (create, open, read, write, close, delete) other server file, likes excel, workd, ppt, txt…

So I want to suuport UNC in my file system!

But It is a really difficult to implement!! y.y

In the MSDN said to me, using FsRtlRegisterUncProvider() and…

Something modify in (MRxCreateSrvCall, MRxSrvCallWinnerNotify, MRxCreateVNetRoot)…

But I don’t know how can i do…

My OS is WindowsXP SP2.

Reply anything! Thank u for read my write…Sorry again~ I can not English well…:frowning:

Well you use miniredirector model, which does registering to MUP for you, so you must not call FsRtlRegisterUncProvider() and process IOCTL_REDIR_QUERY_PATH/IOCTL_REDIR_QUERY_PATH_EX at all. It should be enough don’t set flag RX_REGISTERMINI_FLAG_DONT_PROVIDE_UNCS in RxRegisterMinirdr(). The flag is not set in NullMrx sample so UNC should work for you. The UNC in this sample is “\nulsvr\share” I don’t know how you did modify sample but it should work.

The other question is proper implementation of Network provider, which is very lightweight in this sample.

-bg

Thank U for ur reply~! :slight_smile:

Sure, NulMRx sample can connect using UNC, but can’t open explorer using UNC.

I want the situation

  1. Start -> Run -> \nulsvr\share\ -> open explorer
  2. Start -> Run -> \nulsvr\share\test.txt -> open notepad

Current situation

  1. Start -> Run -> \nulsvr\share\ -> error message like below

\nulsvr\share\

The filename, directory name, or volume label syntax is incorrect.

Now I connect file system using another program(MFC and np dll) and I don’t use “net use”.

Because user authentication is required using another server.

We have prototype which is also derived from NullMrx and it works fine for your case. Something must be wrong. Try to analyze what’s wrong. Monitor filesystem calls and NP calls and compare it Lanman redirector.

-bg

I don’t know what’s wrong.

I try again unmodified NulMRx sample source code.

But could not get the desired result.

Could you test for me if you have a NulMRx sample code or other sample code!?

Thank you for me by giving us your opinion.

> Now I connect file system using another program(MFC and np dll) and I don’t
use

“net use”.

Is your NP DLL correct?

I remember that, for all apps like MS Office, Explorer etc to work correctly
with the UNC redirector, you need a) correct NP DLL b) correctly set
DeviceObject ->DeviceType, so that GetDriveType will return the correct value
of “network”.

Without these, some UI apps will fail some operations on your filesystem.


Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com