'Win32'에 해당되는 글 2건

  1. 2009.03.30 Windows System Information
  2. 2008.12.30 Windows Registry 관련 함수
Windows System Information

The following overviews describe the types of system information available.

Handles and Objects An object is a data structure that represents a system resource, such as a file, thread, or graphic image. An application cannot directly access object data or the system resource that an object represents. Instead, an application must obtain an object handle, which it can use to examine or modify the system resource.
Registry A system-defined database in which applications and the system store and retrieve configuration information.
System Information Retrieves or sets system configuration, settings, version, and metrics.
System Shutdown Logs off the current user, shuts down the system, or locks the workstation.
Time Retrieves or sets the system time.
Time Provider Retrieves accurate time stamps from hardware or the network, and provides time stamps to other clients on the network.

[링크 : http://msdn.microsoft.com/en-us/library/ms725495(VS.85).aspx]

후배가 CPU load를 구하는 방법과 함수를 말해주길래, 한번 찾아 봤더니..
의외의 키워드라서.. 내가 지금까지 검색을 못했던 부분이 나와서 충격 -ㅁ-!

아무튼 CPU load 쪽은 Time에 존재한다. 그 외에 각종 시스템 관련 정보들을 report 하기 위해서는
이쪽 함수들을 사용하면 될듯 하다.
Posted by 구차니

댓글을 달아 주세요

open이 있으면 close가 있는 법. 레지스트리 역시 open / create를 했으면 close를 해주어야 한다.
hKey [in]

A handle to the open key to be closed. The handle must have been opened by the RegCreateKeyEx, RegCreateKeyTransacted, RegOpenKeyEx, RegOpenKeyTransacted, or RegConnectRegistry function.


The handle for a specified key should not be used after it has been closed, because it will no longer be valid. Key handles should not be left open any longer than necessary.

The RegCloseKey function does not necessarily write information to the registry before returning; it can take as much as several seconds for the cache to be flushed to the hard disk. If an application must explicitly write registry information to the hard disk, it can use the RegFlushKey function. RegFlushKey, however, uses many system resources and should be called only when necessary.

[RegOpenKey : http://msdn.microsoft.com/en-us/library/ms724895(VS.85).aspx]
[RegCloseKey : http://msdn.microsoft.com/en-us/library/ms724837(VS.85).aspx]
[RegCreateKey : http://msdn.microsoft.com/en-us/library/ms724842(VS.85).aspx]
[RegDeleteKey : http://msdn.microsoft.com/en-us/library/ms724845(VS.85).aspx]
Posted by 구차니

댓글을 달아 주세요