|
With what? You indicated the error was solved here.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
it is not working in proper way..I debug code then i found cursor not going in this section.Plz help me
[code]
if(DRIVE_REMOVABLE==GetDriveType(szRootpath))
{
WIN32_FIND_DATA FindFileData;
HANDLE hFind;
//Removable dirve lable
std::cout <<"Files in " << szRootpath << std::endl;
szRootpath[3]='*';
hFind=FindFirstFile(szRootpath,&FindFileData);
if (INVALID_HANDLE_VALUE == hFind)
{
return FALSE;
}
do
{
//ignore the sub directories
if (!(FindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
{
std::cout << FindFileData.cFileName << ":";
}
}while (FindNextFile(hFind, &FindFileData) != 0);
FindClose(hFind);
}
}
[/code]
|
|
|
|
|
Make sure that you are in Debug mode, or try putting the break point some where before.
|
|
|
|
|
Yes you are right i am putting the break point some where before.But after the remove the break point then also nothing showing.I use MessageBox(); for check cursor enter in that section or not.Then nothing showing..i mean same result i found..
Can i send you full code.What i use here..
Plz help me
|
|
|
|
|
Plz help me
If it possible then plz i need you help..
Thx's in advance
|
|
|
|
|
How does getting a list of files help with reading data from known files on a USB device?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Ok as i think then it found logical drive then it's show file of USB. Any way if you have different view of this problem then plz give me..
Thx's in advance
|
|
|
|
|
vcprog wrote: Any way if you have different view of this problem then plz give me..
See here.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Has the OS mapped that device to a drive letter?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Application crashes after the call onStart is completed.
Declaration
virtual void OnStartPrgBar();
BEGIN_MESSAGE_MAP(MainFrame, CMDIFrameWnd)
ON_MESSAGE(WM_USER_START_PROGRESS,OnStartPrgBar)
END_MESSAGE_MAP()
void MainFrame::OnStart()
{
Dlg->DoModal();
}
|
|
|
|
|
You've given us very little to go on... Provide details such as:
- The type of exception.
- A stack trace to the exception.
- The source code around the crash.
Steve
|
|
|
|
|
<code></code><pre>void MainFrame::OnStart()
{
THREADSTRUCT5 *_param = new THREADSTRUCT5;
_param->_this = this;
thMPrgBar=AfxBeginThread (StartProgressBarThread, _param);
}
UINT MainFrame::StartProgressThread (LPVOID param)
{
THREADSTRUCT5* ts = (THREADSTRUCT5*)param;
if (ts->_this->popupDlg->DoModal()==TRUE)
{
}
return 1;
}
The crash is only in the Release mode, it is working fine in the Debug mode
|
|
|
|
|
ptr_Electron wrote:
The crash is only in the Release mode, it is working fine in the Debug mode
That doesn't mean you can't use the debugger. First enable debug information for the release build (this should always be done) then simply debug it as normal.
Steve
|
|
|
|
|
5F438D1A call dword ptr [edx+64h] // point of crash , pls advice
---------------------------
Microsoft Visual C++ Debug Library
---------------------------
Debug Assertion Failed!
Program: -----------------------------------.exe
File: afxcmn.inl
Line: 449
For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.
(Press Retry to debug the application)
---------------------------
Abort Retry Ignore
---------------------------
|
|
|
|
|
It sounds like you didn't follow my advice of enabling debug information for the release build. Also you don't mention what version of MFC you're using: there's no reason why line 449 of afxcmn.inl need to the same across different versions of MFC -- you should post the code around the line in your post. In my version of MFC it looks like this:
_AFXCMN_INLINE int CProgressCtrl::StepIt()
{ ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, PBM_STEPIT, 0, 0L); }
If this is the case then it looks like the window no longer exists.
Steve
|
|
|
|
|
ptr_Electron wrote: ...it is working fine in the Debug mode
Doubtful. Bugs are bugs, whether in debug mode or release mode. The problem has likely just been masked by something else.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
ptr_Electron wrote: void MainFrame::OnStart()
{
Dlg->DoModal(); // dialog is displayed and after closing the dialog app. crashes
}
I think you are sending some user defined message and You are not handling WPARAM and LPARAM.
You need to define the parameters even if you are not using them. Just add these parameters and your crash in release mode will be resolved.
void MainFrame::OnStart(WPARAM wParam, LPARAM lParam)
{
Dlg->DoModal();
}
Also dont forget to edit the function declaration in CMainFrame.
Regards,
Sandip.
|
|
|
|
|
Hi frinds
I want to include animations in Dialog based MFC application
please help me in this matter
hassan
|
|
|
|
|
|
|
Hi all,
I have this error:
1>UpdateServiceModule.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) class ATL::CStringT<wchar_t,class ATL::StrTraitATL<wchar_t,class ATL::ChTraitsCRT<wchar_t> > > __cdecl GetProductSiteCode(void)" (__imp_?GetProductSiteCode@@YA?AV?$CStringT@_WV?$StrTraitATL@_WV?$ChTraitsCRT@_W@ATL@@@ATL@@@ATL@@XZ)
1>D:\SVN\Licensin System\Work Package\UpdateManager\Debug\UpdateService.exe : fatal error LNK1120: 1 unresolved externals
I am not sure what the problem is because I have included the CaptureServerCpl.lib ung my solution and have included its directory to where the solution searches for libraries.
Please advise.
Thanks
Jayjay
|
|
|
|
|
monsieur_jj wrote: I am not sure what the problem is because I have included the CaptureServerCpl.lib ung my solution a
The error says that the linker is looking for a function which has a calling convention of __cdecl is it due to this.
Might be that your function has __stdcall but your project specifies a default calling convention of __cdecl .
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
Hi Nibu,
This is how i wrote it at the dll project:
#define DLLEXPORT __declspec(dllexport)
.
.
.
.
class CJJPropertyPage5 : public CPropertyPage
{ DECLARE_DYNCREATE(CJJPropertyPage5)
public:
DLLEXPORT CString GetProductSiteCode(void);
.
.
.
Now this is how I am calling it at my exe:
#define DLLIMPORT __declspec(dllimport)
DLLIMPORT CString GetProductSiteCode(void);
Is there a difference? what seems to be wrong?
Thanks,
Jayjay
|
|
|
|
|
monsieur_jj wrote: DLLIMPORT CString GetProductSiteCode(void);
Change this to the following...
DLLIMPORT CString __stdcall GetProductSiteCode(void);
IMO default calling convention in both projects looks different. This might be causing the problem, though this is just a guess.
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
Hi Nibu,
I have tried that and this is the error i got:
1>UpdateServiceModule.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class ATL::CStringT<wchar_t,class ATL::StrTraitATL<wchar_t,class ATL::ChTraitsCRT<wchar_t> > > __stdcall GetProductSiteCode(void)" (__imp_?GetProductSiteCode@@YG?AV?$CStringT@_WV?$StrTraitATL@_WV?$ChTraitsCRT@_W@ATL@@@ATL@@@ATL@@XZ) referenced in function "public: bool __thiscall redmap::CUpdateServiceModule::DoCheckForProductUpdates(class ns1__Update,struct redmap::RMproduct *)" (?DoCheckForProductUpdates@CUpdateServiceModule@redmap@@QAE_NVns1__Update@@PAURMproduct@2@@Z)
1>D:\SVN\Licensin System\Work Package\UpdateManager\Debug\UpdateService.exe : fatal error LNK1120: 1 unresolved externals
What looks different in both project? Is it an issue if the dll project an MFC project then the exe project is a atl/wtl project?
|
|
|
|