Difference between Windows Xp os and Windows Vista os?
-
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 )
-
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 )
What function returns you '0' or '255'?
Maxwell Chen
-
What function returns you '0' or '255'?
Maxwell Chen
-
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 )
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
-
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
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.hreturn 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 )
-
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.hreturn 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 )
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
-
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
-
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
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 )
-
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 )
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