|
Usman Tasleem Akshaf wrote:
tell me what does UNC stand for and what it its purpose, any link.
UNC == Universal Naming Convention
Here is a link to some info at Microsoft.com
Microsoft.com[^]
Google
Google.com[^]
-------------------------------
|
|
|
|
|
i want to send mail from my program without having email account, and without automation.
is it possible?
raviv yatom
|
|
|
|
|
Sure it is possible.
There are two ways of sendinig an EMail:
1. use a relay server
if you chose this option you you need a SMTP server that does not need authentication. You can use the SMTP-Server that is part of Microsoft's IIS.
2. Send directly to the recipient
Just do a MX DNS lookup on the email adress and then send post the mail directly to the recipients mailserver using SMTP over port 25.
Then you need to create a mime message for the mail you'd like to send. (see rfc 822 for this).
Then you need to deliver the mail. Again two options:
1. if you use the IIS's SMTP server (or any other server that supports a drop directory) you can simply save you message to the mailserver's drop directory (C:\Inetpub\smptroot\pickup). The SMTP server will queue the mail and send it to the recipient.
2. open a connection on port 25 to the recpients mail server, send HELO etc...
An answer for the implementation details of MIME mails and the SMTP protocol would exceed the frame of the forum by far.
But as far as i remember there are good articles on both issues.
/cadi
24 hours is not enough
|
|
|
|
|
|
Hi,
For some reason, if I call multiple sendto's, like this:
sendto(sock, etc etc);
sendto(sock, etc etc);
sendto(sock, etc etc);
Then I have a recvfrom loop threaded on my client side, the recvfrom will often receive all the data from multiple sendto's in one 'big' packet and stuff it all together so I can't parse it correctly. What the hell?? Isn't it possible to send a number of TCP packets right after each other and have them received separately??
Thanks!
Kelly Ryan
|
|
|
|
|
No, because TCP is a streaming protocol.
Because TCP is reliable (in-order and reliable), you can however wait until you have read a certain number of bytes and then assume that is one 'packet'.
For fixed size packets this means you end up with something like
read( packet, sizeof(Packet) )
read( packet, sizeof(Packet) )
And for variable size packets:
read( packetsize, sizeof(long) )
read( packet, packetsize)
read( packetsize, sizeof(long) )
read( packet, packetsize)
As an aside, ::send() and ::sendto() are generally used for UDP, whilst TCP normally only uses ::send()
|
|
|
|
|
Ah, I see.
I think I'll add an 'end character' to the end of my sent packets and parse them on the client end by iterating through char by char and each time I hit an 'end character' I'll treat the part before that as a 'packet'.
Thanks!!
Kelly Ryan
|
|
|
|
|
I want to disable the SAVE toolbutton on the toolbar.
For this I tried the foll in the MainFrame's OnCreate Event.
TBBUTTONINFO buttonInfo;
buttonInfo.cbSize = sizeof( TBBUTTONINFO );
buttonInfo.dwMask = TBIF_COMMAND || TBIF_STATE ;
buttonInfo.idCommand = ID2_FILE_SAVE;
buttonInfo.fsState = TBSTATE_INDETERMINATE ;
int xxx = m_wndToolBar.GetToolBarCtrl().SetButtonInfo(ID2_FILE_SAVE, &buttonInfo);
I wonder I initially got the SAVE toolbutton to grey out .But it wont happen anymore I dont understand why .Now its hidden but clicking it brings the Save Dialog box which means its still not disabled.
In another function I tried to enable it with the foll.code.
TBBUTTONINFO buttonInfo;
buttonInfo.cbSize = sizeof( TBBUTTONINFO );
buttonInfo.dwMask = TBIF_COMMAND || TBIF_STATE ;
buttonInfo.idCommand = ID2_FILE_SAVE;
buttonInfo.fsState = TBSTATE_ENABLED ;
int xxx = m_wndToolBar.GetToolBarCtrl().SetButtonInfo(ID2_FILE_SAVE, &buttonInfo);
But it wont enable .It wont become visible either.I dont understand.Please let me know the mistake.
Thank u .
laiju
|
|
|
|
|
See here[^]
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
thanx for ur help .but the documentation tells to update through update handler. I havent clearly understood how the handler can be associated to a toolbutton.
laiju
|
|
|
|
|
I don't feel like repeating here what the article says, so read the article I linked to and be sure to follow the links in the article, they link to more detail.
Basicly you link the command handler, the command update handle, the command's menu item, the command's toolbar button, the command's toolbar bar button's tooltip text, and the command's status bar text through a common ID number.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
Hi
i want to learn windows graphics programming with mfc or pure api. plz. suggest some good and easy to understand books.
|
|
|
|
|
I wanna know what class and function of that class can help me to get the output of the DOS commands in VC.I wanna get the output(not just see it but to store it in file).Do help.
Thanks.
Be FaithFull To Your Work.
|
|
|
|
|
|
hi
the "Go To Reference" menu item is grayed out in my editor and i cant figure out how to enable it .
Any suggestion?
|
|
|
|
|
Try this[^]
<bold>- Nilesh
<italics>
"Reading made Don Quixote a gentleman. Believing what he read made him mad" -George Bernard Shaw
|
|
|
|
|
Recently I ran across a client using MFC and serializing all thier objects to disk. They have a very large customer base and a huge number of serialized files for the system. This started me thinking about the transition to a 64 bit system. Is anything written to the files when serialized relative to the environement(32 bits, etc), or is it stictly just a binary memory dump( of sorts ) to disk??? If indeed it is just a memory dump, isn't that going to case alot of grief when trying to unserialize(read) the data on a 64 bit system, when the data was written on a 32 bit system and the size of int, float, doubles, etc has changed, or has Longhorn made provisions for this already and allows programs to maintain the 32 bit variable sizes?????
TIA
|
|
|
|
|
Hello,
I am currently writing a wrapper DLL in VC++ 6 so that I can use specific SDK functions from VB .Net. (VB .Net can access the function through "Private Declare Function GetDuration Lib "Path\Wrapper.dll" (parameters)")
In my C++ DLL I need to pass an "HWND" value to an SDK function; however, when I use "AfxGetApp()->m_pMainWnd" the compiler returns two errors:
'AfxGetApp' undeclared identifier<br />
left of '->m_pMainWnd' must point to struct/class/union
Am I trying to retrieve my DLL's "HWND" correctly or is there a better function than "AfxGetApp()" to use in a DLL?
[Edit]
If I use "AfxGetMainWnd()" instead, I only get one error:
'AfxGetMainWnd' undeclared identifier
I am unsure why it says that "AfxGetMainWnd" is an undeclared identifier. [/Edit]
Any help would be greatly appreciated,
Mitch
My sig:
"And it is a professional faux pas to pay someone else to destroy your computer when you are perfectly capable of destroying it yourself." - Roger Wright
Get Perpendicular! (Hitachi Storage)
My CodeProject Blog
Most recent blog post: April 11
|
|
|
|
|
Afx... functions are MFC functions. Add MFC support to your dll and they should work.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
Mitch (Programmer2k4) wrote:
In my C++ DLL I need to pass an "HWND" value to an SDK function; however, when I use "AfxGetApp()->m_pMainWnd" the compiler returns two errors:
In Continuation With Mr Arend, you need a window in DLL too, as there by default no window present in DLL, So AfxGetApp() function is of no use!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
In a bit of assembly code I have seen this code:
JB *+3.
Does it mean a scale of 1 and a displacement of 3. Am I correct? What is the Index register and the Base register? How do I find out what they are. According to documentation there can be a number of registers.
I am the handsome one in the crowd.
|
|
|
|
|
Franz Klein wrote:
I am the handsome one in the crowd.
but not the smartest
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
mailMonty wrote:
but not the smartest
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
I am sorry I am not a genius like you are.
But then again seeing that you cannot answer a simple answer I wonder how smart you are?
I am the handsome one in the crowd.
|
|
|
|
|
Franz Klein wrote:
I am sorry I am not a genius like you are
Hain Franz, I am sorry, I am not laughing at you i am just smiling comment written by Mr. Monty!
It's seems it's hurt you, I am sorry for that
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|