Translate shared file name path to local path (1)

Hello All,
Thanks for Yours participation.

You help me formulate what I want more accurate:

For example, I have PC on which driver is running(MyPC).
(Driver is not filter driver).
“Driver procedure” receive file path and do some actions
as directed by rules which I specify.

ALL OK.
When “Driver procedure” receive path like:
“\Device\HaddiskVolume1\Temp\ports.txt”
I have no problems, all works ok.

PROBLEM.
I have shared folder(“ShareTemp”) which has
local path: “c:\temp”. When I type in Explorer:
“\MyPC\ShareTemp\ports.txt” -
my procedure don’t work :frowning: because it
receives path like:

“\??\UNC\MyPC\temp\ports.txt”
or
“\Device\LanmanRedirector\MyPC\temp\ports.txt”
or
“\Device\RdpDr;:0\osm\MyPC\ports.txt”

And I don’t know how to transalte this path’s to
path’s like “\Device\Harddisk…”.

In user mode I may tranlsate share path to local path by
2 ways:

  1. NetShareGetInfo from ‘netapi32.dll’.
  2. Procedure proposed by Alex Shvedov(xxxxx@Home).

How can I do this translation in kernel mode?
As I understand, I need filter driver? And
use STATUS_REPARSE/IO_REPARSE (proposed by Tony Maison)?

I will be thanks for ANY given help,
Max.