Click here to Skip to main content
15,887,464 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: float to int casting [modified] Pin
rp_suman19-Mar-08 4:21
rp_suman19-Mar-08 4:21 
AnswerRe: float to int casting Pin
Rajesh R Subramanian18-Mar-08 22:40
professionalRajesh R Subramanian18-Mar-08 22:40 
GeneralRe: float to int casting Pin
CPallini18-Mar-08 23:15
mveCPallini18-Mar-08 23:15 
Questionhow to insert a spsce between two character when reversed Pin
jasvinder pal singh18-Mar-08 21:33
jasvinder pal singh18-Mar-08 21:33 
AnswerRe: how to insert a spsce between two character when reversed Pin
Rajesh R Subramanian18-Mar-08 22:03
professionalRajesh R Subramanian18-Mar-08 22:03 
AnswerRe: how to insert a spsce between two character when reversed Pin
David Crow19-Mar-08 4:13
David Crow19-Mar-08 4:13 
AnswerRe: how to insert a spsce between two character when reversed Pin
ThatsAlok19-Mar-08 19:53
ThatsAlok19-Mar-08 19:53 
Generalreagarding doubt with our project!! Pin
rowdy_vc++18-Mar-08 19:59
rowdy_vc++18-Mar-08 19:59 
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)<br />
{<br />
*result = (BYTE)-1; // Prepare in case we fail at some point<br />
std::string completePath; // Drive and path combinaison<br />
try<br />
{<br />
validateCredential(credential);<br />
setPath(filePath, drive, completePath); // Assemble drive and path into complete path.<br />
}<br />
catch (std::exception& e)<br />
{<br />
log("fileExist", e.what(), EVENTLOG_ERROR_TYPE);<br />
return S_OK;<br />
}<br />
size_t zz = completePath.rfind("\\");<br />
if (zz < completePath.length())<br />
{<br />
std::string dirOnly = completePath.substr(0,zz);<br />
<br />
DWORD nBufferLength = 1024; // Anything longer would be doubtful<br />
TCHAR buffer[1024];<br />
<br />
LPTSTR* lpFilePart = NULL;<br />
<br />
DWORD searchResult = SearchPath(<br />
dirOnly.c_str(),<br />
completePath.substr(zz+1, completePath.length()).c_str(),<br />
NULL,<br />
nBufferLength,<br />
buffer,<br />
lpFilePart<br />
);<br />
if (searchResult > 0)<br />
{<br />
*result = (BYTE)1;<br />
}<br />
else<br />
{<br />
*result = (BYTE)0;<br />
}<br />
}<br />
return S_OK;<br />
}



#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 )

AnswerRe: reagarding doubt with our project!! Pin
Rajesh R Subramanian18-Mar-08 22:07
professionalRajesh R Subramanian18-Mar-08 22:07 
GeneralRe: reagarding doubt with our project!! Pin
Naveen18-Mar-08 22:18
Naveen18-Mar-08 22:18 
GeneralRe: reagarding doubt with our project!! Pin
Rajesh R Subramanian18-Mar-08 22:38
professionalRajesh R Subramanian18-Mar-08 22:38 
GeneralRe: reagarding doubt with our project!! Pin
Naveen18-Mar-08 22:44
Naveen18-Mar-08 22:44 
QuestionRe: reagarding doubt with our project!! Pin
David Crow19-Mar-08 4:20
David Crow19-Mar-08 4:20 
GeneralELF parser Pin
Ravinder Are18-Mar-08 19:52
Ravinder Are18-Mar-08 19:52 
GeneralRe: ELF parser Pin
CPallini18-Mar-08 22:57
mveCPallini18-Mar-08 22:57 
AnswerRe: ELF parser Pin
JudyL_MD19-Mar-08 2:45
JudyL_MD19-Mar-08 2:45 
QuestionHow do they do that? virutal lan Pin
NovaNuker18-Mar-08 19:34
NovaNuker18-Mar-08 19:34 
GeneralVirtual function design pattern Pin
George_George18-Mar-08 19:18
George_George18-Mar-08 19:18 
GeneralRe: Virtual function design pattern Pin
followait18-Mar-08 20:00
followait18-Mar-08 20:00 
GeneralRe: Virtual function design pattern Pin
George_George19-Mar-08 0:00
George_George19-Mar-08 0:00 
GeneralRe: Virtual function design pattern Pin
CPallini19-Mar-08 0:54
mveCPallini19-Mar-08 0:54 
GeneralRe: Virtual function design pattern Pin
George_George19-Mar-08 1:14
George_George19-Mar-08 1:14 
GeneralRe: Virtual function design pattern Pin
CPallini19-Mar-08 1:31
mveCPallini19-Mar-08 1:31 
GeneralRe: Virtual function design pattern Pin
George_George19-Mar-08 2:30
George_George19-Mar-08 2:30 
GeneralRe: Virtual function design pattern Pin
CPallini19-Mar-08 3:01
mveCPallini19-Mar-08 3:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.