Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3691014
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:06:00+00:00 2026-05-19T04:06:00+00:00

I have a C++ project created in VS6 that was opened in VS2010 and

  • 0

I have a C++ project created in VS6 that was opened in VS2010 and compiles fine. It contains a class with a bit of inline assembly including the following code:

__asm{
  mov eax,this
  mov esi,[eax].m_pImage
  ...

All fine and dandy, until I try and create a new MFC C++ project in VS2010 and add the class with the assembly code shown above. Suddenly, this will not compile as the newer interpretation of __asm requires the code to be as follows (or something similar; this compiles in any case):

__asm{
  mov eax,this
  mov esi,[eax]this.m_pImage
  ...

Now, for the life of me, I can not figure out what the difference is between the two projects which allows the converted VS6 project to compile the (presumable currently invalid) inline assembly code in VS2010, while a newly created project can’t.

Is there somewhere a (hidden) setting which allows one to use the old VS6 compiler?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T04:06:00+00:00Added an answer on May 19, 2026 at 4:06 am

    The VS6 inline ASM seems like a bug that was fixed. I say that because I am not sure how the compiler could verify that m_pImage was a member of what was loaded in the eax register and therefore could not find the offset. To answer your question, there is no way, I am aware of, to use the old ASM semantics in the VS6 compiler.

    I would make a local variable outside of the inline ASM and assign that to esi instead.

    void * pointer = this.m_pImage;
    __asm
    {
       mov ebx, pointer
       mov esi, ebx
       ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a project created by others that includes thousands of class files and
Greetings all, I have a wxPython project (created with wxFormBuilder) that contains two panels,
I have a big project that was first created in Borland C++ 6. We're
I have created a small flash CS4 project that has a few custom components
I have a project created with VS2010. I am running the project from VS2008.
I have created a project in xcode which creates a .a file. fine, this
I have created a project called class , and an application called students when
I have a Java Desktop Application project created with NetBeans. The icon that is
Within my VS2010 C# project I have created a Setup And Deployment project to
I have a setup project created by Visual Studio 2005, and consists of both

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.