|
Muhamad Hazwan Halim wrote: Is it possible to create a timer so it will send packets to the server every 5 minutes using win32 console application.
Yes. You can use Sleep(300000) for this. When it returns from sleeping, send the packets.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Muhamad Hazwan Halim wrote: How can i make the win32 application console invisible/hide during execution. (the black dos window is invisible)
Why do you need the console window if you are just going to hide it? Maybe you want a windowless application?
|
|
|
|
|
Actually i have receive several opinion from google and also other forums saying that why do i need a console application if we were just going to hide it. Thinking and thinking i still could not understand why. . As for my application here, actually what im trying to do is a software agent which will communicate and send information packets to the server for every 5 minutes. (This is where i need a timer to solve this). So this software agent is located at client side where it must be invisible to the user for security reason. The reason i choose win32 Console application as the client application side (software agent) is because I dont have any intention to put any graphical icon to the application. It is pure text based. So I just wanna hide the dos window (text based) so that user did not even know that the program is running background. Is there any option @ API that can help me accomplish this requirement?
|
|
|
|
|
Hello, i have a problem.
I am currently developing software for several platforms in msvc 7.1. It seems its not possible to add a platform of your own definition by just "adding" it in the configuration manager, only the predefined platforms works, such as Win32, x64, etc. If you type a name of your own in the platform field when creating a new one, you cant select that platform for any of the projects when you want to setup new debug/release configurations for that platform.
Must a new platform somehow be registered with visual studio?
Thanks
Peter
|
|
|
|
|
Well, there's more to a platform choice than a name. It's associated with all sorts of thngs. Which compiler, debugger, virtual machines (ie PDA emulator), etc.
So I think there will have to be all sorts of settings associated with them. Which reinforces your idea about registering a platfrom with VS.
How you do *that* is another question. (For someone cleverer than me).
|
|
|
|
|
Dear Friends,
I m working VC++ where UNICODE is not defined for tht particular application.
I want to display "Name (DownArrow)" as a caption on a control. here Downarrow means the picture of downarrow.
I tried in a following way.
CString s1, s2;
s1 = _T(2193);
s2 = "PickUp" + s1;
But for S1 it is giving me the character with value as 255.
Can anybody help me out?/
I can use painting tht control but i don't want to do that..
Thanks in advance
Megha
|
|
|
|
|
megha_gharote wrote: s1 = _T(2193);
what are you expecting with this ?
|
|
|
|
|
in character map this value corresponds to downarrow.. so i thought by doing
s1 = _T(2193); i m ay get tht value as CString in s1...
|
|
|
|
|
do you know what the _T() macro does ?
it simply prepends a L in front of the string (because you're supposed to pass it a literal string, not an integer) if UNICODE is defined, and does nothing otherwise.
|
|
|
|
|
toxcct wrote: it simply prepends a L in front of the string (because you're supposed to pass it a literal string, not an integer).
Oh no. Prepends nothing in his case.
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.
|
|
|
|
|
OMG, i forgot to finish my sentence ! lol. fixed now
|
|
|
|
|
You're trying to do a pretty weird thing.
Since your application is not set as a UNICODE build, the macro _T expands to nothing and you'll get s1 = (2193) ;
and this shouldn't ever compile.
BTW UNICODE value for down arrow is 0x2193 , i.e. 8595.
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.
|
|
|
|
|
Hi All
is there anyway to stop the Open File - Security Warning from not appearing
when someone first uses my application ?
You can get round this after by remove the tick, in the check box
but i would rather it not appear at all
Can anyone help
Simon
|
|
|
|
|
Which open file security warning?
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
|
Hi Experts,
How can I rename a file thorugh any API.
|
|
|
|
|
You can use of SHFileOperation or rename .
|
|
|
|
|
I used the code below but it does not rename the source file even it creates another file (spacifies in To).
SHFILEOPSTRUCT sfo; <br />
ZeroMemory ( &sfo, sizeof (SHFILEOPSTRUCT)); <br />
sfo.wFunc = FO_RENAME ;<br />
sfo.pFrom = _T("g:\zz.txt\0");<br />
sfo.pTo = _T("g:\pp1.txt\0");<br />
SHFileOperation(&sfo);
|
|
|
|
|
hmmm...
maybe remove the "\0" ?
|
|
|
|
|
pther wrote: sfo.pFrom = _T("g:\zz.txt\0");
sfo.pTo = _T("g:\pp1.txt\0");
Should be:
sfo.pFrom = _T("g:\\zz.txt");
sfo.pTo = _T("g:\\pp1.txt");
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
i have a
CSocket SomeSocket; variable declared globally in a "one.h" file.I have inlcuded this one.h in one.cpp as
#include "one.h"
I used this SomeSocket in another two.h files where i have included the file
#include "one.h"
now i get a linker error stating
two.obj : error LNK2005: "CSocket SomeSocket" (?xst@@3UGlobals@@A)
already defined in one.obj
what was the mistake.
-- modified at 6:54 Friday 30th November, 2007
Adi Vishayam
|
|
|
|
|
You need to put include guards in your header file:
#ifndef YOURFILE<br />
#define YOURFILE<br />
<br />
<br />
#endif
(replace YOURFILE by something unique, like the file name).
You could also use #pragma once for microsoft compiler.
|
|
|
|
|
Cedric Moonen wrote: You could also use #pragma once for microsoft compiler
#pragama once is already added.
problem remains the same.
Adi Vishayam
|
|
|
|
|
you have to declare it extern inside your include file (i.e. "one.h" )
extern CSocket SomeSocket;
and then define once inside a single source file (e.g. in your "one.cpp" ).
CSocket SomeSocket;
The mistake is in your include file: as it stands CSocket SomeSocket is defined in multiple source files.
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.
|
|
|
|