|
Hello,
I want to get my computer model name without using WMI.
Model name for example one of the HP's workstation model name is "HP xw4400" i want to get using VC++/MFC program.
Please help.
If it is not possible please suggest some code that uses WMI.
vicky
|
|
|
|
|
I hopeMachine Details[^] link may help you.
Please reply if is it not as expected.
The secret of life is not enjoyment
but education through experience.
- Swami Vivekananda.
|
|
|
|
|
Hello,
Thanks for your help.
Sorry for late reply.
The link suggested by you give detail to get system device details but not system model.
Thanks
Vikas
vicky
|
|
|
|
|
Just use Standard Win32 User/Kernel apis (several ones)
(see on Win32 grp)
|
|
|
|
|
Visual Studio 2008 uses .net framework 3.5 for my application. I hope it uses .net framework. How can I change its version?
This 'targeted platform' option is grey in the project properties.
|
|
|
|
|
You can change that in Project Properties -> Application -> Target Framework.
This is not greyed when I tried it.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
I use Visual studio 2008 Professional version.
microsoft provides inforamtion to choose .net framework version for Visual Studio Team System Architecture Edition at link: http://msdn.microsoft.com/en-us/library/bb675522.aspx .
I can not find the 'Settings and Constraints' in the right click menu.
Which version do you use?
|
|
|
|
|
I also use VS 2008 Professional edition.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
in my appliacation i created two dialog boxes.each dialog box contains two text boxes and one button.if i enter data in two text boxes and click the button the data should be reflected in second dilog box and vice versa .all this should be done using socket programming..please let me know the solution in MFC
kir_MFC
|
|
|
|
|
The previous post was made a few minutes ago, and is still visible on the same page.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
it is visible friends..but i want in MFC..please let me know the solution
kir_MFC
|
|
|
|
|
The most important thing you should realise is that during the night it's usually colder than outside.
Apart from that, try to read (and understand) all the replies you have received so far.
|
|
|
|
|
Hi all,
this is just FYI. A short while ago I posted a (still unresolved) problem about weird timing behaviour under win32.
I now found this interesting article:
http://www.espresso-soft.org/publications/janno_grobbler_etal_saicsit2005.pdf[^]
It describes the troubles I have more scientificly and actually proposes a resolve. The MultiMedia timer structure should be able to break the 15.6ms timing resolution. But sadly, even with the MM timer I get the same trouble. I´ll keep searching.
Souldrift
modified on Thursday, July 9, 2009 10:24 AM
|
|
|
|
|
Use QueryPerformanceFrequency / QueryPerformanceCounter . The resolution is in the microsecond range.
However, if you are trying something that depends on accurate timer intervals (i.e. realtime) then Windows is the wrong OS.
|
|
|
|
|
I know, thanks . The intervals don´t have to be that accurate but I´d generally need time-slices below <= 5ms.
I just wrote a little test program that acts as a millisecond stopwatch, once with Win32 System Timer and once with MM timer. The funny thing is, under Vista OS I find the behaviour described in the paper. 15.6 ms minimum sleep intervals with System timer and 1-2 ms accuracy with MM timer. But under Windows XP both have 15.6 ms, even the MM timer! This thing is driving me crazy ... I almost feel like the computers have actually united to bring down my sanity ...
Souldrift
|
|
|
|
|
Did you use timeGetDevCaps and timeBeginPeriod to query/set the resolution?
I used these functions a loooong time ago and I vaguely remember that you tinker with the driver this way.
|
|
|
|
|
Yes, I did. And it gave me a possible resulution of 1ms ... *&/%$+#^^°*
Souldrift
|
|
|
|
|
Souldrift wrote: And it gave me a possible resulution of 1ms
Which is reasonably accurate but it is at best an approximation. Running your program multiple times will likely produce different results because the amount of data in the cache changes and will thus require more/less CPU cycles to execute.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
If you look up multimedia timers in MSDN, you'll find they're marked obsolete and that you should use TimerQueueTimers instead (remember them?).
As I believe I mentioned before, even when you get round the timer resolution thing, you will not reliably avoid the issue of the Windows scheduler giving another thread a time-slice, so causing you to miss your required time by up to 1 time-slice quantum. The only way you can get that reliability is with a proper real-time operating system, like VxWorks or a real-time Linux. Windows is not designed to give you that reliability - it's designed to give optimum throughput and user responsiveness.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Of course you´re right and I know it´s obsolete (I had actually already TimerQueueTimer implemented). But still MM Timer should work, obsolete or not.
We´re taking a different approach now. Adjusting the client side processing of the data.
The one and only conclusion seems indeed to be that one shouldn´t go with Windows ...
Souldrift
|
|
|
|
|
Souldrift wrote: The one and only conclusion seems indeed to be that one shouldn´t go with Windows
For anything with significant real-time properties, that's pretty much true.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
in my appliacation i created two dialog boxes.each dialog box contains two text boxes and one button.if i enter data in two text boxes and click the button the data should be reflected in second dilog box and vice versa .all this should be done using socket programming..please let me know the solution
kir_MFC
|
|
|
|
|
|
Hello,
I have designed a console application in C++. In the application, I am capturing logoff/shutdown events using SetConsoleCtrlHandler() function. The application is working correctly in Windows 2000 - Windows XP but does not work in Windows Vista/7. Please help.
|
|
|
|
|
Look at status codes being returned - if it works in 2000 and XP, but not Vista or 7, the obvious suggested answer is 'something to do with security'...
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|