|
My networking era ended without me actually trying out I/O completion ports.. That's there for years in my to-do list.
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
Best wishes to Rexx[^]
|
|
|
|
|
Once you get the hang of using them, they work extremely well.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thank you for your reply.
Emanuele.
|
|
|
|
|
popacio wrote: I am not sure that this is a good archietecture because with 300 connections my application has become slow.
May be that if i create a separate thread for every connection performance improves ?
I would not recommend creating 300 threads. Your probably not going to gain anything by doing this, context switching will be very high along with increased memory usage. Your bottleneck is using 300 instances of the high level CSocket Class[^]. You would have a tremendous performance gain by using Overlapped I/O and an event based model using i/o completion ports[^]. This would also increase your scalability, in the future your employer may ask you to increase the data logging capability to double the network nodes.
Here is a fairly good read over at MSDN regarding I/O Completion Ports.[^]
Len Holgate has released a free version of his IOCP based, socket server framework[^] if your interested.
There is also the Boost.Asio library by Christopher Kohlhoff[^]. I have used both libraries, they seem to have similar performance although I did not comparatively benchmark them.
Best Wishes,
-David Delaune
|
|
|
|
|
Thank you for yout reply.
Emanuele R.
|
|
|
|
|
Hi,
This app is written in C++ without MFC.
My question is this:
Let's say my app is not full screen, and a user clicks the top bar of the app and drags it around the screen. Is there a windows message that gets sent back to my main app's message pump to tell me when the window is moving? like WM_<somethingorother> etc? I have been looking over MSDN and other documentation and I have not been able to find anything like this but maybe I am missing something.
If it does not send a message, is there any other way that I can tell when the app is being dragged around?
Thanks!
KR
|
|
|
|
|
Are you looking for WM_MOVING[^]?
Best Wishes,
-David Delaune
|
|
|
|
|
That is what I needed, thank you!!!
KR
|
|
|
|
|
My boss asked me to try to fix V studio on one of our computers and I cant find anything on the web thats very helpful. Anytime you try to add a file to a project to errors pop up. The first is the Studio has encountered a problem wih the details.
"AppName: msdev.exe AppVer: 6.0.8168.1 ModName: devshl.dll ModVer: 6.0.8168.0 Offset: 0003eaed"
These second is an application error:
Instruction at "0x73dd11c7" referenced memory at "0x00000004", the memory could not be "read".
Just wondering if anyone else has experienced this problem and new a quick fix, im probably goin to reinstall Visual Studio and see if that works.
|
|
|
|
|
Do you have any 3ed party visual studio addins installed? If yes, try uninstalling them at first.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
|
|
old, but i like vc++ 6.0 since i can transport it on my usb.
I had the same problem and this worked for me. Download visual studio SP6 found here.
http://www.microsoft.com/downloads/details.aspx?FamilyID=A8494EDB-2E89-4676-A16A-5C5477CB9713&displaylang=en[^]
If you have trouble installing it, and it gives you some error about running a 16 bit program, it is because your system is not creating short file names. You can just extract to the C:\ drive to a folder with a really short, no space name, or for a more permanent fix, look here
http://www.cloanto.com/kb/14-131[^]
which pretty much says
If the following value is set to 1 then short file names are not created:
* HKEY_LOCAL_MACHINE\System\
CurrentControlSet\Control\FileSystem\
NtfsDisable8dot3NameCreation=1
If the value is missing, or set to 0, then short file names are created:
* HKEY_LOCAL_MACHINE\System\
CurrentControlSet\Control\FileSystem\
NtfsDisable8dot3NameCreation=0
Also, i had set it to compatibility mode at first which didnt work, and after I updated, this was causing it to still crash. So turn off compatibility mode.
|
|
|
|
|
In a tree control with expanded nodes, Leaf and "Has Lines" structure, I would like to put a bigger icon/bitmap there, but seems like no space there for more than a very small simple icon after the dots...Am I missing something to be able to create more space for a bigger icon, or is it just the way it is?
Thanks
sft
|
|
|
|
|
For CTreeViewCtrlEx, TVM_SETITEMHEIGHT, see <a href="http://msdn.microsoft.com/en-us/library/bb760104(VS.85).aspx">http://msdn.microsoft.com/en-us/library/bb760104(VS.85).aspx</a> 'sets the height of the tree view items'. Possibly this leaves more space?
|
|
|
|
|
Hi,
I have a double value describing rotation angle for a text box object. I need to convert it to quaternion. I have searched the web, and all I get is converters that conver Euler angle to Quaternion.
I would appreciate any formulae or algorithm.
And this double value is the only information I have for rotation.
Regards,
Shoaib
Its never over !
|
|
|
|
|
shaibee wrote: I have a double value describing rotation angle for a text box object. I need to convert it to quaternion.
As far as I know, a quaternion is used in 3D. So how can you convert a double which represents an angle into a 3D rotation ? You need to at least have a rotation around an axis...
|
|
|
|
|
Yes you are right, its to be used in 3D. I am not good in this domain. The docs for that double value say "angle in radians rotated from +ve world x-axis". Does this indicate something ?
update: Now I understand that I need a vector, along with the angle for the conversion, but that vector is no where to seen in the information object for the text box. Is ther anything I can use as default for +ve world x-axis as it says above.
Its never over !
|
|
|
|
|
shaibee wrote: Now I understand that I need a vector, along with the angle for the conversion
If your object is actually existing in 3D space then you should have everything you need. You can create your quaternion as follows:
Quaternion Q;
Q.x = x * sin(Angle/2);
Q.y = y * sin(Angle/2);
Q.z = z * sin(Angle/2);
Q.w = cos(Angle/2);
Best Wishes,
-David Delaune
|
|
|
|
|
I am reminded of when I told a programmer that OpenGL didn't understand "2D". when you deal with 2D references all you are doing is nulling/zeroing the other rotations. If Z is into the screen (a common reference) then heading is your rotation of a window plane clockwise. All other references would be zero. So you can easily use 3D references to modify 2D parameters. If you write your own window compositing display a flip forward would be pitch and flip left/right is roll. you cand do some pretty cool displays.
the hardest part is Euler to quaternion is reference specific. Is +Y out of the screen? is +Z into our out of the screen? so you have to watch your references.
in reality you don't need to choose. If you are using only one view, one rotation, you can fake it by choosing an angle and always using that one for window rotation. You might get into trouble when you try to share, but you will find quaternions pretty lie/mistake proof as long as you are carefully consistant.
I prefer thinkin in top down 3D where window rotation clockwise is Euler heading.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
John Andrew Holmes "It is well to remember that the entire universe, with one trifling exception, is composed of others."
|
|
|
|
|
|
Just part of the 32 bit color depth picture is displayed when my program runs in XP while in win server it is fine.
I made a new MFC application with .net 2005 and all i have done was that i put a picture control on the form and the picture that it displays is a 32 bit color depth
Any solutions????
Thanks in advance
|
|
|
|
|
fire storm wrote: Any solutions????
I don't see a question, only some vague statements. This seems to be the norm on codeproject lately. I would recommend that you clarify your statements and form a proper question. How to get an answer to your question.[^]
Are you referring to the CStatic based picture control available in the VC toolbox? How are you loading/painting the 'picture'? What bitmap format is the picture. Are you loading it from disk or from resource? What API are you using to read bitmap?
Best Wishes,
-David Delaune
|
|
|
|
|
Can you more explain for your problem you have a control(for example static control) and you loaded a picture on it then...?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
My problem: I made
1- A new MFC application (exe) (c++ .net 2005), dialog based.
2- Get from the toolbox a control which is "Picture".
3- Set the type of the control to Bitmap in the property window of the control.
4- Add new bitmap to the resources at which this bitmap is 32 bit color depth picture.
5- Set the Image property of the "Picture" control to the previous Bitmap ID in the
property window of the control.
6- Build and run the application on WinXP and make sure that the appliction is enabling XP theme.
Note to enable it if it is not enabled write this line in "Additional Manifest Dependencies"
in linker node, in Manifest file Node:
type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='X86' publicKeyToken='6595b64144ccf1df' language='*'
When I do all this steps just part of the picture is displayed while if take the application and run it in Win server the picture is displayed perfert.
I hope that explains my problem.
|
|
|
|