|
Hi all,
i find out the available port on machine using CreateFile function.
i also want to find out these names.
please tell me how can i find out these names here.
thanks in advance.
|
|
|
|
|
This is yet another question that you could try putting to Google. How many times do we need to suggest that?
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
Hi all,
i m using 4 CUIntArray,all are having some values.
i want to find diffrent entries form all array and put in the final output array without repeating tha values.
please tell me how can i do this.
thanks in advance.
|
|
|
|
|
You may:- Implement yourself the algorithm that verifies if the value candidate for insertion is already present in the destination array.
- Use a destination container that provides automatically such a facility, like, for instance the std::set[^].
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
hello guys....im compiling a small program but this error is coming. I dont know where I am missing what? This is MFC generated code. Here is the starting code of the function...AfxEnableControlContainer() is creating all the problem
BOOL CMyApp::InitInstance()
{
AfxEnableControlContainer();
#ifdef _AFXDLL
Enable3dControls();
#else
Enable3dControlsStatic();
#endif
...............
...............
...............
|
|
|
|
|
What is the exact text of your message? If it really is as above then find a reference to the variable or function xxxxx in your source code.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
As mentioned in the original post, AfxEnableControlContainer() is the identifier that is not found. I tried to get definition, declaration and all the references to it but could not find any.
A messagebox pop ups saying "The symbol AfxEnableControlContainer() is not defined/referenced"
|
|
|
|
|
This MSDN page indicates afxdisp.h has the header containing the symbol definition.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
OHHHHHHH....thank you very much, this worked for me.....i have spent alot of time on it but could not find what the reason was.
|
|
|
|
|
You are welcome.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi there,
I have a C++ application on Windows based machine connecting to another Windows based application within a shared network (both servers connected to same firewall router)via TCP socket but time to time the socket goes up and down many times (80- 90 times a day) for couple of seconds I ran ping from both servers to ping each other and there is no problem with the ping, the two application send and receive many messages per second so there is not a single second with no inactivity between the two app. anybody can tell me what could be done to reduce the socket disconnection? One socket is forced to be server and listen on a specified IP and port and the other one is forced to connect as client to the same IP and port.
Any suggestion is appreciated.
Thanks,
Nahitan
|
|
|
|
|
Check the error codes when you detect a disconnect. Depending on your code, you probably will want to use GetLastError or WSAGetLastError, maybe that will shed some light on the issue, also, try logging outgoing and incoming data, maybe you have a bug somewhere and the stream stalls somewhere. Maybe show some code for us to look at.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Leela: Fry, you're wasting your life sitting in front of that TV. You need to get out and see the real world.
Fry: But this is HDTV. It's got better resolution than the real world <
|
|
|
|
|
Thanks for reply, here are some error logs I get:
StoreError API Socket, WSAECONNRESET
Closing socket due to error, Socket index = 0
API Socket, Socket is null. SocketIndex -1 generates invalid socket
Server, socket link not found
API Socket, Connection accepted from 192.168.0.51
all happens in 1-2 seconds
the code is so big can't post in here.
Thanks,
Nahitan
|
|
|
|
|
Which side do you get this? The server or the client? And do you ALWAYS get it on that side?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Leela: Fry, you're wasting your life sitting in front of that TV. You need to get out and see the real world.
Fry: But this is HDTV. It's got better resolution than the real world <
|
|
|
|
|
Server, and I get that on server always, For client as I don't have the code don't know what happens!
Thanks,
|
|
|
|
|
Here[^] you can read the description for WSAECONNRESET:
Connection reset by peer.
An existing connection was forcibly closed by the remote host. This normally results if the peer application on the remote host is suddenly stopped, the host is rebooted, the host or remote network interface is disabled, or the remote host uses a hard close (see setsockopt for more information on the SO_LINGER option on the remote socket). This error may also result if a connection was broken due to keep-alive activity detecting a failure while one or more operations are in progress. Operations that were in progress fail with WSAENETRESET. Subsequent operations fail with WSAECONNRESET.
My guess is that for some reason the client closes the connection (crashes?), or maybe "something" on the machine of the client closes the connection. Does the client maybe generate any log?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Leela: Fry, you're wasting your life sitting in front of that TV. You need to get out and see the real world.
Fry: But this is HDTV. It's got better resolution than the real world <
|
|
|
|
|
On a side note, maybe try experimenting with the socket option SO_KEEPALIVE[^].
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Leela: Fry, you're wasting your life sitting in front of that TV. You need to get out and see the real world.
Fry: But this is HDTV. It's got better resolution than the real world <
|
|
|
|
|
HI,
How can I disbale or hide Maximize button from SDI application?
|
|
|
|
|
Adjust the styles[^] in your CreateWindowEx() call so that the WS_MAXIMIZEBOX value is not included. If you are using MFC then I think you may need to do this within your PreCreateWindow() method in your CMainFrame class.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
Hello Everybody,
I am trying to do like this.
loading a bitmap using Gdiplus and drawing that to a device context.
Bitmap gbmp(bmpFile);
Graphics g(dc.GetSafeHdc());
g.DrawImage(gbmp, x,y, Width, Height);
this is drawing the bitmap fine.
on the same device context, if i am trying to draw colors over the bitmap, then the colors are going backside of the bitmap and the bitmap is showing front.
in mspaint, if i load an image, and draw colors, its spreading the colors over the bitmap. i want to do like that. is there anyway to do that?
if i use BitBlt and SRCAND, then it is working fine, but i need in gdiplus.
Thanks in advance,
A. Gopinath.
|
|
|
|
|
Hi tagopi,
I would suggest that you have a look at the SetColorMatrix function[^] which can be used for RGBA transformations. Here is an example from one of my personal projects:
if(TRUE == m_bDisabled)
{
Gdiplus::ImageAttributes imageAtt;
Gdiplus::ColorMatrix cm =
{
0.299f, 0.299f, 0.299F, 0, 0,
0.587f, 0.587f, 0.587f, 0, 0,
0.114F, 0.114F, 0.114F, 0, 0,
0.0f, 0.0f, 0.0f, 1.0f, 0.0f,
0.0f, 0.0f, 0.0f, 0.0f, 1.0f
};
cm.m[3][3]+=0.01f;
imageAtt.SetColorMatrix(&cm, Gdiplus::ColorMatrixFlagsDefault,Gdiplus::ColorAdjustTypeBitmap);
gScreenBuffer.DrawImage(&memBitmap,Gdiplus::Rect(0, 0, memBitmap.GetWidth(), memBitmap.GetHeight()),0,0,memBitmap.GetWidth(),memBitmap.GetHeight(),Gdiplus::UnitPixel,&imageAtt);
}
This example is used to paint my bitmap in grayscale when a button is disabled.
Good Luck,
-David Delaune
|
|
|
|
|
Hello David,
Thanks for your reply..
This works fine for me, i changed the values as needed by me.
Thanks again.
A. Gopinath.
|
|
|
|
|
Hello,
Can i able to save this image in disk (with the transparency i changed). i tried to save using bitmap.save, it showing black image.
Thanks,
A. Gopinath.
|
|
|
|
|
Hello,
I am a bit of a newbie with C++ and windows programming so I wonder if someone can help.
I am writing an app that needs to capture raw and then via an IPC pass that information on to another process. I have looked at using Global Hooks but unfortunately that are not going to work for me.
So what I want to know is... how do I go about directly receiving input from a USB keyboard into my Win32 C++ application?
Any help would be greatly appreciated.
Thanks
|
|
|
|
|
If your application must intercept keystrokes intended for another process then you've no alternative to hooks.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|