reagarding doubt with our project!!
-
Hi to ALL have one doubt regarding with my project . our project goal is to create one user dll(this dll create for VC 2005) and in this dll load another one java platform (via jni compiler.. it is possible) first up all .i was create DLL when i attached this dll in JNI compiler its perfectly running in windows XP (it gives return value '0')but in vista it is also running but it gives the return value '255' for example i give one method to our source :
STDMETHODIMP CFileIO::fileExist(BSTR filePath, BYTE drive, SAFEARRAY* credential, BYTE* result) { *result = (BYTE)-1; // Prepare in case we fail at some point std::string completePath; // Drive and path combinaison try { validateCredential(credential); setPath(filePath, drive, completePath); // Assemble drive and path into complete path. } catch (std::exception& e) { log("fileExist", e.what(), EVENTLOG_ERROR_TYPE); return S_OK; } size_t zz = completePath.rfind("\\"); if (zz < completePath.length()) { std::string dirOnly = completePath.substr(0,zz); DWORD nBufferLength = 1024; // Anything longer would be doubtful TCHAR buffer[1024]; LPTSTR* lpFilePart = NULL; DWORD searchResult = SearchPath( dirOnly.c_str(), completePath.substr(zz+1, completePath.length()).c_str(), NULL, nBufferLength, buffer, lpFilePart ); if (searchResult > 0) { *result = (BYTE)1; } else { *result = (BYTE)0; } } return S_OK; }
#define S_OK ((HRESULT)0x00000000L) #define S_FALSE ((HRESULT)0x00000001L) //in winerror.h This perfectly running in windows XP it gives the return value '0' but in vista it gives the reurn value '255' i need your answer..*****THANKS N ADVANCE**** Mathen.K (I WILL TRY MY LEVEL BEST )
-
Hi to ALL have one doubt regarding with my project . our project goal is to create one user dll(this dll create for VC 2005) and in this dll load another one java platform (via jni compiler.. it is possible) first up all .i was create DLL when i attached this dll in JNI compiler its perfectly running in windows XP (it gives return value '0')but in vista it is also running but it gives the return value '255' for example i give one method to our source :
STDMETHODIMP CFileIO::fileExist(BSTR filePath, BYTE drive, SAFEARRAY* credential, BYTE* result) { *result = (BYTE)-1; // Prepare in case we fail at some point std::string completePath; // Drive and path combinaison try { validateCredential(credential); setPath(filePath, drive, completePath); // Assemble drive and path into complete path. } catch (std::exception& e) { log("fileExist", e.what(), EVENTLOG_ERROR_TYPE); return S_OK; } size_t zz = completePath.rfind("\\"); if (zz < completePath.length()) { std::string dirOnly = completePath.substr(0,zz); DWORD nBufferLength = 1024; // Anything longer would be doubtful TCHAR buffer[1024]; LPTSTR* lpFilePart = NULL; DWORD searchResult = SearchPath( dirOnly.c_str(), completePath.substr(zz+1, completePath.length()).c_str(), NULL, nBufferLength, buffer, lpFilePart ); if (searchResult > 0) { *result = (BYTE)1; } else { *result = (BYTE)0; } } return S_OK; }
#define S_OK ((HRESULT)0x00000000L) #define S_FALSE ((HRESULT)0x00000001L) //in winerror.h This perfectly running in windows XP it gives the return value '0' but in vista it gives the reurn value '255' i need your answer..*****THANKS N ADVANCE**** Mathen.K (I WILL TRY MY LEVEL BEST )
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
-
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
I think he mean the value in
*result
nave [OpenedFileFinder]
-
I think he mean the value in
*result
nave [OpenedFileFinder]
Naveen wrote:
I think he mean the value in *result
I don't get a thing of what he says. Please feel free to help him, if you understand his query. :)
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
-
Naveen wrote:
I think he mean the value in *result
I don't get a thing of what he says. Please feel free to help him, if you understand his query. :)
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
-
Hi to ALL have one doubt regarding with my project . our project goal is to create one user dll(this dll create for VC 2005) and in this dll load another one java platform (via jni compiler.. it is possible) first up all .i was create DLL when i attached this dll in JNI compiler its perfectly running in windows XP (it gives return value '0')but in vista it is also running but it gives the return value '255' for example i give one method to our source :
STDMETHODIMP CFileIO::fileExist(BSTR filePath, BYTE drive, SAFEARRAY* credential, BYTE* result) { *result = (BYTE)-1; // Prepare in case we fail at some point std::string completePath; // Drive and path combinaison try { validateCredential(credential); setPath(filePath, drive, completePath); // Assemble drive and path into complete path. } catch (std::exception& e) { log("fileExist", e.what(), EVENTLOG_ERROR_TYPE); return S_OK; } size_t zz = completePath.rfind("\\"); if (zz < completePath.length()) { std::string dirOnly = completePath.substr(0,zz); DWORD nBufferLength = 1024; // Anything longer would be doubtful TCHAR buffer[1024]; LPTSTR* lpFilePart = NULL; DWORD searchResult = SearchPath( dirOnly.c_str(), completePath.substr(zz+1, completePath.length()).c_str(), NULL, nBufferLength, buffer, lpFilePart ); if (searchResult > 0) { *result = (BYTE)1; } else { *result = (BYTE)0; } } return S_OK; }
#define S_OK ((HRESULT)0x00000000L) #define S_FALSE ((HRESULT)0x00000001L) //in winerror.h This perfectly running in windows XP it gives the return value '0' but in vista it gives the reurn value '255' i need your answer..*****THANKS N ADVANCE**** Mathen.K (I WILL TRY MY LEVEL BEST )
rowdy_vc++ wrote:
i need your answer..
What answer are you looking for? :confused: You are assigning -1 (which is 255 for
unsigned
types) toresult
. :rolleyes: Until it is assigned some other value, it will remain as such."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