会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
一叶扁舟
2019.08.23 慢慢积累,总会变强大的 2024.07.09 温故而知新 可以为师矣
博客园
首页
新随笔
联系
管理
上一页
1
···
18
19
20
21
22
23
24
25
26
···
39
下一页
2021年1月6日
win32 - 自动开关光驱
摘要: #include <tchar.h> #include <windows.h> #include <mmsystem.h> // for MCI functions // Link to winmm.lib (usually included in project settings) #pragma
阅读全文
posted @ 2021-01-06 18:09 strive-sun
阅读(114)
评论(0)
推荐(0)
2020年12月31日
win32 - Direct3D 11的demo创建
摘要: 我们可以使用D3D为游戏,科学和桌面应用程序创建3-D图形。 非官方demo实例: https://github.com/Ray1024/D3D11Tutorial 当然,我们第一步要开始认识里面的基本api。 #include <d3d11.h> #include <chrono> using n
阅读全文
posted @ 2020-12-31 15:16 strive-sun
阅读(757)
评论(0)
推荐(0)
2020年12月28日
win32 - 从dll中导出api并使用
摘要: 从User32.dll中导出MessageBoxW 代码: #include <Windows.h> #include <iostream> #include <functional> typedef int(__stdcall *MsgBOX) ( HWND hWnd, LPCWSTR lpTex
阅读全文
posted @ 2020-12-28 17:48 strive-sun
阅读(286)
评论(0)
推荐(0)
win32 - 找出占用文件的进程id和name
摘要: 日常文件操作的时候,在删除或者移动某个文件的时候,发现它被某些进程占用了。 那么下面的代码就可以帮助我们找出这些进程的id和name。 原理: 将资源注册到Restart Manager会话。重新启动管理器使用在会话中注册的资源列表来确定必须关闭并重新启动哪些应用程序和服务。 代码: #includ
阅读全文
posted @ 2020-12-28 17:30 strive-sun
阅读(430)
评论(0)
推荐(0)
2020年12月23日
win32 - Rendering a Stream示例
摘要: 仅供参考 文档: Rendering a Stream 代码示例: #include <cstdio> #include <Windows.h> // Windows multimedia device #include <Mmdeviceapi.h> #include <Functiondisco
阅读全文
posted @ 2020-12-23 15:08 strive-sun
阅读(191)
评论(0)
推荐(0)
2020年12月22日
win32 - 将文件的访问权限给特定的用户
摘要: 需要首先获取特定用户的SID。 这是一些步骤, 验证输入参数。 为可能足够大的SID和域名创建缓冲区。 在循环中,调用LookupAccountName以检索提供的帐户名的SID。如果SID的缓冲区或域名的缓冲区不够大,则分别在cbSid或中返回所需的缓冲区大小cchDomainName,并在下一次
阅读全文
posted @ 2020-12-22 14:52 strive-sun
阅读(764)
评论(0)
推荐(0)
2020年12月21日
win32 - 检查权限
摘要: 检查当前句柄是否有指定的权限。 #include <iostream> #include <windows.h> #include <tchar.h> //#pragma comment(lib, "cmcfg32.lib") HANDLE hProcess; BOOL CheckWindowsPr
阅读全文
posted @ 2020-12-21 15:26 strive-sun
阅读(242)
评论(0)
推荐(0)
2020年12月17日
C++ 线程的学习---线程死锁
摘要: 因为是学习篇,写下是为了个人的学习与理解。故参考其他文章为多。 为什么会有死锁? 想象一下这样的情况,thread A 在run的时候需要等待thread B的结果,也就是threadprocA中添加tB.join(), 在thread B的threadProcB中添加tA.join()。结果就是线
阅读全文
posted @ 2020-12-17 15:06 strive-sun
阅读(293)
评论(0)
推荐(0)
C++ 线程的学习---线程同步
摘要: 因为是学习篇,写下是为了个人的学习与理解。故参考其他文章为多。 为什么需要线程同步? 在程序中使用多线程时,一般很少有多个线程能在其生命期内进行完全独立的操作。更多的情况是一些线程进行某些处理操作,而其他的线程必须对其处理结果进行了解。正常情况下对这种处理结果的了解应当在其处理任务完成后进行。 如果
阅读全文
posted @ 2020-12-17 14:52 strive-sun
阅读(276)
评论(0)
推荐(0)
win32 - 虚拟内存的一些介绍
摘要: 对32位Windows来说,其虚拟地址空间总数就是2的32次方,即4GB。 如果没有在引导时加上/3GB或/BOOTVA选项,Windows默认最大会分2GB给内核模式程序使用,2GB给用户模式程序。 其实32位Windows不管系统物理内存有多少,它只会映射这4GB的虚拟地址空间。 也就是说,你不
阅读全文
posted @ 2020-12-17 11:23 strive-sun
阅读(687)
评论(0)
推荐(0)
上一页
1
···
18
19
20
21
22
23
24
25
26
···
39
下一页
公告