Welcome, Guest. Please login or register.
Did you miss your activation email?
December 01, 2008, 10:23:55 PM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  Mach SDK plugin questions and answers.
| | |-+  Plugin development in VS2005, VS2008
Pages: « 1 2   Go Down
Print
Author Topic: Plugin development in VS2005, VS2008  (Read 1223 times)
0 Members and 1 Guest are viewing this topic.
ART
Administrator
*
Online Online

Posts: 475


Tough as soggy paper.


View Profile
« Reply #10 on: August 05, 2008, 09:50:14 AM »

Status Update -

I've spent over 80 hours in the last two weeks working on the .h files that will be needed to accomplish this.

  >> Ugh, I know the trouble involved in this one..

I'm down to testing and working on a minimalist approach to a plugin. I am targeting using VS2008 C++ Express Edition with mixed mode CLR code.

I've got a plugin working in VS2008 C++ Professional. And have one ALMOST working in C++ Express. It loads, can be config'd (with managed dialogs), but blows up Mach with an infinite error message "ART9991" when I enable it.

A question for Brian/Art that would help me in finishing this:

>>Anything. Smiley


About the 4 routines concerning COM automation (DLLGetClassObject, etc) - Does Mach USE COM to talk to the plugin or was this just if the plugin needed COM to talk to other software?

>> Not used at all in the context of the plugin. Mach3 basically asks the plugin for the pointer to the functions like Update() etc.. stores them , then calls them at the appropriate time as declared function pointers.
>> No com is used. The plugin also asks Mach3 for the pointers to its main classes and uses those as the data pointers into the h files. ( thus the trouble as youve discovered ).

To me it looks like Mach does ALL simple DLL calls to the plugin. I have setup 'simple' functions like: extern "C" __declspec(dllexport) void Config()

 >> Exactly, only I used the archaic function decalration such as OneShort defined in the .h files to setup the function as opposed to the __declspec

These all appear to generate the proper DLL exports under examination with PEBrowserPRO.

>> Excellent, I hadnt played at all with iut that way, Once I discovered I could define the return type and have it work, I stopped and used that. ( hence the trouble. Smiley )

My C++ Pro code is very similar to the example plugins. My C++ Express code can not access AfxDllGetClassObject, etc. since it does not include MFC headers. I'm trying to get around it by returning S_OK. Any ideas on what I can try? Would some other return tell Mach that I don't need automation and have it skip the other calls? Ultimately, with my mixed mode I should be able to use Managed COM for people that need COM.

>> I think just returning S_OK woudl work, just a case of getting it to compile as I think the interface is totally unuded in the context of a plugin. Though to be honest you
probably know more than I as your fresh into delving into that so much lately.

Thanx,

-Ed

p.s. i will be asking for contributions to my new glasses fund after poring over 17,000 lines of assembly code to check out the structs that I replaced ALL classes with  ;^)

>> I suspect Brian will be happy to pay for the glasses en toto.. Smiley



Logged
Klaus1311
Regular Member

Offline Offline

Posts: 1


View Profile
« Reply #11 on: September 29, 2008, 04:57:49 AM »

Hello All

I would like to play a Little with the sdk, to build a plug-in. Unfortunately I have only VS6 and VS 2008. Does anyone have an idea, when the sdk is working under VC2008?

Thanks

Klaus
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
*
Online Online

Posts: 770


Briceville, TN, USA



View Profile WWW
« Reply #12 on: September 29, 2008, 08:25:44 AM »

Ed, is trying to make it where you can do it in other versions, but he still has a ways to go.

Until then, get you an acedemic copy of VS2003, off of E bay, I got mine for about 60.00.

scott
Logged

All things Mach3, Screens, Wizards, Plugins, Brians, complete control solutions for complex machines, Macros, ATC's, any kind of CNC machine build, retrofit or repair.
Pages: « 1 2   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!