reparse directory and files

it’s like hard link on unix

when user see c:\temp\protected. it’s really folder located in d:\relocated.
protected folder on c:\temp\ is just alias or link.
for this, i tried reparse function. but i could not success, yet.

if i click protected folder, 'file or directory is moved… ’ message
displayed
on hookdone function

if (_strnicmp(fullPathName, SECUREFOLDER, strlen(SECUREFOLDER)) == 0)
{
//UNICODE_STRING fullUniName;
ANSI_STRING bar;
char sbuff[512];
char spath[512];
int spathlen;
RtlZeroMemory(sbuff, 512);
RtlZeroMemory(spath, 512);
strcpy(spath, REDIRECTFOLDER); //µð·ºÅ丮¸¦ redirect , by kish 2005.4.8
// RtlStringCbCopyA(spath, 512, REDIRECTFOLDER);
spathlen = strlen(spath);
DbgPrint((“HOOKRoutine: IRP_MJ_CREATE spath-%s,%d, %d\n”, spath,
spathlen, LEN_OF_FOLDER));
// RtlStringCbCatA(spath, 512, fullPathName + LEN_OF_REDIRECTFOLDER);
//RtlCopyBytes(spath + spathlen, fullPathName + LEN_OF_FOLDER, );
strcat(spath, fullPathName + LEN_OF_FOLDER); // ±âÁ¸ µð·ºÅ丮¿¡¼­
µÞºÎºÐÀ» ºÙÀÓ
DbgPrint((“HOOKRoutine: IRP_MJ_CREATE newspath-%s,%d, %d\n”, spath,
spathlen, LEN_OF_FOLDER));

DbgPrint((“HOOKRoutine: IRP_MJ_CREATE fullpath-%s\n”, fullPathName));
DbgPrint((“HOOKRoutine: IRP_MJ_CREATE BEFORE(old-%s,new-%ls)\n”, spath,
FileObject->FileName));

RtlInitAnsiString(&bar, spath);
RtlAnsiStringToUnicodeString(&FileObject->FileName, &bar, FALSE);
DbgPrint((“HOOKRoutine: IRP_MJ_CREATE AFTER(old-%ls,new-%s)\n”,
FileObject->FileName.Buffer, spath));

Irp->IoStatus.Status = STATUS_REPARSE;
Irp->IoStatus.Information = IO_REPARSE;

IoCompleteRequest( Irp, IO_NO_INCREMENT );
return STATUS_REPARSE;
}