歌舞程序

导航

2012年9月5日

判断快捷方式及快捷方式指向的程序

摘要: #include <shlobj.h> HRESULT GetLinkFilePath(HWND hWnd, LPWSTR lpwsLinkName, LPWSTR lpwsLinkPath) { CoInitialize(NULL); IShellLink *pIShellLink = NULL; HRESULT hResult = CoCreateInstance((REFIID)CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, (REFIID)IID_IShellLink,(LPVOID *)&pIShellLink); if 阅读全文

posted @ 2012-09-05 12:44 歌舞程序 阅读(296) 评论(0) 推荐(0) 编辑

获得系统路由表信息

摘要: 该程序用于获取系统的路由信息,,,在删除某条路由记录时,本想通过DeleteIpForwardEntry函数实现,发现需要指定dwForwardPolicy,该字段不是很清楚,因此通过遍历路由表,然后匹配要删除的路由表的目的、网关IP来实现 。#include <Windows.h>#include <stdio.h>#include <IPHlpApi.h>#include "conio.h"#pragma comment(lib, "iphlpapi.lib")#pragma comment(lib, " 阅读全文

posted @ 2012-09-05 12:44 歌舞程序 阅读(491) 评论(0) 推荐(0) 编辑

获取内存使用率等相关信息

摘要: // Use to convert bytes to KB#define DIV 1024// Specify the width of the field in which to print the numbers.// The asterisk in the format specifier "%*I64d" takes an integer// argument and uses it to pad and right justify the number.#define WIDTH 7////memory information///MEMORYSTATUSEX s 阅读全文

posted @ 2012-09-05 12:43 歌舞程序 阅读(206) 评论(0) 推荐(0) 编辑