overdrivenpotato / rust-vst2

VST 2.4 API implementation in rust. Create plugins or hosts.
MIT License
221 stars 23 forks source link

Version 2.x without VSTPluginMain #21

Closed therustmonk closed 7 years ago

therustmonk commented 7 years ago

I tried to create host, but it can't open external VST plugin. Host fails with:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: NotAPlugin', C:\bot\slave\nightly-dist-rustc-win-gnu-64\build\src\libcore\result.rs:837

because it can't find VSTPluginMain.

Actually method doesn't exist:

:\Program Files\VSTPlugins\SONiVOX>dumpbin /EXPORTS "OrchestralCompanionStrings_x64.dll"
Microsoft (R) COFF/PE Dumper Version 14.00.24215.1
Copyright (C) Microsoft Corporation.  All rights reserved.

Dump of file OrchestralCompanionStrings_x64.dll

File Type: DLL

  Section contains the following exports for VSTGUI36_XC5.dll

    00000000 characteristics
    55E62579 time date stamp Wed Sep  2 01:23:53 2015
        0.00 version
           1 ordinal base
           8 number of functions
           8 number of names

    ordinal hint RVA      name

          1    0 0002AAA0 ACFCanUnloadNow
          2    1 0002AAC0 ACFGetClassFactory
          3    2 0002AAE0 ACFGetSDKVersion
          4    3 0002AB00 ACFRegisterComponent
          5    4 0002AB20 ACFRegisterPlugin
          6    5 0002AB40 ACFShutdown
          7    6 0002AB60 ACFStartup
          8    7 001338D0 main

  Summary

       40000 .data
       15000 .pdata
       7A000 .rdata
        5000 .reloc
      17A000 .rsrc
      1AA000 .text
        4000 _RDATA

This plugin looks like VST 3.x (RegisterComponent, VSTGUI36_XC5.dll dependency). But other software shows me that plugin is VST 2.x. Why? Is it possible to open it?

overdrivenpotato commented 7 years ago

This library will only work with VST2.4 plugins. The VST2.4 SDK defines VSTPluginMain as the entry point, so it's possible that the plugin you're loading is in some other format.

therustmonk commented 7 years ago

I thought there was any workaround ) Thanks!