Loading f-in-box from resource

.NET Edition of the F-IN-BOX
seesharp
Posts: 82
Joined: Mon Oct 30, 2006 1:34 pm

Loading f-in-box from resource

Postby seesharp » Sun Mar 23, 2008 5:05 pm

Hi

we are planning a completely embedded solution where we load every .NET assembly directly from resource to deploy single file applications.
My question is simpe, is it possible to load the non .NET f-in-box .dll from resource as well ?
Otherwise we will have to extract it each time we start the application.

Regards

Alex

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

Re: Loading f-in-box from resource

Postby Softanics » Sun Mar 23, 2008 6:32 pm

Thank you for your question.

seesharp wrote:we are planning a completely embedded solution where we load every .NET assembly directly from resource to deploy single file applications.
My question is simpe, is it possible to load the non .NET f-in-box .dll from resource as well ?
Otherwise we will have to extract it each time we start the application.


Yes, I understand your task. f_in_box.dll is a managed DLL. Unfortunaly, there is no _documented_ way to load such DLLs from resource.
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

seesharp
Posts: 82
Joined: Mon Oct 30, 2006 1:34 pm

Postby seesharp » Sun Mar 23, 2008 7:11 pm

Thanks for the reply

that's not a problem at all - but I thought f-in-box or fin-in-box-lib.dll are non-managed libraries and thus cannot be used like that.

Regards

Alex

seesharp
Posts: 82
Joined: Mon Oct 30, 2006 1:34 pm

Postby seesharp » Tue Mar 25, 2008 9:16 am

Hi again

in the meanwhile I can load every assembly from resource except f_in_box.dll / f_in_box__lib.dll.
The problem seems to be that, when invoking methods on f_in_box__lib.dll it tries to extract f_in_box.dll which doesn't seem possible, if it has been loaded from resource.

As a work-around, I extract f_in_box__lib.dll to the filesystem on start up.
Like this, I can deploy my app as a single file but - unfortunately (at least a little bit) I end with a three file application after running it.

Best regards

Alex

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

Postby Softanics » Tue Mar 25, 2008 10:39 am

seesharp wrote:The problem seems to be that, when invoking methods on f_in_box__lib.dll it tries to extract f_in_box.dll which doesn't seem possible, if it has been loaded from resource.


Yes, because f_in_box__lib.dll needs f_in_box.dll.

f_in_box.dll is a unmanaged DLL, you can't load it from resource.
Best regards, Artem A. Razin,

F-IN-BOX support

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

seesharp
Posts: 82
Joined: Mon Oct 30, 2006 1:34 pm

Postby seesharp » Tue Mar 25, 2008 10:55 am

Thanks for your reply

just out of curiosity, isn't there a call I could 'catch' and serve the f_in_box.dll from a stream just as we do with the Flash.ocx ?
It would be really cool to deploy a 'real' single file application

:D


Regards

Alex

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

Postby Softanics » Tue Mar 25, 2008 11:07 am

seesharp wrote:just out of curiosity, isn't there a call I could 'catch' and serve the f_in_box.dll from a stream just as we do with the Flash.ocx ?
It would be really cool to deploy a 'real' single file application


Yes, it's possible to write code in C# that loads f_in_box.dll from a stream, but it's a hard task :)
Best regards, Artem A. Razin,

F-IN-BOX support

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


Return to “.NET Edition”

Who is online

Users browsing this forum: No registered users and 7 guests

cron