|
I am trying to notify the user about events of my application by placing an item in his outlook inbox. This has to look just like an e-mail that has arrived via a POP-account. (I cannot send it via POP3 or the like, because the notifications have to be instantaneous.)
Because:
1. this must be read-only. (currently not the case)
2. the user must be able to use the reply function in Outlook. (currently not the case)
Thanks.
|
|
|
|
|
i just want to know how to write ftp programs using win32 C style... also how to write networking programs using win32 api's... so i can upload my files automatically at some specific interval to the server...
|
|
|
|
|
Please have a look at MSDN.
Regards,
Paresh.
|
|
|
|
|
Jayapal Chandran wrote: i just want to know how to write ftp programs using win32 C style
Have a look at this[^] it can be very useful (if you wish to buy it.
And for a FTP server have a look at this[^] (it's free for personal use)
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
Jayapal Chandran wrote: i just want to know how to write ftp programs using win32 C style...so i can upload my files automatically at some specific interval to the server.
How about FtpPutFile() ?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
how to set password to mdb file,programatically..??
thanks in before
|
|
|
|
|
See here.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Is it possible to check how many variable arguments are passed to a function?
Best regards
Hansjörg
|
|
|
|
|
No, when using ellipsis to pass arguments you should always give the number of arguments,
or a way to get them like sprintf.
codito ergo sum
|
|
|
|
|
Have a look here[^].
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
May be that I have missed something. but here I don't can find something about the number of arguments...
|
|
|
|
|
The sample shows how you can implement functions with a variable number of arguments using 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.
|
|
|
|
|
HOw this works I know. But I need a way to know the number of variable arguments. Because if no one are used, I want to optimize the function...it's a lot faster.
Best regards
Hansjörg
|
|
|
|
|
if optimization is your concern, then avoid to use variable number of arguments (or use a mechanism such as the main one, i.e. an array of arguments and its length passed to your function).
BTW, referring to the MSDN sample (link given by Roger Stoltz) [^], nothing prevents you to use the marker to indicate the total number of arguments: does this fit your needs?
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.
|
|
|
|
|
The marker is not so a good was i think...
The problem is that it is not possible to define 2 methods in a class (same name). One with variable length parameter and one without...This would be the best solution for me too...
I want to make a logger class in this way...
class Logger{
void Log(LPCSTR format,...);
void Log(LPCSTR message);
}
something like that. It is easier for the user to have allways the same name...Do you know any solution for that? arrays are also not so good..it's not easy to use...
if not I have to give the function another name....
Best regards
hansjörg
|
|
|
|
|
hansipet wrote: Do you know any solution for that?
No.
BTW, why don't you emulate the behaviour of cout instead of the one of printf ?
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 would be a great solution...but how I can do this?
|
|
|
|
|
The tricky part is customizing the >> operator. Have a look, for instance, at this article http://www.codeproject.com/cpp/Encoder.asp[^].
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.
|
|
|
|
|
Thank you...I will check this..
|
|
|
|
|
If you're using this for logging purposes, why don't use CString::FormatV() ?
Like this:
void <YourClassName>::Log( LPTSTR pText, ... )
{
CString LogText;
va_list args;
va_start( args, pText );
LogText.FormatV( pText, args );
} This would make the function call similar to printf() .
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
I think this is in the MFC library and I don't can use it...
|
|
|
|
|
hansipet wrote: I think this is in the MFC library and I don't can use it...
Ok, then use vsprintf() . See here[^].
It works the same as the CString alternative, but in this case you have to provide the output buffer.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Problem : my hook procedure is not working when the main window losts focus or minimized...
description:
i have written a global hook procedure to track the keystrokes. the hook procedure resides in a dll and i am calling it from the main window. from the dll i am displaying the keycode using a messagebox. it is working globally... then problem is when i tried to write the keypress to a file it is working but when the main window losts focus the keystrokes are not written to the file but it displayed... i tried to pass the value to the main window using WM_COPYDATA but neither of the options helped... i was able to reveice the WM_COPYDATA message in the main window only when the window is active and when my window goes inactive it dosent work... how to solve this... i am using dev C++ ide... i am using C style and not c++ or MFC...what should be done to make the main window always receive messages from the hook procedure???
|
|
|
|
|
Hi to All,
How to manage Bitrate through Programming?
In my application during runtime, I am generating some data & transfering it to (any type of) Output (like IP Output, any type of Output Card, or writting a File). I have done it, but I want to transfer data at particular Bitrate to the Output.
Consider that I am sending generated data to IP, so how I can achieve it's transfer at particular bitrate?
When I was trying to transfer data at 2Mbps OR 3Mbps using MachineCycles & Sleep(1) at getting output bitrate as 749 Kbps with 1% Processing. But when I remove Sleep(1) I am getting out bitrate as 1.9Mbps OR 2.9 Mbps (respectively), with 61% of Procssing.
What is the solution to achieve bitrate transfer with low Processing?
|
|
|
|
|
In my program I've got a base class (all member methods are pure virtual) which a number of classes are derived from. In a seperate class I want to have an array which contains pointers to these classes, i.e. it doesn't create the objects just has a pointer to them. My code loks like this so far:
<br />
class BaseClass<br />
{<br />
public:<br />
BaseClass( ) ;<br />
<br />
virtual<br />
~BaseClass( ) ;<br />
<br />
virtual void<br />
EveryClassNeedsThis ( ) = 0 ;<br />
<br />
private:<br />
BaseClass( const BaseClass &source ) ;<br />
<br />
BaseClass& <br />
BaseClass::operator= ( const BaseClass &rhs ) ;<br />
<br />
} ;<br />
<br />
class DerivedClassA : public BaseClass<br />
{<br />
public:<br />
DerivedClassA ( ) ;<br />
<br />
virtual<br />
~DerivedClassA ( ) ;<br />
<br />
void<br />
EveryClassNeedsThis ( ) ;<br />
<br />
private:<br />
DerivedClassA ( const DerivedClassA &source ) ;<br />
<br />
DerivedClassA & <br />
DerivedClassA ::operator= ( const DerivedClassA &rhs ) ;<br />
} ;<br />
<br />
class ArrayClass<br />
{<br />
public:<br />
ArrayClass ( ) ;<br />
<br />
virtual<br />
~ArrayClass ( ) ;<br />
<br />
void<br />
AddToArray ( BaseClass *obj )<br />
<br />
private:<br />
ArrayClass( const ArrayClass &source ) ;<br />
<br />
ArrayClass& <br />
ArrayClass::operator= ( const ArrayClass &rhs ) ;<br />
<br />
BaseClass *m_DerivedObjects ;<br />
} ;<br />
In the implementation for AddToArray I have
<br />
{<br />
m_DerivedObjects = obj ;<br />
}<br />
but i get an access violation on this, so can anyone spot what I'm doing wrong?
TIA,
Andy
|
|
|
|