Tobias Giesen wrote:
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?
I think you foget to use correct calling conventon modifier. As I know
you should use 'mwpascal' modifier.
Best regards,
Paul Ishenin.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal