problematic declare in 64-bit

Hello,
can anybody help me with this old declare that does not work in 64 bit apps?

f is a folderitem passed to the function.
The debugger throws me of at “>>>>>>here” below.
The commented explanation ''the following line is a trick…" is not mine, but belongs to the original contributor to macoslib

[code] soft declare function PBHGetVolParmsSync lib “Cocoa” (ByRef paramBlock as HIOParam) as int16//it was “Carbon” and “short”

dim paramBlock as HIOParam
paramBlock.ioVRefNum = f.MacVRefNum
//the following line is a trick to work around the inability to assign a pointer to a structure
//to a field of type Ptr.
dim infoBuffer as new MemoryBlock(GetVolParmsInfoBuffer.Size)
paramBlock.ioBuffer = infoBuffer
paramBlock.ioReqCount = infoBuffer.Size

dim OSError as Integer = PBHGetVolParmsSync(paramBlock) >>>>>>here
if OSError <> 0 then
return “”
end if
//etc… [/code]

Commenting the last three lines, the app runs OK
// if OSError <> 0 then
// return “”
// end if

Thanks.

From Apple documentation:

Beside that your structure must be updated for bigger size in 64-bit.

Thank you, Christian.
Using FSGetVolumeParms and GetVolParmsInfoBuffer, and using int32 (or int64) instead of int16, the app now works OK.