Could it be as simple as: asynch_command is an uninitialized variable,
and you passed it to createAVCAsynchronousCommand where a pointer was
expected, so createAVCAsynchronousCommand crashes/hangs/fails when
trying to dereference your pointer?
Maybe Niels or Andy can answer the part about where to get the response.
Eric
On Nov 11, 2005, at 3:23 PM, Tommy Schell wrote:
> Hi,
>
> I'm using the a/vc asynchronous interface, having a little trouble.
>
>
> With the following declarations:
>
> // FIRST, A CALLBACK
> void myCallback( void *pRefCon, IOFireWireAVCLibAsynchronousCommand
> *pCommandObject) {
>
> printf("From my async callback!!\n");
> }
>
> // THEN, IN MAIN().....
>
> void *pRef;
> IOFireWireAVCLibAsynchronousCommand **async_command;
> UInt8 command[20];
> UInt32 cmdLen = 0;
> .......
>
> ....... // GET INTERFACE, ETC
> // SET UP COMMAND BUFFER
>
> // open the AVC unit interface
> result = (*avcUnit)->open( avcUnit );
>
> // HERE, IT CHOKES
> result = (*avcUnit)->createAVCAsynchronousCommand( avcUnit, command,
> cmdLen, (IOFireWireAVCLibAsynchronousCommandCallback) &myCallback,
> pRef, async_command);
>
> if( kIOReturnSuccess == result )
> result =
> (*avcUnit)->AVCAsynchronousCommandSubmit( avcUnit, *async_command);
>
> result = (*avcUnit)->AVCAsynchronousCommandRelease (
> avcUnit, *async_command);
>
>
>
> If, after opening the avcUnit, I use the AVCCommand() call instead,
> everything's fine.
> But when I try the async calls, it chokes on the 1st one.
> The most likely candidates for trouble in the argument list of the
> createAVCAsynchronousCommand call, I suppose, are the 4th and 5th
> args.
> Especially the 5th call: do I need to be passing in something besides
> a null pointer as void* pRefCon?
> I tried passing a pointer to a UInt32, but that didn't help.
>
> Also, how does one get access to the response of the command? There's
> nowhere to pass a response pointer, as there is in the AVCCommand()
> call.
>
> Thanks,
> Tommy Schell
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Firewire mailing list (
Firewire@list...)
> Help/Unsubscribe/Update your Subscription:
>
http://lists.apple.com/mailman/options/firewire/ewa%40apple.com
>
> This email sent to
ewa@appl...
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Firewire mailing list (
Firewire@list...)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/firewire/subscriber%40opensubscriber.com
This email sent to
subscriber@open...
opensubscriber is not affiliated with the authors of this message nor responsible for its content.