|
See if this helps.
"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
|
|
|
|
|
_MANAGED is defined when compiling to CLR.
For example, you can use something like this to force native
compilation in blocks of code:
#if (_MANAGED == 1)
#pragma unmanaged
#endif
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi Mark.
Thanks for reply.
Actually I tried that, it works fine for disabling the UnManaged code but it doesn't work for Managed code.
But I got another solution i.e. also need to include another macro along with _MANAGED,
#if (_MANAGED == 1) || (_M_CEE == 1)
printf_s("compiling with /clr\n");
#else
printf_s("compiling without /clr\n");
#endif
http://msdn2.microsoft.com/en-us/library/468x0ea1(VS.80).aspx[^]
Best Regards,
Mushq
Mushtaque Ahmed Nizamani
Software Engineer
Ultimus Pakistan
|
|
|
|
|
Cool! Thanks for the link
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
i saw a web page
www.hardcoresoft.com
i download and read the demo3 source code.
very good!
it can listen music from server when client connect server!
|
|
|
|
|
And your question is....?
Or are you just trying to advertise to us?
Iain.
|
|
|
|
|
Hi,
Is there an easy way to monitor the number of threads which are currently running within an application.
I have an app that creates and (hopefully) kills worker threads during operation and it would be nice to be able to monitor that there isnt a build up of undestroyed threads over a few weeks of operation.
TIA
Tony
|
|
|
|
|
The Thread Count column in Windows Task Manager should give you what you need, View, Select Columns... to get the dialog to switch it on. There are other Process Viwers out there, some not far from this posting, that may give you more and better particulars on the activity of those threads. If the code source is available you can of course add your own logging to get whatever info you want.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Hi,
Thanks for this. I hadn't realised that "thread count" could be added to the display - thats exactly what I want - and all without having to modify my code!
Thanks again.
Tony
|
|
|
|
|
Do you want to see threads of your program or you want to make this counter for your program?
|
|
|
|
|
Hello everyone,
In Process Explorer and in Perfmon, the page fault are both hard page fault, right? How to get the soft page fault value for a process?
thanks in advance,
George
|
|
|
|
|
Hello!
I have a problem authenticating to an ISA 2006 proxy server using WinHTTP (actually it's a WinHTTP based library, but this doesn't really matter). The proxy has the Digest authentication scheme. I am able to authenticate to the proxy server if I try doing this from within a simple Win32 Console Application. But when I try authenticating from within a Windows service, it just won't work. I copy/pasted the source code from the test application to this service.
I know that the service will never succeed in authenticating to this proxy service, because it runs as SYSTEM, but it doesn't work even if I use the impersonation (ImpersonateLoggedOnUser() etc.)
It works perfectly when the proxy has the Basic authentication scheme set, but when I change it to Digest, I find myself unauthorized to access it...
Can anyone help?
Thanks in advance!
|
|
|
|
|
Hi to all.
If anyone know how to get IP address from host name?
I need to establish FTP connection to web server, and I have URL string, from witch I get host name or IP addres (http://111.11.11.111/... or http://host_name/...). Next I need to find out if it is a IP address or host name (I can do that easily by checking for 3 '.' character, or there is a better or safer way?). If it is a host name I need to get IP address from it so I can make FTP connect!?
Thanks for help in advance.
|
|
|
|
|
|
use the API gethostbyname to get the IP
|
|
|
|
|
I know that!
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.
[my articles]
|
|
|
|
|
It was for more emphasised!
|
|
|
|
|
Thanks for yours replay!
Can I ask for another help.
I connect to web server using FTP and I can't remove dir becauce it is not empty. So I need to loop trough dir and delete all files before?
How I can do that. So far I used CFtpConnection and methods like 'GetCurrentDirectory', 'SetCurrentDirectory' and 'RemoveDirectory'(which returned error saying dir is not empty).
Thanks!
|
|
|
|
|
josip cagalj wrote: So I need to loop trough dir and delete all files before?
Yes. Use CFtpFileFind for this.
"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
|
|
|
|
|
Hi,
I think the following code will help u.
sockaddr_in pAddrTo = (struct sockaddr_in *)&whereto;
memset(pAddrTo,0,sizeof(sockaddr_in));
pAddrTo->sin_family = AF_INET;
pAddrTo->sin_addr.s_addr = inet_addr(m_szDestinationIp);
pAddrTo->sin_port = 0;
if(pAddrTo->sin_addr.s_addr != (unsigned)-1)
{
strcpy(szHostName, m_szDestinationIp);
}
else
{
hp = gethostbyname(m_szDestinationIp);
if (hp)
{
pAddrTo->sin_family = hp->h_addrtype;
memcpy(&pAddrTo->sin_addr.s_addr,hp->h_addr_list[0], hp->h_length);
strcpy(szHostName, hp->h_name);
}
else
{
sprintf(szPingResult,"unknown host %s\n", m_szDestinationIp);
ClosePing();
return szPingResult;
}
}
|
|
|
|
|
Hyperlink text inside balloon tooltip for a taskbar icon and getting the click events of hyperlink. If anybody have experience please help me
Thanks
|
|
|
|
|
This doesn't sound like a Tooltip. This is more like a popup menu or window. It also sounds like you would get into a rather annoying state where the user would be trying to "chase" the hyperlink in the tooltip window before the tooltip window disappeared. If you code a tooltip around that to keep the tooltip window visible until you get off it then you have the problem of access to the screen region under the tooltip.
I would suggest two CP classes: the CXHyperLink class by Hans Dietrich and the CTitleMenu class by Arthur Westerman.
|
|
|
|
|
i know how i do disable "incremental linking" in VC project, but
how do i disable "incremental linking" in my delphi project?
Zo.Naderi-Iran
|
|
|
|
|
This is a discussion board about Visual C++ and MFC. You should post this question on a delphi related board.
|
|
|
|
|
thank you.
but, which discussion board is delphi related board?
Zo.Naderi-Iran
|
|
|
|