tablacus / TablacusScriptControl

Script Control for 64-bit platforms
https://tablacus.github.io/scriptcontrol_en.html
MIT License
62 stars 17 forks source link

Visual Studio won't accept TablacusScriptControl as valid control #1

Open lucvdv opened 7 years ago

lucvdv commented 7 years ago

The control works perfectly as far as I can tell, so in my opinion this is really a Visual Studio issue, but when I tried to get help in MS' MSDN forums, a moderator moved my question to the "off topic" garbage forum because a third party control is involved -- so I'm forced to come for help here.

As I said, the control works perfectly, also with applications compiled in Visual Studio, as long as those are targeted "Any CPU". When you start such an application on a 32 bit system it will run in 32 bit mode and use MSScript.ocx, when you start it on a 64 bit system it will run in 64 bit mode and use Tablacus. No source change necessary, couldn't be better.

But

Can anyone suggest a solution, or even something that just might lead in the right direction?

I have already tried manually editing the solution file with conditional ItemGroups, including only the MS version of the control in non-x64 projects and only the Tablacus version in x64 projects, but that seems to lead to nothing.

lucvdv commented 7 years ago

PS: I need to be able compile for x64 platform because of other platform-dependent elements (#if PLATFORM_X64). Having it working on target AnyCPU is not enough in this case.

lucvdv commented 7 years ago

I'm still trying to figure out what's making it fail. The x86 OLE/COM object viewer in the Windows SDK shows the 32 bit version of the control. The x64 version of the viewer doesn't show any ScriptControl object at all, yet it is registered. Is that because there's no type library information in the DLL?

tablacus commented 7 years ago

I think so. tsc64.dll does not have a type library. I will try to research about a type library. Thank you,

tablacus commented 7 years ago

I've adjusted tsc64.dll 1.0.1.0. Please try this one. Best regards,