⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wpw_w32_sysinfo_95.html

📁 VC programing
💻 HTML
字号:
<HTML>
<HR><A NAME=WIN32_SYS_CPU_NUM>
Return to <a href="wpw_w32_index.html#TOC">Table of Contents for this chapter</a><br>
<H4>Subject: How to get info on number of CPU in system?</H4><PRE>
svalli@digital.net (Steve Valliere) wrote:
>Edmond Underwood <underwoe@Colorado.Edu> wrote:
>
>>How do you determine how many CPU's NT is running on?  This is from a developers
>>perspective of course.  Thanks
>
>Check out the GetSystemInfo function.  It returns the following
>structure:
>
>typedef struct _SYSTEM_INFO 
>{
>    DWORD  dwOemId;
>    DWORD  dwPageSize;
>    LPVOID lpMinimumApplicationAddress;
>    LPVOID lpMaximumApplicationAddress;
>    DWORD  dwActiveProcessorMask;
>    DWORD  dwNumberOfProcessors;
>    DWORD  dwProcessorType;
>    DWORD  dwAllocationGranularity;
>    DWORD  dwReserved;
>} SYSTEM_INFO;
>
>Hope this helps.
>

Perfect!  Thanks.


---------------------------------------------------------------------------------

Edmond Underwood
Systems Management Group
Computing & Network Services (University of Colorado)
E-mail:  underwoe@Colorado.Edu
<HR>
Edmond Underwood <underwoe@Colorado.Edu> writes:

>How do you determine how many CPU's NT is running on?  This is from a developers
>perspective of course.  Thanks

>---------------------------------------------------------------------------------

>Edmond Underwood
>Systems Management Group
>Computing & Network Services (University of Colorado)
>E-mail:  underwoe@Colorado.Edu



Look at the registry.  Count the entries under 
HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\SYSTEM\CentralProcessor.

.b ekiM
</PRE>


<HR><A NAME=WIN32_SYS_WINNT_ENV>
Return to <a href="wpw_w32_index.html#TOC">Table of Contents for this chapter</a><br>
<H4>Subject: Environment Variables in NT doest get update.</H4><PRE>

Lucien Cinc (lcinc@peach.newcastle.edu.au) wrote:
: Greg Nancarrow (greg.nancarrow@hotlinebbs.apana.org.au) wrote:
: : * In a message originally to ALL,  said:

: : I believe that Jeffrey Richter's new book "Advanced Windows" 
: : explains that a special windows message is broadcast when you update 
: : environment variables in Control Panel, so that if you add the 
: : processing for this message to your app it can have its environment 
: : vars updated. .

Found it. Changing the environment sends a WM_WININICHANGE message where
lParam points to the string "environment". The HKEY_CURRENT_USER\Environment
key contains the persistant environment variables and on recieving the
message, all apps should update their environment space.

Very cute and (seems to be) very undocumented!

--
Lucien Cinc (lcinc@cs.newcastle.edu.au)
Author of WinOne, a Super Command Line Shell for Win3.1, WinNT & Win32s

3.1: ftp.cica.indiana.edu:/pub/pc/win3/util/w_one49a.zip & w_one49b.zip
 NT: ftp.springsoft.com:/pub/springsoft/win32/shell/ntcmd64.zip

<HR>
In article <3vet1b$s7b@newsbf02.news.aol.com>,
seaubrey@aol.com (SEAubrey) wrote:
> I've noticed that NT 3.51 seems to "forget" about all environment
> variables that follow the WINNT env. var.  (by following I mean in
> alphabetical order)

The environment variable I lost was "YARN" so you might be onto something,
except for one detail: I can't find the WINNT env. var.! Before I set the
Yarn variable, the last one present is "windir"!

I reported this to MS a week ago or so, but have not received a reply
yet. Strange, they're usually very quick about replying.


=\
 *=- R.Moberg, author of CD-Player Pro! ftp.cica.indiana.edu:
=/                                      /win3/sounds/cdppro45.zip


</PRE>


<HR><A NAME=WIN32_SYS_WINNT_TIMER_RES>
Return to <a href="wpw_w32_index.html#TOC">Table of Contents for this chapter</a><br>
<H4>Subject: timer resolution</H4><PRE>

If you just want a high resolution timer _without_ interrupt/event 
generation you might try the QueryPerformanceCounter function. On an x86 
this has a resolution of under 1us. On a Pentium you can read a processor 
register which counts clock cycles.

Mark Thornton
Optrak Distribution Software Ltd.


</PRE>

<HR><A NAME=WIN32_SYS_WINNT_ISR>
Return to <a href="wpw_w32_index.html#TOC">Table of Contents for this chapter</a><br>
<H4>Subject: How to handle hardware interrupt with win32?</H4><PRE>

S閎astien Plante (plante00@gel.ulaval.ca) wrote:
: The functions SETVECT and GETVECT are not portable to win32.  What should I do 
: to handle hardware interrrupt with win32?

You don't.  Win32 is a hardware-platform independent architecture.
SETVECT/GETVECT are artifacts of x86/DOS.  If you want to handle certain
kinds of exceptions, use the Win32 Structured Exception mechanism.
If you're trying to write a device driver, that's a whole 'nother
ball of wax, and differs radically between Win95 and Win NT.  If you're
trying to control a DOS program, write a DOS TSR for the NT DOS
simulation.  What are you trying to do?

Bernard S. Greenberg
bsg@basistech.com

</PRE>


<HR><A NAME=WIN32_NTFS_SPEC>
Return to <a href="wpw_w32_index.html#TOC">Table of Contents for this chapter</a><br>
<H4>Subject: NTFS specifications</H4><PRE>

Well, NTFS can't be too difficult. Some guy wrote a read-only driver for
linux to access NTFS-formatted drives. Have a look at
http://www.informatik.hu-berlin.de/~loewis/ntfs

(read this a few weeks ago in c.o.m.p.win32)

</PRE> 

</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -