|
Wow, thanks alot.
|
|
|
|
|
Suppose my ISP allows to give more information than normal ISPs does. Like it gives tells the user is their CLI number is wrong or they should connect at another number because this server is having a lot of load. I want my RAS dialer to recognize this stuff. Can I do without having to communicate directly with modem or terminal. What could be the possible way to workout this stuff.
Thanks in Advance.
In my dream, I was dorwning my §orrow§
But my §orrow§, they learned to §wim
|
|
|
|
|
How does it work when I want to send a file through my socket??
I guess I have one clue: I read each byte in the file and send it over to the client from the server. and the client will receive each byte and then make a file with a usual file creating function, such as fopen(...), and the save each byte in that file.
But I'm not sure my clue is working!
I'm NOT using MFC (which is VERY strange to be me! )
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
Hey Rickard
Didn't you get my winsock sample to run yet?
Nish
If I am awake and my eyes are closed, it does not necessarily mean that I am thinking of naked women.
|
|
|
|
|
No
But I've figure it out how it works with multithreaded server anyway now...
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
Basialy ur idea is corret..!! and you must care about stream/datagram and if u can handle the solution in such a way that the handshaking...that s better...if the client send a buffer and waiting for acknowledge and if the acknowledge get ,sene the next ,otherwiese resend the same...
|
|
|
|
|
Holy sh*t!
If you have the new PSDK you can use TransmitFile(...)
Nish
If I am awake and my eyes are closed, it does not necessarily mean that I am thinking of naked women.
|
|
|
|
|
Hi.
I am working on a program using the doc/view architecture. There is basically the program. There is a modeless dialog box where the user enters some information. When the user clicks "Apply" the dialog box sends a message to CMainFrame. From there, CMainFrame sends a message to CChildView. CChildView then draws the information as text inside its area.
I do not know how to send CChildView a message within CMainFrame. I am using the same technique Promises uses in Chapter 8 dialog 2 program (example of modeless). The only difference is he did not implement the program using doc/view. I am. In doc/view I do not know how to send a message from CMainFrame to CChildView because there is not CChildView object defined in CMainFrame:
CMyChildView cView;
cView.PostMessage(WM_MY_MESSAGE, 0, 0)
The code above does not work in doc/view.
I am using the same technique that Promises did. I am not sure if that is the prefer technique in the doc/view architecture. Please mention I should send the message directly from the dialog box to CChildView and how.
Thanks,
Kuphryn
|
|
|
|
|
|
My win32 program is exiting with code 3 (0x3). It seems to run fine, and last week (before I made numerous changes to the application) it was exiting with code 0. My program returns the wParam from a WM_QUIT message. I have dug through the VC++ documentation and came up dry. The only thing that I found was that WinMain (or the wParam value from WM_QUIT) is supposed to exit with 0 on success. Can someone help me decipher what exit code 3 means?
|
|
|
|
|
I found some info in the MSDN Libray and it said to me that there is two functions (I found two): raise() and abort(). They can send a signal to the executing program. And the functions sends a SIGABRT signal to your program it will terminate with exit code 3. And it means then it was an "Abnormal termination".
Did you understand me!?
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
... or it could also be you who have caused the exit code by calling PostQuitMessage(3)... it causes a termination of your app with exit code 3!
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
I think I finally figured it out... I am using VC++ .NET and I get the exit info from the output window. The EXE was exiting with code 3, not the win32 thread of my app (WinMain). I kinda gave up on the exit code 3 thing, and decided to check if my app had any memory leaks. It did. I tracked down the memory leak, ran the program and it exited with code 0. ... So, I think your first post was correct. The program was exiting "abnormally". Thanks.
|
|
|
|
|
it may be due to the way you are exiting the program.
if you use
PostQuitMessage(WM_QUIT)
you should not have any problem
|
|
|
|
|
I am actually exiting with PostQuitMessage (0)... I tracked the problem down to be a memory leak, and the program was exiting with an "abnormal termination" exit code. The memory leak wasnt crashing the program or throwing an exception, which it should have... Thanks.
|
|
|
|
|
Hello:
I have a VC++ 6.0 executable program that only has one screen, such as control panel, it has many buttons and a displayable field. Depending on the buttons pressed, the program reads, validates, generates complex reports of ascii, or access files. Many guys use this program so I installed this in every PC that needs this program. For the other side, I am interested to know about WEB programming and apply the necessary changes to my program so it would not be necessary to distribute it in every PC.
However, because I am a novice, I have the next questions:
1. What things should I consider before modification of in my program so it can be WEB enabled?
2. In which moment should I use a complementary WEB programming languaje such as JAVA?
3. Is there a Web site which could help me more with my case?
Thank you for your help!
|
|
|
|
|
Hi
why does the following function not work:
<br />
static bool bStatus = false;
<br />
void somefunction()<br />
{<br />
bStatus = true;<br />
}<br />
<br />
void main()<br />
{<br />
bStatus = false;<br />
somefunction();<br />
}<br />
<br />
At the "now bStatus should be true, right?" should bStatus be true, but it ISN'T!!! Anyone knows why not? What could it be? In normal C++ (MSVC++) the code above works normally.
But when using the C++ for the C165-board programming language (i use C165 in a mini-robot). As compiler the GNU-CC compiler is used.
|
|
|
|
|
Not knowing anything about C165, i prolly can't help you; the code looks correct to me. But,- How are you checking the value of bStatus? Your comment indicates that you are somehow, but doesn't specify.
- There's nothing "special" about bStatus, is there? I.E. you're not using it in an interrupt handler or something of that sort, right?
Just a side note: it is never correct to declare main() as returning void ; always use int main(); .
Sometimes i only remember, The days when i was young Nowadays no one remembers when they were young and stupid... ADEMA, The Way You Like It
|
|
|
|
|
I check the status of bStatus using the == operator.
No interrupt handler or something modifies the bStatus variable.
Just as a side note: oops, i've written the code snippet only to show the problem. I looked it up. It is int
|
|
|
|
|
Dominik Reichl wrote:
I check the status of bStatus using the == operator.
Hmm, you mean something like this:
if (bStatus == true)
puts("All is well!");
What if you just use:
if (bStatus)
puts("ALl is well!");
Any change?
Sometimes i only remember, The days when i was young Nowadays no one remembers when they were young and stupid... ADEMA, The Way You Like It
|
|
|
|
|
No change.
Both versions do the same: the wrong thing.
Another problem. I tried the following:
<br />
...<br />
static bool bVal = false;
<br />
int main()<br />
{<br />
bVal = false;<br />
bVal = true;<br />
if(bVal == false) puts("Error");<br />
}<br />
and it shows "Error"!!! Something must really be wrong with the compiler...
|
|
|
|
|
That is very odd. If you initialize bVal to true, does it stay true?
...
static bool bVal = true;
int main()
{
bVal = true;
bVal = false;
if(bVal == true) puts("Error");
}
it does sound rather like a compiler bug.
Sometimes i only remember, The days when i was young Nowadays no one remembers when they were young and stupid... ADEMA, The Way You Like It
|
|
|
|
|
Hmm. When i don't declare the variable globally (-> declare it locally in the main() function), it works...
|
|
|
|
|
i am not sure what is in the rest of your code but i would make the following changes.
static bool bStatus = false; // global variable
int somefunction(){////////////make the function int to return values
if (condition){///////////what ever your condition is to turn bStatus true
return true;
}else{
return false;
}
}
void main(){
bStatus = somefunction();//////////////it will now return true or false
}
|
|
|
|
|
I have a save-file from my program so structured:
char id[32];
int blocksize;
:
: <- various data for an amount of 'blocksize' bytes
:
char id[32];
int blocksize;
:
: <- various data for an amount of 'blocksize' bytes
:
char id[32];
int blocksize;
:
: <- various data for an amount of 'blocksize' bytes
:
With a generic number of "DATASET_#"
When I try to load the file, I use code similiar to this:
char id[32];
int blocksize;
FILE* f;
f = fopen(filename, "rb");
while (!feof(f))
{
fread(id,sizeof(char),32,f);
fread(&blocksize,sizeof(int),1,f);
if (strcmp(id,"DATASET_1") == 0)
{
fread( );
}
else if (strcmp(id,"DATASET_2") == 0)
{
fread( );
}
else
{
fseek(f,blocksize,SEEK_CUR);
}
}
fclose(f);
When I do this, the while loop never exits if, for example, the last dataset is unknown, it seems that the fseek() function has no effect on the next "while (!feof(f))" call.
I must take care of something about fseek under NT or WinXP or I must look for an error elsewhere ?
By now, I assume the data to be written well.
Thanks in advance for any suggestion.
|
|
|
|