Thread: VSTA problem...
View Single Post
Old 18-03-2013, 15:36
FaneDuru FaneDuru is offline
Join Date: May 2012
Posts: 35
Angry VSTA problem...

I try to make a VSTA addin and I face some problems…
I use Corel X5 (VSTA 2.0, Microsoft .NET Framework V 3.5 SP1) in Windows 7 (64-bit SP1).
I did not find any documentation and based on what I could understand from other threads on this forum I tried the next:
I opened a new project in VSTA editor I created a window form and a class with a function to show the form.
I create a button on the StartUp event and a new module in the GlobalMacros with a sub procedure allocated to created button.
My intention was to call the function in the addin class (to show the form) adding a reference to addin. Locating the addin in Corel StartUp path I hopped to automatically load the addin and be able to show the form pressing the created button…
But even if I put it in C:\Users\Me\Documents\Corel\VSTA\CorelDRAW\Addins the addin is not loaded by Corel.
I tried to register it and received the message "The module was loaded but the Entry-point DllREgisterServer was not found" And something about checking if it is a valid DLL or OCX. So, I used 'Dependency Walker' and I found 'Modules with different CPU'. I mean all dll with CPU x64 except the addin itself with CPU x86. And a warning: 'At least one module has an unresolved import due to a missing export function in a delay-load dependent module'.
The project is compiled/built and works well in VSTA editor in debug mode but it is not loaded/seen like a proper addin...
The strange thing is when I have the dll in Corel StartUp path it looks that the function to show the form is triggered meaning that after stopping the debugger the form is shown (using a previous version it executed that old code...)
I attach the code (project) but I do not know how relevant it is...
Does anybody else have a WORKING dll made in VSTA? I mean to be loaded like addin in Corel... Even if very simple...

Can anybody suggest something to be tried?
Thanks in advance!
Attached Files
File Type: zip (164.9 KB, 347 views)
Reply With Quote