Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

Embed DLL in EXE product

For general discussion related FlowStone

Embed DLL in EXE product

Postby Rocko » Tue Sep 24, 2019 8:11 pm

Using Flowstone 3.0.8.1 I had built a schematic which loads a DLL file (written in C), from a specific location, and runs it.
The DLL is loaded by RUBY within the schematic, as explained in the user guide.

Within flowstone it runs as expected, but when I export it as EXE, there is no sound and it seems that the DLL is not there. For instance the EXE file has a bypass switch, pressing it does produce sound - but no effect of course.
When exporting I did tick the "embed DLL's from DLL components" option.

Is there something I'm missing ?
Rocko
 
Posts: 184
Joined: Tue May 15, 2012 12:42 pm

Re: Embed DLL in EXE product

Postby trogluddite » Wed Sep 25, 2019 12:51 am

The "embed DLLs" option only works for DLLs loaded by DLL primitives, but not for DLLs loaded into Ruby using Win32API - so exports must have access to the DLL file itself. To further complicate matters, the file for the Win32API Ruby library also needs to accessible, as this isn't embedded either (the file itself is within the 'ruby/libraries/win32/common' subfolder of the FS installation). A little Ruby tinkering with file-paths may be required so that these files can be located, especially if the target PC doesn't have FS installed.

It's also worth noting that the Win32API library does not work at all in VST plugins, so you can't use DLLs via Ruby in VST plugins at all (which I find very annoying!).

The alternative would be to use DLL primitives, which allow complete embedding; however, the binary interface is much more restrictive than for Win32API, which can make it harder to do what you need, and the example API is a rather messy bunch of type-casting compiler macros.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
 
Posts: 1577
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Embed DLL in EXE product

Postby tulamide » Wed Sep 25, 2019 2:59 am

What trog said, plus this quote from the User Guide, page 218:

"Distribution

If you plan to distribute any exported exes or plugins that use an external DLL you must ensure that the DLL is distributed with it. You must also distribute the ruby\libraries\win32 folder that is located in your FlowStone install folder. You need to have a folder called ruby in the same folder as your exported file. Inside this folder should be a libraries folder and inside that you place the win32 folder and all its contents. Without these your export will not function correctly."

Don't ask me why, I don't have photographic memory or something, but I really do remember when I read something. Creepy or not, it helps.
If you feel like gifting: https://paypal.me/tulamide
tulamide
 
Posts: 2333
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Embed DLL in EXE product

Postby Rocko » Wed Sep 25, 2019 1:28 pm

Thanks Trogluddite and Tulamide - appreciated.
I'm looking into this...
Rocko
 
Posts: 184
Joined: Tue May 15, 2012 12:42 pm

Re: Embed DLL in EXE product

Postby wlangfor@uoguelph.ca » Mon Sep 30, 2019 1:59 am

Rocko wrote:Using Flowstone 3.0.8.1 I had built a schematic which loads a DLL file (written in C), from a specific location, and runs it.
The DLL is loaded by RUBY within the schematic, as explained in the user guide.

Within flowstone it runs as expected, but when I export it as EXE, there is no sound and it seems that the DLL is not there. For instance the EXE file has a bypass switch, pressing it does produce sound - but no effect of course.
When exporting I did tick the "embed DLL's from DLL components" option.

Is there something I'm missing ?


Haven't seen you in a while, nice to see you back :)
User avatar
wlangfor@uoguelph.ca
 
Posts: 900
Joined: Tue Apr 03, 2018 5:50 pm
Location: North Bay, Ontario, Canada


Return to General

Who is online

Users browsing this forum: No registered users and 32 guests