[fpc-pascal] Missing functions in FPCMacOSAll.pas
Tobias Giesen
tobias_subscriber at tgtools.com
Sun Jul 19 15:14:47 CEST 2009
Hello,
frequently I need to use a function that is missing in FPCMacOSAll.pas.
Trying to declare it myself usually results in successful compilation
and linking, but most of the time the functions crash at run time. So
I wonder if these are not implemented or if I declare them wrong.
Today I need the function FSMountServerVolumeSync and I declared it
like this:
function FSMountServerVolumeSync(const url:CFURLRef;
const mountDir:CFURLRef;
const user:CFStringRef;
const password:CFStringRef;
const mountedVolumeRefNum:FSVolumeRefNumPtr):OSStatus;
external name '_FSMountServerVolumeSync';
It compiles and links but it crashes (access violation).
What am I doing wrong? Is this only for Cocoa? How can I make it
available?
Previously, I have been successful with the following function:
function LSOpenItemsWithRole(
const (*var*) inRef: FSRef;
const inItemCount: CFIndex;
const inRole: LSRolesMask;
const inAEParam: UInt32;
const inAppParams: LSApplicationParameters;
const outPSNs: ProcessSerialNumberPtr;
const inMaxPSNCount: CFIndex
): OSStatus;
external name '_LSOpenItemsWithRole';
This function, too, is listed as available in MacOS X but not
available in CarbonLib.
What's the difference between these two functions, I wonder ...
Cheers,
Tobias
More information about the fpc-pascal
mailing list