|
when debugging a program,A messagebox pop up--"out of memory";and then the programe faile to do what it is expected to.what's the meaning of the message?
|
|
|
|
|
the meaning ??? -> you write out of the memory. clearly, you write in a memory address which is already allocated for another program an is not "for you".
track the lines where you write into an array for example...
TOXCCT >>> GEII power
|
|
|
|
|
I need an easy way to copy a file from my www-server to my CPU in my MFC-App
For e.g. from:
www.ceco.se/ExistingTxt.txt
To:
C:\ExistingTxt.txt
...and justice for all
APe
|
|
|
|
|
URLDownloadToFile(NULL, "www.ceco.se/ExistingTxt.txt", "C:\\ExistingTxt.txt", NULL, NULL);
or
use
CInternetSession,CHttpConnection ...
It's not a bug, it's an undocumented feature. suhredayan@omniquad.com
messenger :suhredayan@hotmail.com
|
|
|
|
|
see internet api in SDK
Don't try it, just do it!
|
|
|
|
|
Can a nt service running under administrator account interact with desktop.
thanks in advance
|
|
|
|
|
Since services run before the user logs in, you will have to be carefull with what you do. The desktop may not be present when you expect it to be.
It is better to write an application that interfaces with the service and have a GUI less service IMO.
Ant.
|
|
|
|
|
Hi,
Just a quick question.
When writing an application. How do you handle error conditions?
In GDI+ e.g you are performing a series of operations each API call could go wrong.
Do you have a TRACE statement for *every* call you make?
What about Release mode?
Also you might make calls to many nested functions. Do you have an error for each nested call
or do you somehow pass the error up the chain?
How do nicely exit the program if you encounter a fatal error ? And No I dont think PostQuitMessage(0) is a good option.
Regards,
|
|
|
|
|
I have a project and if I rename a file I want to remove it from MRU if it is there,but I don't know how because there is only ID_FILE_MRU_FILE1 to 4.
Thanks.
|
|
|
|
|
Hi t o everyone reading this...
I have noticed that when an EditBox has the option singleline then if u add a notification handling function to it (lets say for the event EN_UPDATE ) and u call SetWindowText inside the function u instantly u receive a second notificatio and again and again.....
If though the EditBox has the option multiline the above behavior does not take place. Insted the notification arrives only once, SetWindowText sets the new text to the EditBox and the notification handling function exits.
Does anybody know why this deference exists? Does it serve a purpose?
In a single line EditBox how can i alter the text typed before it is displayed?
Thanks in advance for helping....
|
|
|
|
|
the winsock function recv and send seem can only send messages,can I use them to transferr a file? (I want to program a trojan backdoor)or I should use other method such as CSocket or ftp?Is there someone so kind to help me and give a detaied explaination?I can't find it in MSDN.
|
|
|
|
|
first of all, a file is just a stream of bytes. so to transfer the file, you need to read all the bytes of the file, and send them down your socket. Most likely, you'd read it in blocks and send the blocks down. eg 2048 bytes. On the other end, you need to be able to put that file back together. so you need to also send down the name of the file.
ftp is much easier. call the ftp process.
ftp -s:filename takes a file with ftp commands
|
|
|
|
|
The answer to your question is to use the CSocket class.
However, know that we do not support virus or trojan programming here. Such actions are considered immoral among legimate programmers. It also might have a negative economical effect on the industry, and as such, it represents everything quite the opposite that this forum and the community behind it are meant for.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
Well I'm trying to get the system time and make it a number. I want to do this so I can later compare the number with another instance of basically the same thing. For those you are wondering I'm trying to write a simple parking garage program. I'm having a hard time making the time a number. Thank you for your help and time.
|
|
|
|
|
Would this function help?
#include <ctime>
time_t time(time_t*);
Maxwell Chen
|
|
|
|
|
I don't think it helped. I will be painfully honest here. I don't exactly understand how to use this function.
|
|
|
|
|
I think what Maxwell Chen means, is that time_t is defined as a number.
You said you wanted the time as a number. It is defined as :
typedef long time_t;
so it is a long and therefore you can treat it as you want to.
|
|
|
|
|
So I would just call time_t? I have an array that I'm trying to store the number in so I can later go back and compare it. In order to accomplish this must I do something like
i is the part of the array I'm using.
array[i] = time_t;
|
|
|
|
|
here is a better example :
#include <ctime>
time_t clock;
time(&clock);
----------------------------------------------------------------
"clock" is a variable of type time_t
time is a function you call to populate the variable "clock"
once you do that, you can do this :
array[i] = clock;
|
|
|
|
|
Both time_t clock and time(&clock) are both included? I'm under the assumption they are part of the header file.
|
|
|
|
|
#include <time.h>
void MyClass::SomeFunction()
{
time_t clock; // this is creating a variable called clock
time(&clock); // calling a function called time
array[i] = clock; // sets the position i of array to the clock value
}
i hope that clears it up a bit for you
|
|
|
|
|
Yes it does. Thank you very much
|
|
|
|
|
wohoo no problem.
Mr Chen was the one that really helped.
|
|
|
|
|
Never Mind. I figured out what I did wrong. Thanx again.
|
|
|
|
|
in CVeh.h at the top of the file,
you should put :
#include <time.h>
does that help at all ? because it looks like it doesn't know where the time function as been defined, and is assuming it is a member function of your CVeh class.
sorry the html here stripped the <time.h> before. give that a go, and see if it helps
|
|
|
|