|
I'm not a great expert, but maybe this article can help:
http://www.codeproject.com/KB/IP/zsmtp.aspx[^]
You'd need to get the basic information (server name) at some point though. But I don't think I'd like an application that was completely stealthily sending emails from me. Who know what they could be saying? I'm sure you are an angel who spends all winter bringing the homeless blankets and dinner [*], but not all people are...
Iain.
[*] Beer smiley to anyone who gets the song quote (without google)
|
|
|
|
|
I feel kind of misunderstanding into your words. Any way I thank you for your attention.
For You ----->
Thank you masters!
|
|
|
|
|
Okay:
Jusef Marzbany wrote: I've posted this once before, but I didn't get my answer. Sorry!
Impatient/ungrateful (perhaps you should be more clear?)
Jusef Marzbany wrote: "without displaying any dialog box from STRANGER applications like outlook express or anything"
Bolding to try and get people's attention (is likely to do the opposite )
Jusef Marzbany wrote: Frankly speaking, I don't wanna fall into reading boring APIs
Lazy.
Hmm.. Looks like you should read the forum posting guidelines and do some work yourself
Regards,
--Perspx
"I've got my kids brainwashed: You don't use Google, and you don't use an iPod." - Steve Ballmer
"Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100mph." - Linus Torvalds
|
|
|
|
|
Answer me if you can, if not your're not forced to say nonsense
Thank you masters!
|
|
|
|
|
I don't think it's nonsense - it may help you to get answers to your questions in the future more easily; you're not forced to listen to my "nonsense" either; I just thought it may be of use.
Regards,
--Perspx
"I've got my kids brainwashed: You don't use Google, and you don't use an iPod." - Steve Ballmer
"Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100mph." - Linus Torvalds
|
|
|
|
|
I beg your pardon, I was angry with someone ...
Thank you masters!
|
|
|
|
|
Jusef Marzbany wrote: Answer me if you can
Actually his post is a valid answer.
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 beg your pardon, I was angry with somebody ...
Thank you masters!
|
|
|
|
|
We have developed one IOCP server Application.
We got a socket close event when client application (safe/unsafe) close.
But when client machine restarts or network cable unplugged we can not get
any event of the socket close.
We have also tried to set socket timeout with setsockopt() ,but its not working with IOCP.
So ,Is there any method to get close event for this sockets? or any other method to set
timeout in IOCP.
Thank you.
|
|
|
|
|
What is an "IOCP server Application"?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
No, IP is not a 'connected' protocol, it just maintains connection state on each side. This is usually considered a feature as it allows recovery from temporary disconnects.
A common solution is to add a heart-beat message to your protocol that the server sends to the client. The heart-beat message basically says 'hey, are your still there? if so please respond to this'. If the client doesn't respond in a timely manner it is assumed that the connection is broken.
See: http://tangentsoft.net/wskfaq/newbie.html#abnormalclose[^]
...cmk
The idea that I can be presented with a problem, set out to logically solve it with the tools at hand, and wind up with a program that could not be legally used because someone else followed the same logical steps some years ago and filed for a patent on it is horrifying.
- John Carmack
|
|
|
|
|
Hi to all.
I have an app which opens Personal Address Book using MAPI. I display info about contacts.
My problem is that I can't get to display business fax number, other properties like display_name is properly shown but fax not. I use virtual CListCtrl to display info, my code is as follows:
after all needed calls to Initialize,Logon,Getting PAB and so on..
LPSPropValue lpDN = PpropFindProp(lpRows->aRow[0].lpProps,lpRows->aRow[0].cValues,PR_BUSINESS_FAX_NUMBER);
lpDN != NULL ? l_strText = lpDN->Value.lpszA : l_strText="";
if(!lpDN)
{
lpDN = PpropFindProp(lpRows->aRow[0].lpProps,lpRows->aRow[0].cValues,PR_BUSINESS_FAX_NUMBER_W);
lpDN != NULL ? l_strText = lpDN->Value.lpszW : l_strText="";
}
if(!lpDN)
{
lpDN = PpropFindProp(lpRows->aRow[0].lpProps,lpRows->aRow[0].cValues,PR_BUSINESS_FAX_NUMBER_A);
lpDN != NULL ? l_strText = lpDN->Value.lpszA : l_strText="";
}
in all this cases my lpDN is NULL!
Why is this happening?
I know my contact has business fax number!
|
|
|
|
|
I'm wondering why nobody replied to my question is it not clear of what?
I would be more than grateful for a suggestion of any kind. I could share more info on this if someone is interested.
This problem is annoying me for days so please help.
Thanks.
|
|
|
|
|
Like virtual memory, when read/write the memory,
if the page is in the memory, there will be little extra overhead .
And if the page is not in the memory, the program will deal with the page fault,
and jump back to re-run the operation that generate the page fault.
Now I'd like to apply this to cache implementation,
I suppose the cache always contains what should be cached.
So if the data is in the cache, it'll run smoothly.
If not, it can jump to prepare the cache and jump back to re-run.
PS: I need this because the cache in my application is the intermediate calculation result,
and it'll be saved in the database for future use (in other words,
it need to be cached only once, so the program runs as smoothly as possible most of the time)
Any good skill to simulate this?
More local variables mean higher cohensive
Less function parameters mean looser coupling
modified on Wednesday, September 24, 2008 10:14 AM
|
|
|
|
|
I m new to VC++ , I have a vc++ mfc application which i want connect with MySQL database.. earlier it dont have any database connectivity. Can anybody guide step by step to connect it to databse. I have installed MySQL 5 on my system n also installed MySQL connector 5.1 .
In my application , added these two lines of code
#include "afxdb.h"
then in a function void OnClickOk()
{
CDatabase db;
int i;
db.OpenEx(_T("Driver={MySQL ODBC 5.1 Driver};Server=localhost;Database=kcc_trades; User=kats;Password=db_logon;Option=3;"));
i = db.IsOpen();
}
but it gives the errors
error C2065: 'CDatabase' : undeclared identifier
1>.\ChangeLimitsForm.cpp(574) : error C2146: syntax error : missing ';' before identifier 'db'
1>.\ChangeLimitsForm.cpp(574) : error C2065: 'db' : undeclared identifier
1>.\ChangeLimitsForm.cpp(576) : error C2228: left of '.OpenEx' must have class/struct/union
1> type is ''unknown-type''
1>.\ChangeLimitsForm.cpp(577) : error C2228: left of '.IsOpen' must have class/struct/union
1> type is ''unknown-type''
and if I put the cursor on CDatabse db; then it shows CDatabase as class and cursor on db shows CDatabase db means memeber ...... also db. shows me the list of available function from which I selected OpenEx....... i mean to say that it identifies CDatabase as class then why it is giving error....
Can anybody help me!!!!!!!!!!
Please I m struggling with these from the last one week.......
thanks
|
|
|
|
|
Are you sure that you included afxdb.h in the right source file (i.e. the one the compiler is complaining about the missing declaration)?
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]
|
|
|
|
|
param_joshi wrote: error C2065: 'CDatabase' : undeclared identifier
You must #include "afxdb.h" as Carlo already pointed out.
param_joshi wrote: Please I m struggling with these from the last one week.......
Gladly you at least tried to resolve it instead of posting urgnz queries.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Yes, i have included "afxdb.h" in the same source file at top and then in the same source file i wrote CDatabase db; when I use this object db and put a dot db. it shows me a list of member function which means it is recongnizing the db object and listing all member functions of the class CDatabase.... but when i compile the source file cntrl+f7 then it gives all the errors...
|
|
|
|
|
If afxdb.h is included, there is no way for this error to pop up. Just verify it again - there's a chance that the file is actually not being included? Wrong path specified for the header files?
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
i m again confirming and copy pasting from the same file .
at top
#include "afxdb.h"
#include "StdAfx.h" // internally defined header
then below under a function
void CChangeLimitsForm:: OkClick()
{
CDatabase db;
int i,j;
db.OpenEx(_T("Driver={MySQL ODBC 5.1 Driver};Server=localhost;Database=kcc_trades; User=kats;Password=db_logon;Option=3;"));
i = db.IsOpen();
...
;
;
;
}
and compling this file with cntrl+f7... it gives these errors
error C2065: 'CDatabase' : undeclared identifier
1>.\ChangeLimitsForm.cpp(574) : error C2146: syntax error : missing ';' before identifier 'db'
1>.\ChangeLimitsForm.cpp(574) : error C2065: 'db' : undeclared identifier
1>.\ChangeLimitsForm.cpp(576) : error C2228: left of '.OpenEx' must have class/struct/union
1> type is ''unknown-type''
1>.\ChangeLimitsForm.cpp(577) : error C2228: left of '.IsOpen' must have class/struct/union
1> type is ''unknown-type''
Also is there any other place where we specify path for headers... my header is already in the same source file .. as wrote above.
|
|
|
|
|
param_joshi wrote: #include "afxdb.h"
#include "StdAfx.h"
A rule is that, you MUST include the pre-compiled header before anything else. Change it like
#include "stdafx.h"
#include "afxdb.h" and it should compile just fine. Any code, or anything before the line #include "stdafx.h" will not be compiled at all. You can type any random junk like 'AL;DSFKL;AS;LDFKL;ASD before the precompiled header inclusion to make sure that that the compiler doesn't care about it.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Yes , it got complied......thanks a lot and a lot...... now i could move further..
|
|
|
|
|
I am glad I was of help.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
yes dear... I looked ur profile ..you have a cute n nice n charming baby!! God bless her
|
|
|
|
|