|
[讨论]关于获取系统关机信息
什么关机信息?你想获得什么?白话一点吧 |
|
[原创]文件(文件夹)加密解密工具
楼上V5!如你所说!!! |
|
[原创]文件(文件夹)加密解密工具
这些天查找资料终于知道了像WINRAR,360之类的右键系统菜单前面都有一个图标是如何弄出来的,涉及到了WINDOWS shell 扩展编程方面的内容。 |
|
[求助]关于WINDOWS核心编程中句柄方面的一点疑惑?
如你所说,昨天调试才发现确实是hFile2的值跟hFile1一样导致pb的内容相同,已经OK了。第二个问题看了你的解释也明白了,0xF0000020确实是个内核地址,所有进程都可以访问到的,疑惑也就彻底消除了,thanks very much! |
|
[求助]关于WINDOWS核心编程中句柄方面的一点疑惑?
感谢形象生动加风趣回答!特别说明一下,我家没有保险柜的 你说的测试1只能看到句柄,但是根本无法使用,使用ReadFile来读取hFile2是不可能成功的,这里好像有点问题吧,因为上述代码我测试,确实能读取出来文件中的前10个字节的,从0-9前面10个字节的。 再次翻了一下书对DuplicateHandle的说明:书上说这个函数获得一个进程的句柄表中的一个记录项,然后在另一个进程的句柄表中创建这个记录项的一个副本。请问这里的副本该如何理解呢? 就以如下的例子来分析吧: 假如进程S创建了一个文件内核对象,他的句柄表如下: 进程S的句柄表 索引 指向内核对象内存块的指针 访问掩码 标志 1 0x00000000 (不可用) 不可用 2 0xF0000020(文件内核对象) 0x???????? 0x00000000 现在利用duplicatehandle复制句柄到进程T中,假如复制到T之前T的句柄表如下: 调用DuplicateHandle之前,进程T的句柄表 索引 指向内核对象内存块的指针 访问掩码 标志 1 0x00000000 不可用 不可用 2 0xF0000030 0x????? 0x00000000 调用DuplicateHandle之后,进程T的句柄表: 索引 指向内核对象内存块的指针 访问掩码 标志 1 0xF0000020(是文件内核对象的地址吗?) 0x??? 0x00000001(1?) 2 0xF0000030 0x??? 0x00000000 以上是核心编程第三章中的一些说明,针对上述说明有一些疑问: 疑问1 :复制的副本就是指指向内核对象内存块的指针?标志怎么变成1了?这个还算是副本吗?已经变化了嘛? 疑问2:仅仅把指向内核对象内存块的指针原模原样的复制到进程T的句柄表中为什么进程T就能访问此文件了。我们从小受的教育就是进程是相互独立的,每个进程有属于自己独立的4G地址空间,哦,抱歉,内核对象不是属于进程的,是属于内核的。那我想问,这里表示的地址:0xF0000020是被内核占用的地址,是逻辑地址还是物理地址呢?既然这个地址被放到了进程的句柄表中,那进程一定会翻译这个地址从而找到文件内核对象的真实物理地址,进而操作文件吧,两个进程的句柄表中都有这个地址0XF0000020,怎么能指向同一个文件内核对象呢?(进程是独立的,同一个地址代表的完全不同意义)请问这里该如何解释呢?谢谢,问题有点长,自己的表达能力不是很强,希望各位不要见怪啊!!!!!! |
|
[原创]文件(文件夹)加密解密工具
BUG修改完毕了,主要是针对配置文件区段中出现[]的情况导致不能解密,因为配置文件的区段本身包含了[],假如文件名包含[],就需要对[跟]进行转义,因此这里换了一下实现思路。 |
|
[原创]文件(文件夹)加密解密工具
发现了一些bug,马上去修改。 |
|
|
|
[原创]文件(文件夹)加密解密工具
你要完整的工程? |
|
[求助]Win7下运行程序可以默认管理员权限运行么
解决办法: 打开项目属性-----配置属性--------连接器----------清单文件------------UAC执行级别-----选择requireAdministrator 进行编译连接就OK了。 |
|
[求助]关于鼠标右键选中文件获取文件路径
case WM_INITDIALOG: 这样可以吧,获取命令行 |
|
[求助]现在知道某个文件被system(xp上pid=4)进程所占用,请问如何去除这个占用呢?谢谢
问题已经解决了,方法也是在看雪上找到的。 感谢这篇帖子作者: http://bbs.pediy.com/showthread.php?t=67996 |
|
[求助]现在知道某个文件被system(xp上pid=4)进程所占用,请问如何去除这个占用呢?谢谢
自己顶一下,不然沉了,找到了一点点内容:
自己还是没实现。。。。 |
|
[求助]现在知道某个文件被system(xp上pid=4)进程所占用,请问如何去除这个占用呢?谢谢
请问handle何来?求具体点可以吗 |
|
[求助]关于文件占坑的一点疑问,附代码加文件占坑文档。
看记事本打开大文件的速度,不像是使用了内存映射文件机制吧,速度慢的很啊,你这里的意思是?求解释。。。 |
|
[求助]关于文件占坑的一点疑问,附代码加文件占坑文档。
复制句柄到另外一个进程就实现了进程间共享内核对象了吗? 也就是说另外一个进程也能操作此内核对象了是吧(比如内核对象是个文件对象,那操作可以是移动文件,重命名文件,删除文件等等)?那如何验证是不是真的能操作(比如重命名文件等)呢? |
|
[求助]关于文件占坑的一点疑问,附代码加文件占坑文档。
正如你所说,测试了一下EXCEL文件,的确是这样的, 测试代码: OFSTRUCT ofstruct; ofstruct.cBytes=sizeof(OFSTRUCT); OpenFile(TEXT("C:\\Documents and Settings\\Administrator\\桌面\\新建 Microsoft Office Excel 工作表.xlsx"),&ofstruct,OF_DELETE); cout<<GetLastError()<<endl; 当然前提是我已经手动打开了这个文件了。 返回32,表面此文件被进程占用,因此删除失败的。 一直很困惑,只要有一个进程在访问某个内核对象或者说没有访问该内核对象(只是拥有该内核对象的句柄,通过上述的复制),那其他进程都不能访问该文件了吗?是不是跟内核对象能被共享访问矛盾了?独占?共享?麻烦给解释解释这个迷雾,3Q! |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值