본문 바로가기

코드/c/c++39

DNS cache 도메인 네임 얻기 typedef struct _DNS_CACHE_ENTRY { struct _DNS_CACHE_ENTRY* next; PWSTRname; USHORTtype; USHORTdata_length; ULONGflag; } DNS_CACHE_ENTRY, *PDNS_CACHE_ENTRY; typedef int(WINAPI *fpDnsGetCacheDataTable)(PDNS_CACHE_ENTRY); int GetDnsCachedDomainName() { PDNS_CACHE_ENTRY entry = (PDNS_CACHE_ENTRY)malloc(sizeof(DNS_CACHE_ENTRY)); HINSTANCE h = LoadLibrary(TEXT("DNSAPI.dll")); fpDnsGetCacheDataTable Dn.. 2012. 12. 20.
[NTSTATUS] Win32 오류 코드 NT 상태 오류 코드 매핑 커널 모드 드라이버를 입/출력 (I/O) 요청 때문에 Win32 하위 시스템에서 호출되면 커널 모드 드라이버에서 반환한 상태 코드가 변환됩니다 상태 코드는 Win32 오류 코드를 해당하는. 다음 표에서는 Windows NT 상태 코드는 Win32 오류 코드는 매핑을 보여 줍니다. WINDOWS NT STATUS CODE WIN32 ERROR CODE ------------------------------------------------------------------ STATUS_DATATYPE_MISALIGNMENT ERROR_NOACCESS STATUS_ACCESS_VIOLATION ERROR_NOACCESS STATUS_DATATYPE_MISALIGNMENT_ERROR ERROR_NOACCESS S.. 2012. 4. 12.
IsWindowUnicode IsWindowUnicode Function Determines whether the specified window is a native Unicode window. Syntax Copy BOOL WINAPI IsWindowUnicode( __in HWND hWnd ); Parameters hWnd [in] Type: HWND A handle to the window to be tested. Return Value Type: BOOL If the window is a native Unicode window, the return value is nonzero. If the window is not a native Unicode window, the return value is zero. The window.. 2011. 4. 7.
time, _time64 Get the system time. Copy time_t time( time_t *timer ); __time64_t _time64( __time64_t *timer ); Parameters timer Pointer to the storage location for time. Return Value Return the time in elapsed seconds. There is no error return. A call to time or _time64 can fail, however, if the date passed to the function is: Before midnight, January 1, 1970. After 19:14:07, January 18, 2038, UTC (using time.. 2010. 11. 24.
키보드 관련 WINAPI In This Section ActivateKeyboardLayout BlockInput EnableWindow GetActiveWindow GetAsyncKeyState GetFocus GetKBCodePage GetKeyboardLayout GetKeyboardLayoutList GetKeyboardLayoutName GetKeyboardState GetKeyboardType GetKeyNameText GetKeyState GetLastInputInfo IsWindowEnabled keybd_event LoadKeyboardLayout MapVirtualKey MapVirtualKeyEx OemKeyScan RegisterHotKey SendInput SetActiveWindow SetFocus Se.. 2010. 10. 28.
enum SYSTEM_INFORMATION_CLASS enum SYSTEM_INFORMATION_CLASS : int { SystemBasicInformation, SystemProcessorInformation, SystemPerformanceInformation, SystemTimeOfDayInformation, SystemPathInformation, SystemProcessInformation, SystemCallCountInformation, SystemDeviceInformation, SystemProcessorPerformanceInformation, SystemFlagsInformation, SystemCallTimeInformation, SystemModuleInformation, SystemLocksInformation, SystemSta.. 2010. 8. 18.