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:

testassc.c example in CHDEV


butch_shaw
 Share

Recommended Posts

Did you just copy 'n' paste it into a new MSVC project?

Don't forget that all C-Hook projects need the "M_INIT.OBJ" and "M_PTRS.OBJ" files from the SDK added to them. Also, don't forget to add the "MSWINDOWS" and "_MSVC_" preprocessor definitions and delete the "_DEBUG" definition. Finally, C-Hooks are "Multithreaded DLLs" and use a 1-byte struct member alignment.

[This message has been edited by Bullines (edited 01-25-2001).]

Link to comment
Share on other sites

Did you just copy 'n' paste it into a new MSVC project? YES

I Didn't forget that all C-Hook projects need the "M_INIT.OBJ" and "M_PTRS.OBJ" files from the SDK added to them. I didn't forget to add

the "MSWINDOWS" and "_MSVC_" preprocessor definitions and I had delete the "_DEBUG" definition. Yes, C-Hooks are "Multithreaded DLLs" and use a 1-byte struct member alignment.

Also:

"matl" refers to material structure in m_avars.h Which does not have the variable "type".

Do I add type in as an int?

I thought these sample files were to make things easy. HA!!!!! rolleyes.gif

Link to comment
Share on other sites

MSVC's C2039 error means that you called a member of a structure that doesn't exist. For example:

struct DigitalTime

{

int nHour;

int nMinute;

int nSeconds;

}*pDigitalTime;

void main()

{

pDigitalTime->nHour = 11; // ok

pDigitalTime->nMinute = 30; // ok

pDigitalTime->nSecs = 45; // this causes C2039

}

If the structure doesn't contain a member called "type", then there's your problem. Maybe the "type" variable was omitted by accident. I've never used that structure yet, so I can't share any experience with it. Hope this helps.

[This message has been edited by Bullines (edited 01-25-2001).]

[This message has been edited by Bullines (edited 01-25-2001).]

[This message has been edited by Bullines (edited 01-25-2001).]

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