- 博客(9)
- 资源 (11)
- 收藏
- 关注
原创 windbg script learn
从需求出发:定位一个句柄占用导致的文件无法删除的问题:#include <iostream>#include <string>#include <filesystem>#include <windows.h>std::wstring getlineFromConsole(){ std::wstring strRet; std:...
2020-04-21 00:18:35 563
原创 IUnknown 必须得是虚表中的第一个指针,必须!!!!!!!!深夜发现bug
https://docs.microsoft.com/en-us/windows/win32/api/unknwn/nn-unknwn-iunknownEnables clients to get pointers to other interfaces on a given object through theQueryInterfacemethod, and manage the...
2020-04-18 00:27:41 181
原创 std::function 学习笔记(4)
#pragma oncenamespace MyFunctionNameSpace{// size in pointers of std::function and std::any (roughly 3 pointers larger than std::string when building debug) constexpr int _Small_object_num_ptrs = ...
2020-04-15 10:11:29 314
原创 std::function 学习笔记(3)
下面是我的std::function的阅读笔记:// CLASS TEMPLATE functiontemplate <class _Fty>class function : public _Get_function_impl<_Fty>::type { // wrapper for callable objects // 注意这里,继承的是_Get_funct...
2020-04-14 23:12:15 1060
原创 std::function 学习笔记(2)
隐约知道有个东西叫做std::function,但一直用的习惯的是c 风格函数指针,那么,什么是 std::function呢?这个新东西的应用场景是什么?和函数指针的区别是什么?什么时候该用函数指针,什么时候该用std::function?它潜在的代码的开销是什么?用函数指针初始化,std::function ,会如何呢?现在我们来用std::function 重写上面的函数:...
2020-04-14 00:28:17 324
原创 std::function 学习笔记
隐约知道有个东西叫做std::function,但一直用的习惯的是c 风格函数指针,那么,什么是 std::function呢?这个新东西的应用场景是什么?和函数指针的区别是什么?什么时候该用函数指针,什么时候该用std::function?它潜在的代码的开销是什么?用函数指针初始化,std::function ,会如何呢?1. std::function的 定义:https://zh.cpp...
2020-04-14 00:04:35 406
原创 utf8tows Windows vs2019 c++ 17 有一个意想不到的锁可能影响性能,用的时候,千万小心
#include <iostream>#include <algorithm>#include <vector>#include <iterator>#include <thread>#include <atlstr.h>#include <atlconv.h>#include <casser...
2020-04-11 14:56:29 579
原创 c++ smart_ptr(vs2019 c++ 17) learn 2
#include <memory>#include <iostream>#include <cstdio>#pragma optimize("",off)char* g_temp_test_valid = nullptr;std::shared_ptr<char[]> getMem() { std::shared_ptr<char...
2020-04-05 21:06:04 551 1
原创 c++ smart_ptr(vs2019 c++ 17) learn 1
#include <memory>#include <iostream>#include <cstdio>#pragma optimize("",off)char* g_temp_test_valid = nullptr;std::shared_ptr<char[]> getMem() { std::shared_ptr<char...
2020-04-05 00:01:29 1262
获得鼠标下资源管理器路径(Demo)
2017-02-26
获得鼠标下资源管理器路径
2017-02-25
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人