|
you can't you have to learn how to work with (read/write) binary data. fgets() also is a "string" function.
led mike
|
|
|
|
|
thanks,
then something functions must can work with binary data,
what are them?
for later use!
-- modified at 14:03 Wednesday 20th September, 2006
|
|
|
|
|
Use fread() to read and fwrite() to write binary data.
|
|
|
|
|
OOOOOh ye!
Thank you very much.
i have done with it finally!
Tks.
|
|
|
|
|
It hasn't been mentioned yet (or I didn't see it), but you cannot open the .rar file with notepad. Notepad views only TEXT files, and a .rar file is binary.
You'll need a binary file editor/viewer to see the complete file. (You can open it with Visual Studio in binary mode.
Hope that helps.
Karl - WK5M
PP-ASEL-IA (N43CS)
<kmedcalf@ev1.net>
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
Is that mean i cann't use fputs()/fgets() in this way?
Can i use fread()/fwrite() in binary mode?Or there is another way?
help..
|
|
|
|
|
I met a problem.
I have a server and a client.
Client connect to server. It works and client can send message to server.
But how can I send message from server to client?
I try to let server connect to client, but it says it already connected.
How could I let server send message to client,too?
Can somebody give me an example?
Thanks a lot.
minihotto
|
|
|
|
|
Server can not connect to client. It can - of course send data as a reply but
can not initialize connection. You have to open another port (socket)
to listen. It is mean your application must have both parts - server and client.
(client has to also listen - to be possible to connected it by "server")
viliam
|
|
|
|
|
I have an application that have two threads - listen(recv) & connect(send)
but I can send once, I cant send twice.
|
|
|
|
|
|
I try to download the file. But it's a webpage.
|
|
|
|
|
Yes it is a web page listing articles that contain sample/example Socket code. Please "READ" the web page.
led mike
|
|
|
|
|
Thanks for your help.
It's a stupid question.
I forget to login.><
|
|
|
|
|
Is your server/client system using SOCK_DGRAM or SOCK_STREAM. if you are using SOCK_STREAM then once the connection is accepted using the accept function there should be a socket variable that the client is connected to.
SOCKET server;
//assume already in listen state
SOCKET client = accept(server, ...);
use the client variable to send messages back to the client machine like the following:
send(client, ...);
Chipper Martin
|
|
|
|
|
I've got a standard MFC MDI app, and want to change the "MFC" icon to my own. In resource view, I've tried editing the icon (in VS) changing what file it points to, even deleting the "MFC" icon file - all make it look right in the resource view, but run the app and the "MFC" icon is still there. Is this called out explicitly in code somewhere?
Thanks
|
|
|
|
|
have you changed all the devices in the icon ?
a .ico file have several images of different sizes/resolutions, so if you don't change them all, you'll get strange behaviors ....
|
|
|
|
|
I totally deleted the IDR_MAINFRAME resource and icon file on disk. I then made a new icon by importing a .bmp... clean and rebuild... still the "MFC" icon (I think it's giving me the finger). It must be defined somewhere else or cached or something?
|
|
|
|
|
i think Explorer caches icons. at least, i've had the same problem you describe - the icon doesn't always update in Explorer after i've changed it in the EXE.
i'm not sure how to get it to recognize the new icon. maybe open a new Explorer window ?
|
|
|
|
|
I'm not as concerned about the icon displayed in explorer as much as the one in the upper left corner of the main window of my app...
|
|
|
|
|
the desktop is a part of Explorer.exe, too.
|
|
|
|
|
Did you also delete the project's .res file? In any case, doing a rebuild all should have accounted for the missing/changed .ico file.
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Is there any simple way how to control mouse accross all windows.
I mean, move cursor and do click. (Some macro programs and tutorial presentatin
do so) Some SDK function?
Thank you
Viliam
viliam
|
|
|
|
|
the best way is to use windows hooks.
viliam wrote: (Some macro programs and tutorial presentatin
do so)
these programs mostly use the hooks.
see my article on hooking inside a process
http://www.codeproject.com/useritems/PickIconDlg2.asp[^]
for across process hooking see above article's messages at bottom.
Tanvon
the brain behind ...
I Blog here
|
|
|
|
|
I’ve created a composite control user control using C# (VS 2005). My control appears in the toolbox for all the VS 2005 languages with the exception of VS C++. I have tried adding the VS C++ project to the same solution that I used to build the control. The control shows up in the Choose Toolbox Items dialog under the .NET Framework Components tab. However, when I check the box along side the control name it doesn’t appear in the dialog editor. Please advise.
Thanks
Dave Ricketts
|
|
|
|
|
You probably have to create a managed C++ project to do that.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|