PC Review


Reply
Thread Tools Rate Thread

Create/show reparse point (junction)

 
 
=?Utf-8?B?TWF0aGlhcyBFcmxhbmRzc29u?=
Guest
Posts: n/a
 
      19th May 2004
Hi

Does anybody know how to create and show a reparse point in c#? I'm able to determine if a folder is a reparse point or not by looking at the file attributes, but how do I get the reparse info

/Mathias
 
Reply With Quote
 
 
 
 
Francois Beaussier
Guest
Posts: n/a
 
      21st May 2004
"Mathias Erlandsson" wrote :
> Hi!
>
> Does anybody know how to create and show a reparse point in c#? I'm able

to determine if a folder is a reparse point or not by looking at the file
attributes, but how do I get the reparse info?

Hello,

you should use the DeviceIoControl function (using interop)

[DllImport("kernel32.dll")]
public static extern bool DeviceIoControl(IntPtr hDevice, uint
dwIoControlCode, byte [] lpInBuffer, uint nInBufferSize, [Out] byte []
lpOutBuffer, uint nOutBufferSize, IntPtr lpBytesReturned, IntPtr
lpOverlapped);

http://msdn.microsoft.com/library/de...eiocontrol.asp

--
Francois Beaussier
(E-Mail Removed)ve


 
Reply With Quote
 
=?Utf-8?B?TWF0aGlhcyBFcmxhbmRzc29u?=
Guest
Posts: n/a
 
      21st May 2004
Thanks for your reply

I have been looking at this solution, bu I havn't gotten it to work. My problem was that it needed a struct which I wasn't able to convert to c#. Do you know how to do it

/Mathia

----- Francois Beaussier wrote: ----

"Mathias Erlandsson" wrote
> Hi
>> Does anybody know how to create and show a reparse point in c#? I'm abl

to determine if a folder is a reparse point or not by looking at the fil
attributes, but how do I get the reparse info

Hello

you should use the DeviceIoControl function (using interop

[DllImport("kernel32.dll")
public static extern bool DeviceIoControl(IntPtr hDevice, uin
dwIoControlCode, byte [] lpInBuffer, uint nInBufferSize, [Out] byte [
lpOutBuffer, uint nOutBufferSize, IntPtr lpBytesReturned, IntPt
lpOverlapped)

http://msdn.microsoft.com/library/de...ceiocontrol.as

--
Francois Beaussie
(E-Mail Removed)v



 
Reply With Quote
 
Francois Beaussier
Guest
Posts: n/a
 
      23rd May 2004
"Mathias Erlandsson" wrote :

> I have been looking at this solution, bu I havn't gotten it to work. My

problem was that it needed a struct which I wasn't able to convert to c#. Do
you know how to do it?

Hello,

I'd try the following :

public struct OVERLAPPED
{
IntPtr Internal;
IntPtr InternalHigh;
int Offset;
int OffsetHigh;
IntPtr hEvent;
};

with

[DllImport("kernel32.dll")]
public static extern bool DeviceIoControl(IntPtr hDevice, uint
dwIoControlCode,
byte [] lpInBuffer, uint nInBufferSize, [Out] byte [] lpOutBuffer,
uint nOutBufferSize, IntPtr lpBytesReturned, ref OVERLAPPED lpOverlapped);

--
Francois Beaussier
(E-Mail Removed)ve


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a reparse point post setup NZSchoolTech Windows XP Setup 0 17th Sep 2007 06:32 AM
ximage error "the data present in the reparse point buffer is inva =?Utf-8?B?R2VvcmdlIEt1YmlueWk=?= Windows XP Setup 0 2nd May 2006 06:41 PM
DFS or Junction Point =?Utf-8?B?am1vcw==?= Microsoft Windows 2000 File System 1 11th Oct 2005 11:17 PM
Re: Unable to create junction point Mukul Gupta [MSFT] Microsoft Windows 2000 File System 1 9th Oct 2003 01:43 AM
Re: Unable to create junction point Brian [MSFT] Microsoft Windows 2000 File System 0 30th Sep 2003 09:02 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:25 PM.