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

Hi!

I have read the file NET-Hook Developer's Guide.pdf and everything went fine till I got to the title "Embedding the resource file" on page 56 (64). I couldn't find the Resource Editor at all. Please be more specific about where to find the Resource Editor or how to embed a resource file in an other way.

In C++ it is simple to implement the FT tables, but in C# I can't do it.

Thank you.

Link to comment
Share on other sites

Visual Studio does not ship with a decent Resource Editor. ;(

Do yourself a favor and download Resourcer for .NET from http://www.aisto.com/roeder/DotNet/

 

After you add your resource (.RESX, and/or .RESOURCES) files to your project, select that file in Solution Explorer and on it's Properties set the Build Action to 'Embedded Resource'.

 

As for FT files for NETHooks vs. CHooks, they are just a little different. The issues most have is not getting X to pick up the resources in your DLL. It is easy to know the names of the individual resource items.

 

Here is part of the BoltCircle.FT ->

code:

FUNCTION NET "Run"

dnSBMP "IDB_MAKEPCD16"

dnLBMP "IDB_MAKEPCD24"

dnTIP "IDS_MAKEPCD"

END_FUNCTION

If your resources are properly embedded into your DLL and X does not find them, it is usually caused by an incorrect 'dnRES_NAME'

code:

dnRES_NAME "Boltcircle.MyRes"

An easy way to "discover" the names of the .resources in your DLL is by using the .NET Reflector utility (another wonderful tool from Lutz Roeder). Load your DLL into Reflector and expand the "Resources" branch. Using Boltcircle.DLL as example you'll see 'Boltcircle.MyRes.resources'.

(You can expand the .resources and see the names of the individual resource items it contains)

Just drop the ".resources" from the name and you are good to go.

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