Hello Guest it is March 29, 2024, 09:34:19 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - j1sys

Pages: 1 2 »
1
thanx to all for their testing and comments.

attached is an updated install module. this one doesn't make a .rc file for version information. if you want to save the step of deleting the .rc after creating your project you can uninstall the original beta and install this one. none of your existing projects will be changed.

i didn't bother to give it a new version number. i just identified the installer file with a 1.1a on the end.

-ed

2
OK Family & Friends More Tutorials!!

If listening to my voice for 12 minutes in the install tutorial didn't put you to sleep, this set should do the trick.

I have uploaded the following files for your enjoyment  ::) :

www.j1sys.com/MPW_XYZTutor_1.swf     (17Meg, 19min)  Overview
www.j1sys.com/MPW_XYZTutor_2.swf     (13Meg, 29min)  MachDevice.h/MachDevice.cpp
www.j1sys.com/MPW_XYZTutor_3a.swf   (5Meg, 13min)    Plugin.h
www.j1sys.com/MPW_XYZTutor_3b.swf   (11Meg, 27min)  Plugin.cpp

These are preliminary first pass tutorials. They will be replaced in the future. I ran into some time/frame/memory constraints that I was unaware of with the screen recording software and its implementation of .SWF. Two of the files have slightly truncated video (#2, #3b). Luckily, I have actually finished showing all of the significant code and the video that was truncated is a simple scan of some unused code (in this sample plugin). The audo continues and you can view the files yourself on your computer. I will fix this in future tutorials.

There are still several more sections to be recorded and I will complete them ASAP and let you know.

-Ed

3
Thanx for your comments Art. I will fix the source to include the DoDwell() documentation in the next release.

I am working on the code tutorials (which you, of course don't need) this morning and will upload them soon.

All of the pointers to structures appear to work fine. I have some concerns about memory leaks if people are NOT careful with any LPCSTR pointers. I'm thinking mainly of Tickers[255]. I will work out a conservative set of recommended malloc/free procedures and document them later. Other than that I think it will all work. Most of the pointers could/should not be used and definitely NOT be modified by a plugin. But people will learn the hard way.

-Ed

4
Brett (and all) -

That is my ooops. I added the .rc file today to allow you to set your version information for your dll. I tested it on Express but it looked in my h files and found something that belonged to my Standard version. I usually do a final test in a virtual machine that ONLY has Express. But, in my haste, I skipped that final test.

Please delete/remove the .rc (Demo2.rc or whatever your plugin is named) after the wizard finishes generating your code. Then it should compile.

I will upload a fix tomorrow morning.

Thanx for testing. The programming tutorial was 1hr30min when it blew up. Broken into 20min sections it should take 5 sections.

One other note - everyone be sure to name your project WITHOUT any spaces in the name. I don't know if VS will allow it but I know it will break my code.

-Ed

5
Greetings -

Tonight I am releasing a BETA version of my new MachPluginWizard (MPW).

This release only supports Win32 and .Net programming. It does not support ATL or MFC. I will add ATL and MFC support in the very near future.

I need to get this BETA release out into the field for testing. If you have some time to try it out and to start familiarizing yourself with this new development environment I would appreciate your help and comments.

MPW requires that you first install either Visual C++ 2008 Express Edition or Visual Studio C++ 2008 Standard (or above). Express Edition is available free of charge from www.microsoft.com/express/vc

I have attached the .msi for you to install.

I have uploaded a 12 minute tutorial on installing MPW and creating a quick plugin to: www.j1sys.com/MPWInstall.swf

I am working on another set of programming tutorials that take an in depth look at the source code generated by MPW. I just finished a trial run of the tutorial and my screen recording software failed to save it to disk. It ran out of memory. I will generate another version of the tutorial tomorrow morning. It will be broken into 15-20 minute segments. I will post a follow up with the urls.

I hope you enjoy testing MPW and can see it's power and ease of use in the install tutorial.

-Ed

Edward D. Bryson
Joshua 1 Systems Inc.
Knoxville TN USA

6
For All -

Lastest update: I've worked almost exclusively on this project for the last ten days and I think I see the light at the end of the tunnel. I just hope it is not a train coming.

I have developed an .msi installer that will install a new Application Wizard called MachPluginWizard on either a Visual Studio C++ 2008 Standard or Visual Studio 2008 C++ Express installation. After installing MachPluginWizard a developer can create a new project with just a few clicks. MachPluginWizard includes the options of selecting the Win32, ATL, MFC, or .NET configuration and creates source code files tailored to the option selected. The ATL and MFC options are greyed out if MachPluginWizard detects that it is running inside of VS 2008 Express. It also selects all needed parameters in the VC project file. Optionally it can include standard code for a simple configuration dialog, Plugin Config menu items installation using exclusively Win32 calls, my new XMLProfile class for .NET, and the Post-Build event to copy the .dll to the C:\Mach3\Plugins directory. MachPluginWizard takes care of all textual edits needed to personalize the code to a plugin name that matches the project name.

The installer also installs my modified .h files in a subdirectory and MachPluginWizard sets the project to search that additional directory.

As I demonstrated to Scott last night, you can click on MachPluginWizard, name the project, accept the defaults, let it create the project, build the project, and then go to mach and see a new plugin raring to go!!

I've probably got another week of testing and tweaking all of the options for all of the environments before I can release it to my beta testers. Then I will work up some quick AVI tutorials on it's installation and operation.

As of now I believe I will not support VS 2005. I believe with all my work to support VS 2008 Express and .NET that anyone can use those tools for free and don't have to buy VS 2008 Standard or better unless they feel they have to use MFC to develop their plugins. The wizards and features I use may not be compatible with VS 2005 and I don't want to add another level of complexity to my plate.

----------------------------------

For Art/Brian -

In the mixed mode .Net version I developed a replacement to XMLProfile that uses .Net XML. Empirically I've tested it with my Mach3 and don't see any problems but want to run a few questions by you:

1) Do you see any problems with using an indented option on the XML file? I've tried it and it seem nots to mess up Mach3. Since you appear to be using the MSXML COM object and it will accept indented I think I'll be OK. It just makes it so much easier to look at.

2) Do you see any problems with plugins written in the new development environment doing the following when it is valid for them to work with XML file:

2a) Create a DOM object
2b) load the XML from the file
2c) interrogate and/or modify the DOM
2d) save the XML to the file (if needed)

3) So far it appears to work. I'm just not sure how this will interact with your handling of the XML file. I don't want to lose any of your changes and/or have you overwrite any of mine. Do you see any problems?

4) I've also added the option to allow plugin writers to create a simple tree structure within their section. They just have to enable it when they constuct the XMLProfile object and then they can use entry names like 'Dlg1/Int1', 'Dlg2/Txt2'. Again, empirically, it appears to not make any problems for Mach3 since the MSXML still loads and saves the file fine. Do you concur?

--------------------

For ALL -

Attached is a screenshot of the Mach3Mill.xml file in the Visual Studio editor with all of mach's sections collapsed and showing the new XML section of a plugin named XMLTest.

-Ed

7
Art -

The new syntax bugged me too. C# does EVERYTHING by reference so it threw me a bit. The '^' is a new kind of reference pointer that is used for CLR objects. The good and bad of C++ is that they have BOTH the old style and new style mixed together so they had to dream up some new syntax. Hence the use of gcnew vs. new. For garbage collection objects (CLR) use 'gcnew' for old style heap us 'new'.

The cute thing with mixed mode: look at the '= GetDRO(800).ToString("F4")'

I didn't have to write or do a thing. The compiler elevated the intrinsic double that Mach returned to being a System::Double object that includes a formatting ToString() function as a builtin member.

I found a GREAT book that I STRONGLY recommended that ANYBODY that wants to work with my new Plugin Development Environment buy. It covers ALL three modes of C++ development. Each chapter covers Win32, MFC, CLI (another name for CLR or .NET).

Again I HIGHLY recommend it and will be even offering it for sale at the Plugin class at the Mach3 Southeast Convention for the convenience of the attendees but really want them to buy it before hand and read through it.

The book is: Ivor Horton's Beginning Visual C++ 2008

ISBN: 978-0-470-22590-5

Publisher: WROX (a division of Wiley)

It cost $54.99 at Border's

It is called 'Beginning' but it is NOT. This is a deep treatise of the entire language and all it's power and uses.

-Ed

8
Art -

I'm not a .NET preacher but when you see how easy, logical, and straightforward it is to do dialog boxes and the like in .NET you will be a convert. I switched to C# (which is .NET ONLY) many years ago for business application development. A lot of my time this past year working with Scott on MFC based plugins was getting MFC dialogs to do what he and I wanted them to do. MFC's addition of so many macros for DDX/DDV and the like makes it hard to find the forest for the trees. I'll post parts of the source code of my .NET solution and I think you will see how clean it is to get data into and out of a dialog.

C++ native is still the best thing for time tight code but when interfacing with the nut on the other side of the mouse, keyboard, and screen .NET is, IMHO, the easiest way to go.

just as a tease - here are two snippets of code. The first one is piInitControl (my replacement of myInitControl). It sets up a persistent modeless dialog box that was totally designed in a form designer (which i personally don't like, but i'm a purist that likes to type instead of mouse).

//---------------------------------------------------------------------
//
//   piInitControl() - Plugin extension of InitControl()
//
//---------------------------------------------------------------------

#ifdef PI_INITCONTROL
#ifdef _MANAGED
#pragma PI_MIX_INITCONTROL
#endif
bool piInitControl()
{
   MonitorDialog^   monitorDialog = gcnew MonitorDialog();

   monitorDialog->Show();

   MG::monitorDialog = monitorDialog;

   return true;
}
#endif

The second snippet is the piUpdate() that fills the X,Y,Z DRO boxes every 1/10th of second.

//---------------------------------------------------------------------
//
//   piUpdate() - Plugin extension of Update()
//
//---------------------------------------------------------------------

#ifdef PI_UPDATE
#ifdef _MANAGED
#pragma PI_MIX_UPDATE
#endif
void piUpdate()
{
   MonitorDialog^   monitorDialog;

   monitorDialog = MG::monitorDialog;

   monitorDialog->textBoxX->Text = GetDRO(800).ToString("F4");
   monitorDialog->textBoxY->Text = GetDRO(801).ToString("F4");
   monitorDialog->textBoxZ->Text = GetDRO(802).ToString("F4");
}
#endif

A very simple example but it shows that it works and how easy it is to do.

Attached is a screen shot of the running DLL.



-Ed

9
NEWS FLASH - Latest Update

After 4 days of down and dirty programming including several VERY late nighters I have finally broken through into the world of Visual Studio 2008 C++ Plugin Development.

I have a successful test plugin running that has been compiled using VS2008 C++ Standard. I have also downloaded VS2008 C++ Express and installed it in an isolated virtual machine and expect it to work fine (with some limitations) in that environment.

The source code is targeting three different models of development:

C++ Native using standard Windows calls - working in VS-2008 C++ Express or above
C++ Native using MFC - working in VS-2008 C++ Standard or above (approx $175 to buy compiler)
C++ Native/CLR mixed using .NET 2.0+ - working in VS-2008 C++ Express or above

I have spent the most time allowing for option #3. Getting a mixed mode DLL to work allows for C++ native code for the Mach3 interface and the time sensitive code and the ease of development for configuration screens and the like with .NET style objects. This will allow for powerful and beautiful plugins written on a free compiler (VS-2008 C++ Express).

The MFC version requires tools that are NOT included in the free compiler so you must purchase at least the Standard version.

I am working on final testing of all three models in each environment and am also working on a Project Template to automate the generation of a new project without having to copy and edit a lot of fields in the project environment.

I expect to have a set of testing DLLs of a complete simple plugin ready in about a week that will need to be tested on as many machines as possible. So beta testers will be needed.

I expect to have an install package and preliminary users guide for the development tools by mid-March and then the fun can begin.

Just an update for those that may have wondered if I fell of the end of the earth!!!

-Ed

10
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.

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:

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?

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()

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

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.

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  ;^)

Pages: 1 2 »