Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

Recommended Posts

  • 1 month later...
  • 2 weeks later...
  • 1 month later...
  • 3 weeks later...

Yeah,I have VS2003 and VS2005,

I want to know which version of Viasual Studio I should use for compiling C-Hooks fo X2.

 

I'm testing my chooks under X2 beta now,

and I found some of them did not work.

(with messages 'the appropriate Mastercam .NET Support dll could not be found.' 'Unknown file type')

 

so, I compared the difference between them,

and it seems that chooks which using MCDialog class do not work.

and I converted all 'MCDialog' => 'CDialog'.

(and m_version thing..)

 

 

I know I should use X2 SDK,but it is not in my hand yet. just curious.. smile.gif

Link to comment
Share on other sites

We at CNC are using VS2005 to compile our X2 chooks. This is the plan going forward as well. MR2 was compiled with 2003, but we made the switch a couple of months ago.

Substantial work has been done behind the scenes on the interface since then, and no effort is being made to be backwards compatible with VS2003 (it would be pointless). I would not be surprised if MCDialog was giving you trouble in VS2003.

 

Personally, I would suggest moving to VS2005, and the X2 SDK, before releasing any chooks for X2. It'll save you a number of headaches.

 

Best of luck,

Link to comment
Share on other sites

Yes, I have downloaded X2 SDk from dealer site.

 

And I could compile my chook for X2 successfully! smile.gif

There are a lot of changes regarding UI Control class,and a lot of compile errors like 'include file not found'..

So I commented them out //

quote:

C:mcamx2sdkm_core.h(143)://#include "interfacescoreToolListBoth_CH.h"

C:mcamx2sdkm_mastercam.h(26)://#include "interfacesguiMastercamDoc_CH.h"

C:mcamx2sdkm_matss.h(12)://#include "interfacesmatssSimulateThread_CH.h"

and more...


Link to comment
Share on other sites
  • 2 months later...

I have also installed X2 SDK, and although I have not tried to recompile my old C-hooks, I tried creating a new one using the wizard. I found ChookWizard.vsz file in the SDK directory and copied into VCvcprojects. I also copied the icon ChookWizard.ico from the old SDK into the same directory. It now appears in the new project creation menu, and the wizard can start, but when I press "Finish" it crashes Visual Studio. Has anybody made the wizard working?

 

Thanks,

Marko

Link to comment
Share on other sites

The C-Hook wizard had to be re-written for Visual Studio 2005 because Microsoft changed the underlying architecture. It was completed about the time of X2 being finalized. Unfortunately, it did not make the CD. I think the plan is to make it available for MR1. However, you may want to petition to make it available from the Mastercam download site.

Link to comment
Share on other sites

To all C-Hook developers migrating from Visual Studio 2003 to Visual Studio 2005.

 

It is recommended that you apply the following changes to existing C-Hooks when migrating to VS 2005.

 

1. Ensure that the all predefined version macros (ie. WINVER, _WIN32_WINDOWS, etc.) are set to at least 0x0501. Failure to do so may result in unpredictable results.

 

2. Add the following three includes to your stdafx.h file:

 

#include "tmschema.h"

#include "CommCtrl.h"

#include "Uxtheme.h"

 

In order to use the above includes, you must have the latest Microsoft Platform SDK installed.

 

If you are developing new for VS 2005, it is highly recommeded that you use the VS 2005 C-Hook wizard as your starting point for development.

Link to comment
Share on other sites

I can compile my C-hook for X2 now, but it crashes Mastercam when it tries to open a dialog box. I migrated the VS2003 project into VS2005, made the changes mentioned above, changed the include and library path to point to X2 SDK (I created a different installation for X2), added UICtrls.lib to link command line and recompiled. Then I did the same exercise with sample C-hook with modal dialog that VS2003 wizard creates with the same result. Running under debugger produces 4 message boxes about missing DLLs which I am not concerned to much about (c:mcamx2sdkdebugResourceartRes.dll, c:mcamx2sdkdebugResourceEngraveRes.dll, c:mcamx2sdkdebugResourcerast2vecRes.dll, c:mcamx2sdkdebugResourcetxtchainRes.dll), but then it crashes with stack overflow exception after failing several assertions.

 

Any suggestions what I may have done wrong?

 

Marko

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...