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.