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

I'm wondering if anyone has had any success producing a C-Hook for Ver. 7.2 using Visual C++ Ver. 6.0. I setup the Project as described in the C-Hook Development Guide and successfully build a dll file, but when I attempt to execute it in Mastercam I get a "C-Hook cannot be found" error message. I am using the "shapes" example in the Development Guide as a template for my program. Any suggestions or tips would be greatly appreciated.

Link to comment
Share on other sites

I've asked our developer to respsond to this in detail, but 4D Engineering's download page at http://www.4dcadcam.com has the following message:

--

Troubleshooting! If you have problems in running any of the c-hooks and are getting a message "C-Hook not Found" then backup any version of MFC42.DLL you may have in your MILL7 directory (if the file is there), and install this one instead >>> MFC42.DLL

(right-click the filename with your mouse and choose 'Save Link as...' to save to your hard disk).

--

So the problem is related to the MFC42.dll revision.

Link to comment
Share on other sites

I too have run into this problem and have found a temporary fix. I developed a C-Hook for Mastercam 7.2c using MS Visual C++ 5.0 SP2 running on Windows NT 4 SP6a. On some machines it would run fine. On other machines, icons and other graphics in the C-Hook would not display. Also, when I brought the C-Hook home to my personal system with Mastercam 7.2c using MS Visual C++ 6.0 SP4 running on Windows 98 SE, I received the same "C-Hook cannot be found" error that you are receiving. This was also the case with the 'shapes' C-Hook you're using as a template. I discovered that it had to do with the version of the mfc42.dll I was using.

The fix was to keep the most current version of the mfc42.dll, which is 6.00.8447.0, in the system directory (eg. C:WindowsSystem OR C:WinntSystem32) but use an older version in the Mastercam root directory (eg. C:Mill72). The version of the mfc42.dll in my Mastercam directory is 4.21.7022, and that one seems to work fine. However, be carefull because other C-Hooks may not run properly or at all with this 'older' version of mfc42.dll. I'm researching this as to why it happens and how to make it work with newer versions of the mfc42.dll. If you need an 'older' version of the mfc42.dll, let me know and I can send it to you.

Hope this helps.

[This message has been edited by Bullines (edited 07-11-2000).]

Link to comment
Share on other sites

As you both suggested, it was the version of the MFC42.ddl file that was at fault. When I replaced the Mastercam supplied version, 4.21.7022, with the Windows NT 4.0 SP6 version, 6.00.8447, or the 4D System Engineering version, 6.00.8168, my C-Hook worked.

Thanks guys for your quick replies. You saved me a lot of time and effort, not to mention head banging, trying to program with the old Dialog Box Manager.

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