Click here to Skip to main content
15,917,702 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: diamond problem and virtual inheritance Pin
laksh220422-Sep-08 23:03
laksh220422-Sep-08 23:03 
QuestionIs there any memory leak in this code? Pin
SRKSHOME22-Sep-08 19:33
SRKSHOME22-Sep-08 19:33 
AnswerRe: Is there any memory leak in this code? Pin
User 21559722-Sep-08 19:53
User 21559722-Sep-08 19:53 
GeneralRe: Is there any memory leak in this code? Pin
SRKSHOME22-Sep-08 20:49
SRKSHOME22-Sep-08 20:49 
GeneralRe: Is there any memory leak in this code? Pin
User 21559722-Sep-08 21:46
User 21559722-Sep-08 21:46 
AnswerRe: Is there any memory leak in this code? Pin
Sarath C22-Sep-08 20:46
Sarath C22-Sep-08 20:46 
GeneralRe: Is there any memory leak in this code? Pin
SRKSHOME22-Sep-08 20:53
SRKSHOME22-Sep-08 20:53 
Questionproblem in copy .exe file Pin
vcprog22-Sep-08 18:56
vcprog22-Sep-08 18:56 
Hi All

I have a problem to copy .exe file.I am useing
GetLastError()

then found error no.32 and 3.
error No. 3 show
The system cannot find the path specified.


And Error no. 32 show
The process cannot access the file because it is being used by another process.


Code is

void On_FileAdded(const CString & strFileName)
{

    USES_CONVERSION;

    CString CStrfilename=strFileName;

    char* charfilename;

    charfilename=CStrfilename.GetBuffer();

    LPCTSTR lp;

    //lp=charfilename;

    lp=CStrfilename;

    PathSkipRoot(lp);

    CString cs = "C:\\Backup\\";
    cs += PathSkipRoot(lp);
    CString st;

//  CopyFile(st, cs,TRUE);
    //AfxMessageBox(st);

if ( CopyFile(strFileName, cs, TRUE) != TRUE)
{
    DWORD dwError = GetLastError();
    CString szMsg;
    szMsg.Format("Error number %d", dwError);
    AfxMessageBox(szMsg);
}
else
{
    AfxMessageBox("Success");
}

    CopyFile(strFileName, cs,TRUE);

}


Plz help me
AnswerRe: problem in copy .exe file Pin
_AnsHUMAN_ 22-Sep-08 19:01
_AnsHUMAN_ 22-Sep-08 19:01 
GeneralRe: problem in copy .exe file Pin
vcprog22-Sep-08 19:22
vcprog22-Sep-08 19:22 
AnswerRe: problem in copy .exe file Pin
Hamid_RT22-Sep-08 19:34
Hamid_RT22-Sep-08 19:34 
GeneralRe: problem in copy .exe file Pin
vcprog22-Sep-08 19:38
vcprog22-Sep-08 19:38 
GeneralRe: problem in copy .exe file Pin
Mahesh Kulkarni22-Sep-08 19:49
Mahesh Kulkarni22-Sep-08 19:49 
GeneralRe: problem in copy .exe file Pin
Hamid_RT22-Sep-08 19:50
Hamid_RT22-Sep-08 19:50 
QuestionRe: problem in copy .exe file Pin
Rajesh R Subramanian22-Sep-08 19:44
professionalRajesh R Subramanian22-Sep-08 19:44 
AnswerRe: problem in copy .exe file Pin
vcprog22-Sep-08 19:47
vcprog22-Sep-08 19:47 
GeneralRe: problem in copy .exe file Pin
Rajesh R Subramanian22-Sep-08 19:56
professionalRajesh R Subramanian22-Sep-08 19:56 
GeneralRe: problem in copy .exe file Pin
vcprog22-Sep-08 20:19
vcprog22-Sep-08 20:19 
GeneralRe: problem in copy .exe file Pin
Hamid_RT22-Sep-08 20:43
Hamid_RT22-Sep-08 20:43 
GeneralRe: problem in copy .exe file Pin
Rajesh R Subramanian22-Sep-08 20:48
professionalRajesh R Subramanian22-Sep-08 20:48 
GeneralRe: problem in copy .exe file Pin
Hamid_RT22-Sep-08 21:34
Hamid_RT22-Sep-08 21:34 
GeneralRe: problem in copy .exe file Pin
vcprog24-Sep-08 0:57
vcprog24-Sep-08 0:57 
GeneralRe: problem in copy .exe file Pin
Rajesh R Subramanian24-Sep-08 1:23
professionalRajesh R Subramanian24-Sep-08 1:23 
GeneralRe: problem in copy .exe file Pin
vcprog24-Sep-08 2:35
vcprog24-Sep-08 2:35 
GeneralRe: problem in copy .exe file Pin
Rajesh R Subramanian24-Sep-08 2:58
professionalRajesh R Subramanian24-Sep-08 2:58 

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.