|
Do you have source code of these programs?
|
|
|
|
|
No I haven't. Otherwise there won't be a problem!
|
|
|
|
|
Yes it is possible to modify the environment and/or hook NtOpenFile. But there are probably better solutions which should be tested first.
If the program is writing to its 'working' directory: Have you tried creating a shortcut to the executable and modifying the "Start In" directory?
Best Wishes,
-David Delaune
|
|
|
|
|
Ah cool! Thanks for your advice!
I found what I'm looking for: www.codeproject.com/KB/system/soviet_protector.aspx
|
|
|
|
|
Hi all.
See i am reading certain mails i want to sort them by mailDate in Decresing order...and write into xml..
Now i am reading the mail as it is and writing into xml file...
how i can compare it and write so it will be in ascending order..
for(int y=0; y<(linfo->ACL_STMAIL[0].iMBUserMailCount); y++)
{
_tprintf("\nMails found between %s date and %s date\n",linfo->sStDate,linfo->sEndDate);
mailDatee = linfo->ACL_STMAIL[y].cMBUserMailDate;
mailDatee.Remove('/');
if(linfo->ACL_STMAIL[y].bMBUserMailHasAttachment)
{
AttachCount=linfo->ACL_STMAIL[y].iMBUserMailAttachFileCount;
for(int i = 0;i < (linfo->ACL_STMAIL[y].iMBUserMailAttachFileCount); i++)
{
elementName [0] = "NAME";
elementValue[0] = linfo->ACL_STMAIL[y].cMBUserMailFromName;
elementName [1] = "EMAIl";
elementValue[1] = linfo->ACL_STMAIL[y].cMBUserMailFromEmail;
elementName [2] = "DATE";
elementValue[2] = mailDatee;
elementName [3] = "TITLE";
elementValue[3] = linfo->ACL_STMAIL[y].cMBUserMailSubject;
elementName [4] = "BODY";
elementValue[4] = linfo->ACL_STMAIL[y].cMBUserMailTextDesc;
Hi..
I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++
manju
|
|
|
|
|
Hi..
I am having the date in format..
20080430 8:36:05 and 20080423 13:49:19
I want to compare which is greater...any suggestion..
thank you
manju..
Hi..
I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++
manju
|
|
|
|
|
Well, if you are using COleDateTime, you could use the relational operators ( == , != , < , > , etc.,) [^] of that class. The linked page has an example too.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
|
if the format is always fixed (i.e. there must be two spaces between 20080430 and 8:36:05 in your sample string) then a lexicographic comparison is enough, that means strcmp will do the magic:
const char * date1 = "20080430 8:36:05";
const char * date2 = "20080423 13:49:19";
int icmp = strcmp(date1,date2);
if ( icmp > 0)
{
}
else if ( icmp < 0 )
{
}
else
{
}
On the other hand. If the format is not fixed then you're a (actually not so much: it is fairly easy to repair it) unlucky girl.
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]
|
|
|
|
|
I want to set font of caption of static text control (lebel) in ATL.
|
|
|
|
|
You posted this question yesterday at two different forums and now, again. What's wrong with the answers you got? Reposting/Crossposting is rude and will get you ignored in no time.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Sorry, But i am not getting the proper answer and this is the last time i am doing.
|
|
|
|
|
|
|
How to place pushbuttons using CButton class with the help of Create function on Menubar (not on client window) . Is there any posibility? Try to help me pl.
k.sreedevi
|
|
|
|
|
sreedevi kolli wrote: Is there any posibility? Try to help me pl.
Have a look at CDialogBar class, quite easy to use! Will not be on the menubar though, will act as a toolbar.
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
modified on Friday, June 20, 2008 5:21 AM
|
|
|
|
|
There seem to be no mfc function for copying entire directory.
The closest match is MoveDirectory() which will result in one copy of the folder being moved.
Is there any way to do that?
|
|
|
|
|
Do you want to copy files if yes see SHFileOperation .
|
|
|
|
|
Hi
how to get the export function list in dll
i think there is some option in command promt
thanks
shakumar
shakumar
|
|
|
|
|
shakumar_22 wrote: i think there is some option in command promt
There is DUMPBIN command line tool [^].
You may also use, for instance, Dependecy Walker GUI tool [^].
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,
I have curve data into an array and I need to apply a low-pass filter (Bessel and Butterworth) on it.
The sampling rate of my data is not constant (for example, I get a value at 1s, then 1.2s, then 1.8s...).
As I said, the curve data are in an array, and the corresponding timestamps are in another :
double time[] = { 1.0, 1.2, 1.8, ... }
double value[] = { 3.1, 4.4, 5.0, ... }
By reading wikis and web sites, it seems that applying a low-pass filter will attenuate the high frequencies (i.e. higher that the cutoff frequency). The attenuation will depend of the type of the filter (Bessel, Butterworth, ...) and its order.
Please tell me if I am wrong!
In other words and in my case, if I have two timestamps which are "to close" (for example : 1/(time[1]-time[0]) > cutoff), I need to modify the corresponding value (value [1]). The new value will be given by the transfer function (which depends, again, of the type of the filter and its order).
Is that right or I am totaly lost ?
If all of this is right, then, how to get the new value ? Taking a look to wikipedia tells me a lot about bessel/butterworth transfer functions, but I do not understand how to apply them.
Could someone provide me an algorithm ?
If all of this is wrong, then, could you please correct me ?
Thanks in advance.
|
|
|
|
|
Possibly this page [^] may help (see reference to Numerical Recipes in C).
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
|
|
|
|
|
Well, thanks for the answer, but Numerical Recipes does not seems to respond to my problem.
|
|
|
|
|
[ Quote ]
it seems that applying a low-pass filter will attenuate the high frequencies (i.e. higher that the cutoff frequency). The attenuation will depend of the type of the filter (Bessel, Butterworth, ...) and its order. Please tell me if I am wrong!
[ /Quote ]
No, you are right. As I told you in the other post (sorry for the delayment, I was away for some days)
[ Quote ]
if I have two timestamps which are "to close" (for example : 1/(time[1]-time[0]) > cutoff), I need to modify the corresponding value (value [1]).
[ /Quote ]
I think you are not having the idea. The filters are to be used with the frecuency of the signals you need to process, but have nothing to do with the timestamps where you are getting the values. Let's try with a example:
......./ \............./ \............../
......|..|............|..|............|
......|..|............|..|............|
...../....\........./....\........../
..../......\......./......\......../
.../........\...../........\....../
../..........\.../..........\..../
.|............|..|............|..|
.|............|..|............|..|
/..............\/.............\/
You have a signal like that for example. With the Fourier theoreme you can separate the signal into different ones (sinus-signal) which addition will be the original.
The result can be one sinus very thin but taller and other one with more width but shorter.
That means, one signal has more frecuency (the thin one) and more amplitude (vertical size) than the other. If you apply a low-pass filter, depending on which one, its cut-off frecuency and its order you will have a different result. Let's say that the "taller" signal is 150Hz and the shorter one is 50Hz. If your cuttoff frecuency is 60Hz then your result will be a signal quite similar to the second signal that compose the example drawn. It won't be exactly the same because the "taller" signal won't be totally filtered, but quite attenuated (so its vertical size will be much lower).
How much does a filter attenuate? If I remember ok it was a "fixed" order-related rate. For filters of first order the attenuation was 20 db, for second order was 40db and so on. This is easier to see in BODE-Diagramms (remember my last answer?)
first order
-----------
............\
..............\
................\
..................\
....................\
second order
-----------
............\
.............\
..............\
...............\
................\
Both have the same cuttof frecuency (the point where the ramp begins), but the order is the ramp inclination, for 1st order is 20db/dec and for 2nd order is 40db/dec (dec = decade???? "decada" on spanish)
So... turning back to your question...
"if I have two timestamps which are "to close" (for example : 1/(time[1]-time[0]) > cutoff)" this has nothing to do with the frecuency of the signal, this are the time between two measures. Frecuency is the time that the signal needs to be in the same value in the same conditions two times (red marked in my example function). That means, same value (for example 1.2) both going upwards. Then is valid what you say "frec = (1 / (time [1] - time [0]))" and that should be compared with the cutoff frecuency.
But another time a problem. This is only valid for pure signals "sinus-cosinus", "triangle", "square"... if you have signals with "strange" forms... you will need to apply fourier to separate it into different pure signals of different frecuencies. Then apply the filters and see how each component is going to be affected, and remount the end result with the addition of their curves.
About the algorithm... sorry but it is not so easy, it depends on many factors so there is no possible easy "general" application to be given. You will need to investigate and to make it fit your needs.
A tip... Matlab has already implemented some things that can be usefull for you. For example, giving timestamps arrays and values it draws the graphic. With the graphic (if the signal is not very complicated) you will easily get the transfer function. You can "easily" (when you know how) transform to bode-diagramms or apply fourier.
P.S. I am seeing it from the electrical perspective. I mean, I can be wrong in focusing the solution from the "informatic side" but concepts are concepts, and you seem to be a bit lost with them.
Hope it helps
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Ok.. I think my problem is a little more complex than expected !
In fact, what you say remember me a lesson I had few years ago... I will dig into it and see what I can do.
Thanks again for your help.
|
|
|
|