OberonPlace.com Forums

OberonPlace.com Forums (http://forum.oberonplace.com/index.php)
-   CorelDRAW/Corel DESIGNER VBA (http://forum.oberonplace.com/forumdisplay.php?f=16)
-   -   VSTA problem... (http://forum.oberonplace.com/showthread.php?t=24608)

FaneDuru 18-03-2013 15:36

VSTA problem...
1 Attachment(s)
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!

FaneDuru 23-03-2013 13:03

Maybe such an addin made in VS2010... Please!

SteveDude 24-03-2013 10:54

Wish I could help you with this, but am unfamiliar with doing it via VSTA. At least at one time add-ins were based on COM and I think they still are so the assembly would have to be registered for and visible to COM interop and may need to be targeted for proper version platform. It is possible to make .NET assemblies interact with COM - that's what it is doing with all automation with Corel, just can't tell you how to make it work in the way you want. Sure someone else on here knows more about VSTA than I...I know nothing about it.

FaneDuru 25-03-2013 14:47

Firstly thanks for your interest!
I would much appreciate any sample in VB.NET also but it looks that nobody knowing it could see this thread...

AVP 27-03-2013 13:31

Vs 2010
I write in VS2010 in VB.NET as . EXE
For which version of Corel write an example? Corel X5 or X6?

FaneDuru 29-03-2013 14:25


AVP 29-03-2013 23:59

1 Attachment(s)
For CorelX5 with Service Pack 3/ Hot Fix 4.
Read file ReadMe.txt in 'Realization' folder

FaneDuru 30-03-2013 06:41

I will immediately test it...

FaneDuru 30-03-2013 06:53

It looks that gsm file was prepared for X6... But it was easy to adapt for the path of GMS folder of X5.
It works! Thanks again!:D

I do not want to bother too much but shell I dare to ask for an idea to prepare a COM addin (dll) to be automatically launched at CorelDRAW start?
Thanks in advance!

All times are GMT -5. The time now is 05:46.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com