Hello Guest it is March 28, 2024, 11:43:51 AM

Author Topic: Mach3 Plugin Tutorial Document and Prototype File Set  (Read 139675 times)

0 Members and 1 Guest are viewing this topic.

Re: Mach3 Plugin Tutorial Document and Prototype File Set
« Reply #30 on: April 15, 2008, 11:36:40 AM »
Hi Daniel,

Are you using the project I modified or did you add the declarations to yours locally?  I had to change one of your scripter declarations to 'extern' so you didn't get a second instance which will not call the Mach dispatch that was attached.  The debug statement shows that you don't have a dispatch pointer to the Mach3 object model.  Make sure of the scripter declarations and instantiation.

I have not tried debugging directly, I prefer the trace method since the primary platform I code for (CorelDRAW) will crash if I try to get a breakpoint in my DLLs.

You can try it in Mach3, BUT I don't think it is a good idea.  Mach3 is a real time device and the plugins run in-process.  Stopping the flow of execution in a breakpoint would probably be harmful.  If you want to try this then insert a DebugBreak where you want the debugger to gain control.  Probably in a startup module, or a place of interest that you want to examine.

-James Leonard

Offline Whacko

*
  •  239 239
  • Happy Days
    • View Profile
Re: Mach3 Plugin Tutorial Document and Prototype File Set
« Reply #31 on: April 16, 2008, 06:41:19 PM »
Anyone have had a debug assertion failed with James's Tut plugin? Debug view error 2392 "Cannot find dialog template with IDD 0x07D0".

Whacko ???
« Last Edit: April 16, 2008, 06:44:09 PM by Whacko »
Nothing's impossible
Re: Mach3 Plugin Tutorial Document and Prototype File Set
« Reply #32 on: April 16, 2008, 08:33:31 PM »
Anyone have had a debug assertion failed with James's Tut plugin? Debug view error 2392 "Cannot find dialog template with IDD 0x07D0".

Whacko ???

Hi,

Is that ID in your resource.h?  What version of the PluginProto file set are you using?

What step are you on?

-James

Offline Whacko

*
  •  239 239
  • Happy Days
    • View Profile
Re: Mach3 Plugin Tutorial Document and Prototype File Set
« Reply #33 on: April 17, 2008, 02:19:29 AM »
Hi James, I'm using the version you posted with the "b" postfix, it is the revised one. Builds are error free and warning free, with no forced message/error suppresion.The error is triggered when I load mach3.exe from the desktop shortcut after the plugin dll has been compiled and copied to the plugins folder of Mach3. The "Found Mach window" is the message just b4 the error in DBview. The ID address is in hex, so I will have to check which one it is, I didn't have time to check it. Thanks for the reply.

Whacko
Nothing's impossible
Re: Mach3 Plugin Tutorial Document and Prototype File Set
« Reply #34 on: April 17, 2008, 11:03:42 AM »
Hi,

Did you do all the steps in the tutorial to arrive at this point?  The Dialog used for this tutorial is not in the prototype file set it is added along the way.  If you want to ZIP up your project and post it here I will be happy to have a look.

-James Leonard

Offline Whacko

*
  •  239 239
  • Happy Days
    • View Profile
Re: Mach3 Plugin Tutorial Document and Prototype File Set
« Reply #35 on: April 17, 2008, 01:28:02 PM »
Hi James,

Yes, I followed the steps as per the tutorial doc. The zip file as it is now is quite large, (12mb) because it includes the pre-compiled header file. Do you want me to post it anyway? I checked the resource file and the ID is included. It could be the way my VS is setup, as I'm busy with a data layer translater app. at the moment.

Best regards,
William (Whacko)
Nothing's impossible

Offline Whacko

*
  •  239 239
  • Happy Days
    • View Profile
Re: Mach3 Plugin Tutorial Document and Prototype File Set
« Reply #36 on: April 17, 2008, 03:09:33 PM »
Hi James, I sent you a PM.

Whacko
Nothing's impossible
Re: Mach3 Plugin Tutorial Document and Prototype File Set
« Reply #37 on: April 22, 2008, 04:33:57 AM »
I have managed to debug a plugin dll in VS.

It's working nice and It helped me. Are necessary some configurations. See attached files :

Unfortunately I still wasn't able to load the roadrunner.tap with scripter object. I still try !
Re: Mach3 Plugin Tutorial Document and Prototype File Set
« Reply #38 on: April 22, 2008, 11:03:01 AM »
Hi Daniel,

Ok, looks good.  Let me know how it goes when you set breakpoints in one of the callbacks.

Do you only have ONE declaration of the scripter object that then attaches to the Mach3 COM object?  ALL other declarations need to be 'extern' so they refer to that instance.  I noted that you had multiple declarations in the plugin source code that I saw, none of them were 'extern'.  Please see my post #28 on page 3 about the problems that were found.
« Last Edit: April 22, 2008, 11:16:28 AM by jemmyell »

Offline Whacko

*
  •  239 239
  • Happy Days
    • View Profile
Re: Mach3 Plugin Tutorial Document and Prototype File Set
« Reply #39 on: April 23, 2008, 06:27:29 PM »
Found the problem. I had to do a binary edit on the .rc file to get rid of the "Proto".  My setup is a bit of a mess, and I had to include the full path declaration on some of the header includes. Everything's working as well as from Mach3.

Whacko
Nothing's impossible