best way to pass binary data

F-IN-BOX for Delphi / Builder C++ / VCL
jpierce
Posts: 23
Joined: Thu Jan 11, 2007 4:22 pm

best way to pass binary data

Postby jpierce » Thu Aug 23, 2007 5:20 pm

I have an SWF created with Flex 2 embedded in a delphi app. I would like to somehow be able to send a call to the wrapper app and have it return some binary data (not specifically an image or swf, but just some binary chunk).

Is there some way to do this without having to encode it as text and use OnFlashCall? I've tried using the OnLoadExternalResourceEx but am unsure if this is what I would want to do. I'm also unclear on the ActionScript code to write for that. Ideally, the flash app would pass a string to the Delphi wrapper, which would read that string and figure out the binary data to pass back. Ideally, this could be done in a blocking fashion so that the flash code doesn't continue until it received that data (to avoid having to write a lot of UI lockout and polling code).

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Thu Aug 23, 2007 7:18 pm

Thank you for your question.

The only way to communicate in sync (non blocking) mode is external api (flashcall). I think, it's a good way for your task.
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

jpierce
Posts: 23
Joined: Thu Jan 11, 2007 4:22 pm

Postby jpierce » Thu Aug 23, 2007 11:02 pm

I think you may have missed part of my question. Is there any way to pass back binary data from the external api via FlashCall?

Since SetReturnVariable only takes a string, I think I already know that the answer is "you can't."

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Fri Aug 24, 2007 1:01 am

jpierce wrote:I think you may have missed part of my question. Is there any way to pass back binary data from the external api via FlashCall?


Oh, I'm sorry.

jpierce wrote:Since SetReturnVariable only takes a string, I think I already know that the answer is "you can't."


Yes, you should encode binary data into a string, pass it using SetReturnValue, and after that decode passed string (using actionscript) into binary data.
Best regards, Artem A. Razin,

F-IN-BOX support

Ask your question here: http://www.f-in-box.com/support.html

jpierce
Posts: 23
Joined: Thu Jan 11, 2007 4:22 pm

Postby jpierce » Fri Aug 24, 2007 7:02 pm

I think you missed "Is there some way to do this without having to encode it as text and use OnFlashCall?"

:D

I'll stop messing with you now, since I think the basic answer to my question is no.

(BTW, I sent an email asking how to get the upgrade for F-In-Box and have either not gotten a reply or somehow a spam filter caught it. In case it's the former, could you have someone check their emails? I'm getting tired of it saying "Demo Version". Thanks!)

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Fri Aug 24, 2007 7:20 pm

jpierce wrote:BTW, I sent an email asking how to get the upgrade for F-In-Box and have either not gotten a reply or somehow a spam filter caught it. In case it's the former, could you have someone check their emails? I'm getting tired of it saying "Demo Version".


I've answered you... Please download again the full version using the link that you've received when you purchase f-in-box license. It should work fine.

BTW please use our support form: http://f-in-box.com/support.html instead of using usual email.

Thank you!
Best regards, Artem A. Razin,

F-IN-BOX support

Ask your question here: http://www.f-in-box.com/support.html

jpierce
Posts: 23
Joined: Thu Jan 11, 2007 4:22 pm

Postby jpierce » Fri Aug 24, 2007 9:06 pm

Thanks, that worked. I had already tried that before I emailed you. At that time, it downloaded a zip file, but it was empty. It works now, though. Must have been a server problem.


Return to “Delphi / Builder / VCL Edition”

Who is online

Users browsing this forum: No registered users and 11 guests

cron