[fpc-pascal] Mac OSX API call

Jonas Maebe jonas.maebe at elis.ugent.be
Sat Aug 30 10:49:08 CEST 2008


On 29 Aug 2008, at 20:34, Jonas Maebe wrote:

>
> On 29 Aug 2008, at 11:58, EarMaster - Bent Olsen wrote:
>
>>> From: fpc-pascal-bounces at lists.freepascal.org [mailto:fpc-pascal-
>>> bounces at lists.freepascal.org] On Behalf Of Vincent Snijders
>>> Sent: 29. august 2008 12:27
>>> To: FPC-Pascal users discussions
>>> Subject: Re: [fpc-pascal] Mac OSX API call
>>>
>>> I think it should be (no var for the pointer):
>>
>> I tried, and same result.
>>
>> Could a Mac OSX API call return -50 even though the types are  
>> correct, but
>> the contents of them are not what it expected?
>>
>> I would assume -50 is only after a check for types in the parameter  
>> list,
>> and check is done before even calling the API.
>
> External functions have no idea what the declaration of the function  
> in your source code is. A couple of the parameters your are passing  
> (inAudioFile a outPacketDescriptions) however are pointers to opaque  
> structures, and the called function is probably performing some  
> sanity checks on those structures to ensure that they are valid.

Or alternatively, one of the other parameters could be invalid as well  
(either on their own or in combination with the other parame



More information about the fpc-pascal mailing list