FSCTL_SET_REPARSE_POINT fails with invalid data in buffer

I am writing a symbolic link filter/program and my utility to create the

symbolic links fails when creating the reparse point with the following

error:

The data present in the reparse point buffer is invalid.

Here is the code:

ZeroMemory(pReparseDataBuffer, sizeof(REPARSE_GUID_DATA_BUFFER));

pReparseDataBuffer->ReparseTag = IO_REPARSE_TAG_FSO;

pReparseDataBuffer->ReparseDataLength = sizeof(FsoData);

pReparseDataBuffer->Reserved = 0;

pReparseDataBuffer->ReparseGuid = guid;

ZeroMemory(pFsoData, sizeof(FsoData));

pFsoData->uiType = uiType;

wcsncpy(pFsoData->wcsTarget, wcsTarget, MAX_TGT_LEN);

bIoCtlStatus = DeviceIoControl(

(HANDLE) hFile,

FSCTL_SET_REPARSE_POINT,

(LPVOID) pReparseDataBuffer,

(DWORD) sizeof(Data),

NULL,

0,

(LPDWORD) &dwBytesReturned,

(LPOVERLAPPED) NULL);

I am missing something? Do I have to signal on the filter that I want to

allow the creation of the reparse point? How?

Thanks for you answers,

Andrej