Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Difference between Windows Xp os and Windows Vista os?

Difference between Windows Xp os and Windows Vista os?

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++visual-studiohelpquestion
9 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rowdy_vc
    wrote on last edited by
    #1

    Hi i have one c++ source code.This code was good compiling in windows XP (The output of the code was return value '0') and then i was changed into windows Vista its also compiling but it gives the return value '255'.. i am using the compiler visual studio 2005 i dont know not much of idea this problem ...

    *****THANKS N ADVANCE**** Mathen.K (I WILL TRY MY LEVEL BEST )

    M 1 Reply Last reply
    0
    • R rowdy_vc

      Hi i have one c++ source code.This code was good compiling in windows XP (The output of the code was return value '0') and then i was changed into windows Vista its also compiling but it gives the return value '255'.. i am using the compiler visual studio 2005 i dont know not much of idea this problem ...

      *****THANKS N ADVANCE**** Mathen.K (I WILL TRY MY LEVEL BEST )

      M Offline
      M Offline
      Maxwell Chen
      wrote on last edited by
      #2

      What function returns you '0' or '255'?

      Maxwell Chen

      R 1 Reply Last reply
      0
      • M Maxwell Chen

        What function returns you '0' or '255'?

        Maxwell Chen

        R Offline
        R Offline
        rowdy_vc
        wrote on last edited by
        #3

        Thanks to your replay ... HRESULT datatype function retun in 0 (in XP) and 255(in vista)

        *****THANKS N ADVANCE**** Mathen.K (I WILL TRY MY LEVEL BEST )

        R 1 Reply Last reply
        0
        • R rowdy_vc

          Thanks to your replay ... HRESULT datatype function retun in 0 (in XP) and 255(in vista)

          *****THANKS N ADVANCE**** Mathen.K (I WILL TRY MY LEVEL BEST )

          R Offline
          R Offline
          Rajesh R Subramanian
          wrote on last edited by
          #4

          You have two different options: 1. Hard-code your function to return 0 always. (or) 2. Let us know what is the 'function' that you are talking about, why should it return 0 and not 255, show us any relevent piece of code, why would you still want to continue programming, etc.,

          Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

          R 1 Reply Last reply
          0
          • R Rajesh R Subramanian

            You have two different options: 1. Hard-code your function to return 0 always. (or) 2. Let us know what is the 'function' that you are talking about, why should it return 0 and not 255, show us any relevent piece of code, why would you still want to continue programming, etc.,

            Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

            R Offline
            R Offline
            rowdy_vc
            wrote on last edited by
            #5

            Hi this is my sample code . STDMETHODIMP CFileIO::VerifyUser(SAFEARRAY* userCredential, SAFEARRAY* appCredential, BYTE* result) { *result = (BYTE)false; // Prepare in case we fail at some point try { validateCredential(appCredential); validateUser(userCredential); //this is our one sample metod *result = (BYTE)true; } catch (std::exception& e) { log("Verify User", e.what(), EVENTLOG_ERROR_TYPE); } return S_OK; } #define S_OK ((HRESULT)0x00000000L)//winerror.h #define S_FALSE ((HRESULT)0x00000001L)//winerror.h return S_OK ;// this our code return S_FALSE; this is perfectly running in windows XP and it gives return value '0'but in vista it running good but it gives the retun value 255. whats the problem about that?

            *****THANKS N ADVANCE**** Mathen.K (I WILL TRY MY LEVEL BEST )

            D 1 Reply Last reply
            0
            • R rowdy_vc

              Hi this is my sample code . STDMETHODIMP CFileIO::VerifyUser(SAFEARRAY* userCredential, SAFEARRAY* appCredential, BYTE* result) { *result = (BYTE)false; // Prepare in case we fail at some point try { validateCredential(appCredential); validateUser(userCredential); //this is our one sample metod *result = (BYTE)true; } catch (std::exception& e) { log("Verify User", e.what(), EVENTLOG_ERROR_TYPE); } return S_OK; } #define S_OK ((HRESULT)0x00000000L)//winerror.h #define S_FALSE ((HRESULT)0x00000001L)//winerror.h return S_OK ;// this our code return S_FALSE; this is perfectly running in windows XP and it gives return value '0'but in vista it running good but it gives the retun value 255. whats the problem about that?

              *****THANKS N ADVANCE**** Mathen.K (I WILL TRY MY LEVEL BEST )

              D Offline
              D Offline
              David Crow
              wrote on last edited by
              #6

              rowdy_vc++ wrote:

              whats the problem about that?

              The problem is that you are not showing what function is returning 255. VerifyUser() returns either 0 or 1.

              "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

              "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

              R 2 Replies Last reply
              0
              • D David Crow

                rowdy_vc++ wrote:

                whats the problem about that?

                The problem is that you are not showing what function is returning 255. VerifyUser() returns either 0 or 1.

                "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

                "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                R Offline
                R Offline
                rowdy_vc
                wrote on last edited by
                #7

                Actually in Windows Xp in this source code successfully compiled with return value '0'.But in vista its successfully compiled but it gives return value '255'.This is the problem.

                *****THANKS N ADVANCE**** Mathen.K (I WILL TRY MY LEVEL BEST )

                1 Reply Last reply
                0
                • D David Crow

                  rowdy_vc++ wrote:

                  whats the problem about that?

                  The problem is that you are not showing what function is returning 255. VerifyUser() returns either 0 or 1.

                  "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

                  "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                  R Offline
                  R Offline
                  rowdy_vc
                  wrote on last edited by
                  #8

                  Actually in Windows Xp in this source code successfully compiled with return value '0'.But in vista its successfully compiled but it gives return value '255'.This is the problem. how to solve it

                  *****THANKS N ADVANCE**** Mathen.K (I WILL TRY MY LEVEL BEST )

                  D 1 Reply Last reply
                  0
                  • R rowdy_vc

                    Actually in Windows Xp in this source code successfully compiled with return value '0'.But in vista its successfully compiled but it gives return value '255'.This is the problem. how to solve it

                    *****THANKS N ADVANCE**** Mathen.K (I WILL TRY MY LEVEL BEST )

                    D Offline
                    D Offline
                    David Crow
                    wrote on last edited by
                    #9

                    rowdy_vc++ wrote:

                    This is the problem.

                    Indeed, since you have not shown any code that returns a value of 255.

                    "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

                    "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups