dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 11 of 11

Thread: 64-bit Conversion

  1. #1
    Join Date
    Apr 2005
    Posts
    1,828

    64-bit Conversion

    I have an existing VC++ code, its a DLL, along with its MSI setup. Now I have to convert the whole process into 64-bit, therefore if I simply compile it with X64 compiler, will it be sufficient or do I have to convert all the datatypes and functiona into 64-bit too?

    What will be the possible consequence if I just compile it with 64-bit compiler and don't convert the datatypes and functions?

    Thanks in Advance

  2. #2
    Join Date
    Sep 2004
    Location
    Holland (land of the dope)
    Posts
    4,123

    Re: 64-bit Conversion

    Is there any reason to use 64-bits ? I mean, do you have specific 64 bits instructions ?

  3. #3
    Join Date
    Jul 2002
    Posts
    2,543

    Re: 64-bit Conversion

    You don't need to change any type moving to x64. int remains int, char remains char. Pointers in x64 configuration are 64 bit length, this is done automatically. So, if your project is compiled and runs in 64 bit, you are OK.

  4. #4
    Join Date
    Apr 2005
    Posts
    1,828

    Re: 64-bit Conversion

    Quote Originally Posted by Alex F View Post
    You don't need to change any type moving to x64. int remains int, char remains char. Pointers in x64 configuration are 64 bit length, this is done automatically. So, if your project is compiled and runs in 64 bit, you are OK.
    Thanks

    Quote Originally Posted by Skizmo View Post
    Is there any reason to use 64-bits ? I mean, do you have specific 64 bits instructions ?
    Its the end user requirement that they want their application to be converted into 64-bit

  5. #5
    Join Date
    Sep 2004
    Location
    Holland (land of the dope)
    Posts
    4,123

    Re: 64-bit Conversion

    Quote Originally Posted by maverick786us View Post
    Its the end user requirement that they want their application to be converted into 64-bit
    In other words, the person(s) who made the requirements don't know what they are talking about .

  6. #6
    Join Date
    Jul 2002
    Posts
    2,543

    Re: 64-bit Conversion

    For some applications it is completely OK to leave them 32 bit. Some applications can run much better on x64 computer with large physical memory, when they are compiled in 64 bit. Otherwise, what is the point in using 64 bit processor?

  7. #7
    Join Date
    Aug 2000
    Location
    New York, NY, USA
    Posts
    5,656

    Re: 64-bit Conversion

    Quote Originally Posted by Skizmo View Post
    In other words, the person(s) who made the requirements don't know what they are talking about .
    He who pays the piper calls the tune.
    Vlad - MS MVP [2007 - 2012] - www.FeinSoftware.com
    Convenience and productivity tools for Microsoft Visual Studio:
    FeinWindows - replacement windows manager for Visual Studio, and more...

  8. #8
    Join Date
    Sep 2004
    Location
    Holland (land of the dope)
    Posts
    4,123

    Re: 64-bit Conversion

    Quote Originally Posted by Alex F View Post
    For some applications it is completely OK to leave them 32 bit. Some applications can run much better on x64 computer with large physical memory, when they are compiled in 64 bit. Otherwise, what is the point in using 64 bit processor?
    The point is that a 64-bit processor has 64 bit instructions that can make stuff go faster (or easier). Problem with this is that not a lot of programmers actually use them or even know how to use them. And yes, the memory addressing is bigger. Besides those options, there isn't a lot more. Same as the multi-core cpu's. If your app is not aware of them (and thus not using the parallel processing options), multi-core isn't a big enhancement. Bought a 6core phenom II a few weeks ago, and now I can perfectly see in my taskmanager (ubuntu) that usually 2-3 core are doing absolutely nothing.

  9. #9
    Join Date
    Jul 2002
    Posts
    2,543

    Re: 64-bit Conversion

    Quote Originally Posted by Skizmo View Post
    Problem with this is that not a lot of programmers actually use them or even know how to use them.
    C++ programmers don't need to know how to use 64 bit Assembly instructions - its quite enough that compiler knows.
    Regarding multi core processor - Microsoft and Intel try to convince us that without using their parallel libraries our applications will not run better on multi core processors. This is correct only for single-threaded application running exclusively. If number of CPU-intensive applications are running, or even one multi-threaded application is running on multi core CPU, performance is better without changing existing code.
    I agree that every programmer must think before moving to 64 bit - sometimes it is not necessary. But this doesn't mean, that every programmer who decides to support 64 bit, doesn't know what he is talking about.

  10. #10
    Join Date
    May 2005
    Posts
    4,954

    Re: 64-bit Conversion

    Quote Originally Posted by Alex F View Post
    You don't need to change any type moving to x64. int remains int, char remains char. Pointers in x64 configuration are 64 bit length, this is done automatically. So, if your project is compiled and runs in 64 bit, you are OK.
    Regarding pointers issue is not that straightforward it depend how you wrote your 32bit application, if you followed the rules you are ok if not you MUST change your code.

    Cheers
    If a post helped you dont forget to "Rate This Post"

    My Article: Capturing Windows Regardless of Their Z-Order

    Cheers

  11. #11
    Join Date
    Jan 2007
    Posts
    102

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)