|
hi, i have a dll. This dll was be patched a exe. This dll send a code to exe . i wanna change this code . How can i do that ???
DLL Link : http://www.n-protect.com/protect.dll
regards.
|
|
|
|
|
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
nedracix wrote: This dll was be patched a exe. This dll send a code to exe .
Incomprehensible. Please refactor.
"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
|
|
|
|
|
Do you want to hack dll ?
|
|
|
|
|
Hai!
I am creating an XYZ.txt file in my project,
i want that each time the XYZ.txt is created the name must be not simple as XYZ.txt, but it must be XYZ_DATE_TIME.txt
XYZ_27-08-2008_02-12.txt
XYZ_27-08-2008_16-45.txt
|
|
|
|
|
See SYSTEMTIME and GetSystemTime/GetLocalTime to get the time information for a system.
Later you can format the string to your needs using CString::Format()
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
kapardhi wrote: I am creating an XYZ.txt file in my project,
i want that each time the XYZ.txt is created the name must be not simple as XYZ.txt, but it must be XYZ_DATE_TIME.txt
XYZ_27-08-2008_02-12.txt
XYZ_27-08-2008_16-45.txt
You can use functions _strdate_s and _strtime_s for getting time and date as string...
Quickly typed in a function which does this...
CString CreateFileNameWithTimeStamp( LPCTSTR lpctszTitle, LPCTSTR lpctszExtension )
{
CString csFileNameWithTimeStamp = lpctszTitle;
const int BuffSize = 50;
TCHAR szBuff[BuffSize] = { 0 };
_strdate_s( szBuff, BuffSize );
csFileNameWithTimeStamp += "_";
csFileNameWithTimeStamp += szBuff;
_strtime_s( szBuff, BuffSize );
csFileNameWithTimeStamp += "_";
csFileNameWithTimeStamp += szBuff;
csFileNameWithTimeStamp += lpctszExtension;
csFileNameWithTimeStamp.Replace( _T( '/' ), _T( '_' ));
csFileNameWithTimeStamp.Replace( _T( ':' ), _T( '_' ));
return csFileNameWithTimeStamp;
}
How to call?
CString csFileName = CreateFileNameWithTimeStamp( _T( "ABC" ), _T( ".txt " ));
Output looks like...
ABC_08_27_08_14_27_34.txt
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
|
|
|
|
|
You could use COleDateTime::Format() to generate the time stamp. For instance,
COleDateTime DateTime = COleDateTime::GetCurrentTime();
CString TimeStamp = DateTime.Format( _T("%d-%m-%Y_%H-%M"));
CString FileName;
FileName.Format( _T("XYZ_%s.txt"), TimeStamp );
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
There is a class A which is defined like
#include "stdafx.h"
class A
{
public:
A();
~A();
};
static A a;
A::A()
{
int * i = new int[10];
}
A::~A()
{
}
int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}
Is there a memory leak here; The only diff is here we create the object of the class A as static.
|
|
|
|
|
tom groezer wrote: int * i = new int[10];
tom groezer wrote:
Is there a memory leak here; The only diff is here we create the object of the class A as static.
This (*i) should be deleted right?
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
|
|
|
|
|
That is a memory leak by design.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
CPallini wrote: That is a memory leak by design.
Thought that was a typo, was just too obvious to miss out.
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
|
|
|
|
|
tom groezer wrote: A::A()
{
int * i = new int[10];
}
Even though the object is static, its constructor will be called and the memory allocation in constructor is not deleted else where. So its definitely a leak.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Yes just send that code to raise some interest. Now to fix that I did something like this below
I added that delete statement in bold. I guess this should be perfect. Comments.
#include "stdafx.h"
class A
{
public:
A();
~A();
private:
int* i;
};
static A a;
A::A()
{
int * i = new int[10];
}
A::~A()
{
delete[] i;
}
int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}
|
|
|
|
|
tom groezer wrote: I guess this should be perfect. Comments.
perfect.
but a question anyway : why didn't you just test it with your debugger ?
ps: also, please format your posts correctly using <pre></pre> tags when you post code snippets...
|
|
|
|
|
actually I think it is correct but on eof the memory analysis tools complains still the same amount of leak. HENCE the question
|
|
|
|
|
Hi,
I am trying to open a child dialog box on a parent dialog using craete function.
When i click a button on parent dialog i want the child dialog to be closed
How to do it.
I am using mfc.
Thanks In Advance
Dhiraj Kumar Saini
|
|
|
|
|
You have to implement the child dialog as a modeless one, see [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi All
i am geting error like this..
error LNK2019: unresolved external symbol "public: virtual __thiscall CFolderDialog::~CFolderDialog(void)" (??1CFolderDialog@@UAE@XZ) referenced in function "public: void __thiscall CTestDlg::OnBnClickedButton1(void)" (?OnBnClickedButton1@CTestDlg@@QAEXXZ)<br />
1>TestDlg.obj : error LNK2019: unresolved external symbol "public: __thiscall CFolderDialog::CFolderDialog(char const *,char const *,class CWnd *,unsigned int)" (??0CFolderDialog@@QAE@PBD0PAVCWnd@@I@Z) referenced in function "public: void __thiscall CTestDlg::OnBnClickedButton1(void)" (?OnBnClickedButton1@CTestDlg@@QAEXXZ)<br />
1>D:\Users\Mir\Desktop\Test\Test\Debug\Test.exe : fatal error LNK1120: 2 unresolved externals<br />
1>Build log was saved at "file://d:\Users\Mir\Desktop\Test\Test\Test\Debug\BuildLog.htm"<br />
1>Test - 3 error(s), 0 warning(s)
Plz help me
|
|
|
|
|
Did you provide function body for constructor and destructor of CFolderDialog class? Have a look at possible reasons for LNK2019[^] error.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
As the error message shows, you've not included the library (or the object file) containing the CFolderDialog class as Linker input in your project.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
You have declared a constructor and a destructor for the CFolderDialog class, but you haven't defined the functions, i.e. they have no function body.
Or, at least, your linker cannot find them.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Most likely you haven't added FolderDialog.cpp to your project, so it is not being compiled and linked.
Peter
"Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."
|
|
|
|
|
Can you please tell me a method to view the contents of stl::map in watch window, just as we do for stl::vector?]
Thanks in advance,
Shibu
|
|
|
|
|
Found this[^], is it useful for your purpose?
VC8 does list map contents in the debugger, not sure if array index operator will work in the debugger watch window.
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
|
|
|
|