|
sharanu wrote: if(cMailDate <= startDate && cMailDate > endDate)
Of course. it should be
if(cMailDate <big>>=</big> startDate && cMailDate <big>< </big>endDate)
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
|
|
|
|
|
Hi...
startDate =4/1/2008
endDate=4/3/2008
mailDates = 4/2/2008 7:26:33 pm..
my code is..
/////////////////////////////////////////////////////////
if (mailDate > firstDate && mailDate < secondDate)
{
AfxMessageBox("mails are between startDate and endDate");
}
else
{
AfxMessageBox("mails are not between startDate and endDate");
}
///////////////////////////////////////////////////////////
I should get the message as "mails are between stdate and enddate"
I am getting no mails.
thanking you
Hi,,
I am sharan.Working as a software Engineer in Indo-Fuji Software Company located in BTM Layout.Bangalore.India.
I have Completed my B.E(COmputers)in 2006.ANd I am having 2 years of Exp in VC++.
thanking you
sharan
|
|
|
|
|
Sorry, I misunderstood the date formats you're using. if all your dates use the mm/dd/yyyy format (regardless about time) then you've to use always the US format, i.e.
COleDateTime startDate, endDate, mailDate;
DWORD lcidUS = MAKELCID( MAKELANGID( LANG_ENGLISH,SUBLANG_ENGLISH_US), SORT_DEFAULT);
startDate.ParseDateTime(_T("4/1/2008"), 0, lcidUS);
endDate.ParseDateTime(_T("4/3/2008"), 0, lcidUs);
mailDate.ParseDateTime(_T("4/2/2008 7:26:50 pm"), 0, lcidUS);
if ( mailDate >= startDate && mailDate < endDate)
{
}
else
{
}
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
|
|
|
|
|
Hi....
Thank you very very much..Its working fine...
sharan
Hi,,
I am sharan.Working as a software Engineer in Indo-Fuji Software Company located in BTM Layout.Bangalore.India.
I have Completed my B.E(COmputers)in 2006.ANd I am having 2 years of Exp in VC++.
thanking you
sharan
|
|
|
|
|
Hi All,
I am trying to display the total physical memory of my system. I used GlobalMemoryStatus() API. After rounding the value I get 447 MB. But, the system properties show the RAM as 448 MB. Does anyone have an idea why we get such a difference and how it could be overcome?
Thank you,
AJ
|
|
|
|
|
A little test on my system confirms the beahaviour you depicted. Then I found this [^], but I don't know if it is correct.
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
|
|
|
|
|
Thanks a lot!!
|
|
|
|
|
Visual Studio 6 had an Export Makefile option but as I am now using Visual Studio 2005 I cannot find this option, has it gone?
Does anyone know what is the method to generate a Make file if you wnat to port your code from Windows to a Unix platform?
Andy
|
|
|
|
|
Have you tried here?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
When our application is running overnight SaveDC() returns 0. Please let me know the occurances of failing of SaveDC().
|
|
|
|
|
GetLastError [^] may help.
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
|
|
|
|
|
|
still i am unable to solve my problem when I call my dll function
DebugError
-----------
Program:\Project\Test.exe
Module:
File:i386\chkespc.c
Line:42
The value of ESP was not properly saved across a function call.This is usually a result
of calling a function declared with no calling convention with a function pointer declared
with a different calling convention.
Trioum
|
|
|
|
|
Try to post the code, on mondays my CPMRU s battery pack charge is pretty down.
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
|
|
|
|
|
I was wondering if that was just me.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
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
|
|
|
|
|
by lot of R&D I find that This problem is occuring when I am calling
function with arguments i.e.
int function1(int arg)
when I callled the function without arguments no error is occuring
everything is fine i.e.
int function2();
Trioum
|
|
|
|
|
If it is a general issue, i.e. event an empty function give troubles then your calling convention is wrong.
I think you may (if you don't like to post the actual code), at least, post a simple test code that fails on your system.
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
|
|
|
|
|
ok I am sending some piece of code
in my dll my function as follows
extern "C" __declspec(dllexport) void function1();
extern "C" __declspec(dllexport) int function2(int index);
DllMain()
{
}
void function1()
{
// some code
}
int function2(int index)
{
int somevalue
somevalue =index;
return somevalue;
}
now on my applcation.exe
extern "C" __declspec(dllimport) void function1();
extern "C" __declspec(dllimport) int function2(int index);
//function1()
CMyDialog::OnButton()
{
function1();
//no error
}
//Now I called function2()
CMyDialog::OnButton()
{
function2(5);
// Debug error that I already post
}
Trioum
|
|
|
|
|
Why your function definitions don't match function declarations?
Should be
extern "C"
{
__declspec(dllexport) int function2(int index)
{
int somevalue
somevalue =index;
return somevalue;
}
}
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
|
|
|
|
|
I tried this sample.
But i am not getting error if i define just as
int function2(int index){ ...} why?
|
|
|
|
|
Because it is allowed.
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
|
|
|
|
|
Hello Everybody,
I too have a same problem.
[1]having a function ABC(arg1, arg2) in a dll that does not uses MFC.
[2]explicitly loading the dll (through LoadLibrary()).
[3]fetching the address of ABC() by using GetProcAddress(...) and storing it in appropriate function pointer.
[4]calling ABC() through the function pointer.
In DEBUG mode when control reaches the function pointer I get a MessageBox with following message :
The value of ESP was not properly saved across a function call.This is usually a result
of calling a function declared with no calling convention with a function pointer declared
with a different calling convention.
MessageBox does not appears in RELEASE mode.
Regards.
|
|
|
|
|
If it only happens in Debug mode and works correctly in Release then perhaps this compiler bug is causing it.
I believe it only effects VC2002 and VC2003.
http://support.microsoft.com/kb/822039[^]
Best Wishes,
-David Delaune
|
|
|
|
|
Problem solved. !!! !!!
I declared function pointer in following way :
typedef int (_stdcall *PFUN_ABC) (arg1, arg2);
PFUN_ABC pFunABC = (PFUN_ABC) GetProcAddress(hDLL, "ABC");
pFunABC(arg1, arg2);
Now works fine in DEBUG and RELEASE.
Thanks.
Regards.
|
|
|
|