|
pandyapunita wrote: Thank you very much
nave
|
|
|
|
|
can someone tell me how to insert Spanish language on buttons in my MFC aplication in Visual C++ 6.0 and how to type it in code in order to get message boxes in Spanish?
zzz
|
|
|
|
|
|
my platform is xp sp2 and vs2005. I downloaded the lastest platform sdk from microsoft website. But there is no declaration of GetExtendedTcpTable in iphlpapi.h. Then i check the output section of iphlpapi.dll, and there is.
My purpose is to make the program in static link, so i neek the dll link implicitly. Is there only way i use this function by linking the dll explicitly?
Thans for everyone who give me help.
|
|
|
|
|
|
Why you write a message without title
|
|
|
|
|
I don't know why there is another message without title.
I just write a message that you replied. So I really don't know how it happened.
Sorry!
|
|
|
|
|
Maybe you click Post Message before enter subject for your question
|
|
|
|
|
|
for the benefit of other users, here[^] is your post...
|
|
|
|
|
Hi,
I am parsing C files to identify variable usage using lex and yacc.
But I am facing problem regarding macros, since a macro definition may contain some variable name. Since its within body of macro, I am not able to track the variable usage.
So I wanted to know, is there any way we can get this macro preprocessing done so that we have our C file with all macros expanded?
Any thoughts or ideas on this...please let me know
Thanks in advance.
Abhijeet Jadhav
|
|
|
|
|
You can use the /P[^] option with Microsoft compilers.
Steve
|
|
|
|
|
Thanks a lot Stephen!
I think that should work...I will try out this compiler switch.
Abhijeet Jadhav
|
|
|
|
|
I am using a CMap
CMap<cstring,lpcstr,int,int> my_map;
my_map.SetAt("abc",1);
my_map.SetAt("xyz",22);
...
I need this map to be globaly accessible in my application, therefore I am initialising this in a common header file of my application.
But when i compile the coe I get following errors:
: error C2143: syntax error : missing ';' before '.'
: error C2501: 'my_map' : missing storage-class or type specifiers
: error C2371: 'my_map' : redefinition; different basic types
: see declaration of 'my_map'
Any pointers?
|
|
|
|
|
~Worried! wrote: error C2143: syntax error : missing ';' before '.'
: error C2501: 'my_map' : missing storage-class or type specifiers
CMap is declared in afxtempl.h , you need to include that file.
~Worried! wrote: I need this map to be globaly accessible in my application, therefore I am initialising this in a common header file of my application.
In this case, use extern .
In common header,
extern CMap my_map;
And in one on cpp file define it.
i.e.
CMap my_map;
|
|
|
|
|
prasad_som wrote: CMap is declared in afxtempl.h, you need to include that file.
Even then the error does not go.
Actually there is no seperate .cpp file here. This header file contains all the constants etc required in my app. I just want to associate some key-value pairs so that they can be searched some time later in the applicataion.
|
|
|
|
|
~Worried! wrote: CMap my_map;
where is key value pair
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
ThatsAlok wrote: where is key value pair
In the same header file.
|
|
|
|
|
I dont' know how to named the title!
My program is compiled by vc6+sp6+SDK2003 with release mode but have debug information in it
And there is a static member called A(faked name).
And is a instance of class CSite.CSite is inherited from a abstract class.
example:
class Base
{
void virtual int add(int a,int b)=0;
};
class CSite:public Base
{
//blablabla...
};
When debug the program and set a breakpoint at the construtor of the member A.
I found that the vtable pointer was initlialized to NULL.
And of course the program crashed!
I have no idea with this issue!
Can any one who please give me a handle on this!
BTW:there is not anything wrong if I debug the program in debug mode!
Thank you very much!
I must appologise for my poor english,hope you can understand what I said!
-- modified at 23:47 Wednesday 31st January, 2007
Don't look at me in that way!
|
|
|
|
|
Can you show this "A"?
Steve
|
|
|
|
|
A is a static instance of class CSite
<br />
class ISite<br />
{<br />
public:<br />
virtual const char* getSiteName() =0;<br />
virtual bool postRequest() =0;<br />
.....
};<br />
class CSite:public ISite<br />
{<br />
public :<br />
......<br />
}<br />
in some other cpp file,I make a static member like this:
<br />
static CSite defaultSite;<br />
Now I set Optimizations to normal in project setting!But the problem is still there!
Don't look at me in that way!
|
|
|
|
|
Can you show we where the crash occurs? I suspect you are relying on the order of static initialisation.
Steve
|
|
|
|
|
Thank you very much Hewitt!
I think I solved the problem follow your reminder.
now everything is seemed OK!
the class CSite has also some static member,and these member is defined at the 'site.cpp' ,but I define the defaultSite instance at the other cpp file (services.cpp)before!I think this is why I get a error!
Now I move the definition of defaultSite into the 'site.cpp'.
Thank you again for your help!
^_^
Don't look at me in that way!
|
|
|
|
|
I'm having a couple of little problems with a listening socket connection. I've worked with winsock before but that was a long time ago. Essentially this is the procedure.
App-A is the sender,
App-B is the receiver.
App-B is running constantly listening for a connection.
App-A(which is not always running) connects to App-B when required and sends a message, and closes the connection afterwards.
The problem I'm having is this.
if App-A executes too quickly, App-B gets an WSAECONNRESET error on calling "recv"
I can get around this by slowing App-A down with for loops/sleep commands and other such hacks, but would prefer not to do this.
The other problem I get is if App-A abnormally terminates, App-B sits in a loop constantly receiving the last message sent by App-A. This isn't a large concern as I'm deliberately causing App-A to fail as a stress test which is unlikely to occur.
I'm guessing either App-A needs to wait and ensure the message has been received before closing down, or App-B needs to queue messages somehow.
Any tips?
When I die I'd like to go peacefully in my sleep like my father, not screaming in terror like his passengers!!!
|
|
|
|
|
Hi,
are you using multiple sends and recv(s) ?
My idea is that use single send(send whole data) and do multiple recv() fn.
Once recv fn gets all bytes of data, send a single ACK to server. Thereafter you can close your server socket connection.
Bye.
Nice things do nice works
|
|
|
|