2018年10月8日

Windows API 第 10篇 SearchTreeForFile

摘要: 函数原型:BOOL SearchTreeForFile( PSTR RootPath, //系统查找的起始路径, PSTR InputPathName, //要查找的文件名,可以使用通配符,例如 *.doc PSTR OutputPathBuffer ); //输出参数,查找到以后文件的绝对路径放在 阅读全文

posted @ 2018-10-08 14:57 priarieNew 阅读(584) 评论(0) 推荐(0) 编辑

windows 遍历目录下的所有文件 FindFirstFile FindNextFile

摘要: Windows下遍历文件时用到的就是FindFirstFile 和FindNextFile 首先看一下定义: 阅读全文

posted @ 2018-10-08 14:49 priarieNew 阅读(6210) 评论(0) 推荐(1) 编辑

gethostname gethostbyname gethostbyaddr 获得主机相关信息

摘要: 网络编程里经常需要获得主机的相关信息,下面围绕相关的函数以及用到的结构来说明。 The gethostbyname function retrieves host information corresponding to a host name from a host database. Note 阅读全文

posted @ 2018-10-08 14:39 priarieNew 阅读(486) 评论(0) 推荐(0) 编辑

_itoa _itow _itot atoi atof atol

摘要: 函数原型: Convert strings to double (atof), integer (atoi, _atoi64), or long (atol). 阅读全文

posted @ 2018-10-08 14:28 priarieNew 阅读(561) 评论(0) 推荐(0) 编辑

Window API 第五篇 WTSEnumerateProcesses

摘要: 这个函数可用来枚举系统进程,先来看定义: 阅读全文

posted @ 2018-10-08 14:26 priarieNew 阅读(1742) 评论(0) 推荐(0) 编辑

获取计算机以及本机信息API

摘要: 获取计算机名: 阅读全文

posted @ 2018-10-08 14:21 priarieNew 阅读(1428) 评论(0) 推荐(0) 编辑

Windows API 第二篇 SHGetSpecialFolderPath

摘要: BOOL SHGetSpecialFolderPath( HWND hwndOwner, LPTSTR lpszPath, int nFolder, BOOL fCreate ); 参数解释: hwndOwner:Handle to the owner window the client shoul 阅读全文

posted @ 2018-10-08 13:54 priarieNew 阅读(234) 评论(0) 推荐(0) 编辑

API 练习 第一篇

摘要: 练习API CreateSemaphoreCreateEvent ReleaseSemapWaitForSingleObject CloseHandleInitializeCriticalSectionEnterCriticalSectionLeaveCriticalSectionDeleteCri 阅读全文

posted @ 2018-10-08 11:38 priarieNew 阅读(452) 评论(0) 推荐(0) 编辑

C/C++ 信号量 CreateSemaphore 用法

摘要: #include "stdafx.h"#include <Windows.h>DWORD WINAPI Thread_1(LPVOID param);DWORD WINAPI Thread_2(LPVOID param);DWORD WINAPI Thread_3(LPVOID param);HAN 阅读全文

posted @ 2018-10-08 11:36 priarieNew 阅读(21195) 评论(1) 推荐(0) 编辑

枚举进程,线程,堆 CreateToolhelp32Snapshot

摘要: Takes a snapshot of the processes and the heaps, modules, and threads used by the processes.对当前系统进行一个快照。函数定义:HANDLE WINAPI CreateToolhelp32Snapshot( D 阅读全文

posted @ 2018-10-08 11:34 priarieNew 阅读(781) 评论(0) 推荐(0) 编辑

导航