Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Quick StartCreate a new post1$ hexo new "My New Post"
More info: Writing
Run server1$ hexo server
More info: Server
Generate static files1$ hexo generate
More info: Generating
Deploy to remote sites1$ hexo deploy
More info: Deployment
c语言面向对象(使用结构体与函数指针)
[toc]
一、准备c语言结构体使用函数与继承main.c
12345678910111213141516171819202122232425262728293031//main.c#include "stdio.h"typedef int (*Operation)(int a, int b);void fun();typedef struct Animal { int a; Operation opt;}Animal;typedef struct Cat { Animal;}Cat;int main(){ Cat c; c.a = 2; printf("%d\n", c.a); Animal animal; animal.opt = fun; animal.opt(5, 3); animal.opt(5, 3); printf("sfas\n"); return 0;}void fun() ...
一些Nt函数的用法
[toc]
基本函数的用法1.NtOpenProcess123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354#include <windows.h>#include <winternl.h>#include <stdio.h>#pragma comment(lib, "ntdll.lib")typedef NTSTATUS(NTAPI* NtOpenProcess_t)( PHANDLE ProcessHandle, ACCESS_MASK DesiredAccess, POBJECT_ATTRIBUTES ObjectAttributes, CLIENT_ID* ClientId );int main() { // 获取 ntdll.dll 模块句柄 HMODULE ntdll = GetModuleHandleA("n ...
HackingSomeInformation
[toc]
c++ 使用PID获取顶级窗口句柄和标题1234567891011121314151617181920212223242526#include <iostream>#include <Windows.h> using namespace std; int main(){ EnumWindows([](HWND hwnd, LPARAM lParam) { DWORD pid = 0; GetWindowThreadProcessId(hwnd, &pid); if (pid == GetCurrentProcessId()) // 判断pid { char text[1024]; GetWindowTextA(hwnd, (LPSTR)text, 1024); // 必须含有标题文字 if (strlen(text) != 0 && IsWindowVisible(hwnd)) { // printf("%s\n", text); targe ...
c/c++中用结构体作为参数传递给函数
[toc]
c语言中结构体的使用1定义结构体1234567struct Process{ wchar_t* name; int pid; int ppid; wchar_t* path;}_Process;
2使用结构体12345678910111213141516#include <stdio.h>struct Process{ wchar_t* name; int pid; int ppid; wchar_t* path;};int main(int argv, char* argc[]){ struct Process Info = {0}; Info.name = L"cmd.exe"; wprintf(L"name is %s\n", Info.name); return 0;}
3定义结构体的同时赋值123456789101112131415#include <s ...
