ImageVerifierCode 换一换
格式:DOC , 页数:13 ,大小:175KB ,
资源ID:5971898      下载积分:10 金币
快捷注册下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

开通VIP
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.zixin.com.cn/docdown/5971898.html】到电脑端继续下载(重复下载【60天内】不扣币)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

开通VIP折扣优惠下载文档

            查看会员权益                  [ 下载后找不到文档?]

填表反馈(24小时):  下载求助     关注领币    退款申请

开具发票请登录PC端进行申请

   平台协调中心        【在线客服】        免费申请共赢上传

权利声明

1、咨信平台为文档C2C交易模式,即用户上传的文档直接被用户下载,收益归上传人(含作者)所有;本站仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。所展示的作品文档包括内容和图片全部来源于网络用户和作者上传投稿,我们不确定上传用户享有完全著作权,根据《信息网络传播权保护条例》,如果侵犯了您的版权、权益或隐私,请联系我们,核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
2、文档的总页数、文档格式和文档大小以系统显示为准(内容中显示的页数不一定正确),网站客服只以系统显示的页数、文件格式、文档大小作为仲裁依据,个别因单元格分列造成显示页码不一将协商解决,平台无法对文档的真实性、完整性、权威性、准确性、专业性及其观点立场做任何保证或承诺,下载前须认真查看,确认无误后再购买,务必慎重购买;若有违法违纪将进行移交司法处理,若涉侵权平台将进行基本处罚并下架。
3、本站所有内容均由用户上传,付费前请自行鉴别,如您付费,意味着您已接受本站规则且自行承担风险,本站不进行额外附加服务,虚拟产品一经售出概不退款(未进行购买下载可退充值款),文档一经付费(服务费)、不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
4、如你看到网页展示的文档有www.zixin.com.cn水印,是因预览和防盗链等技术需要对页面进行转换压缩成图而已,我们并不对上传的文档进行任何编辑或修改,文档下载后都不会有水印标识(原文档上传前个别存留的除外),下载后原文更清晰;试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓;PPT和DOC文档可被视为“模板”,允许上传人保留章节、目录结构的情况下删减部份的内容;PDF文档不管是原文档转换或图片扫描而得,本站不作要求视为允许,下载前可先查看【教您几个在下载文档中可以更好的避免被坑】。
5、本文档所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用;网站提供的党政主题相关内容(国旗、国徽、党徽--等)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
6、文档遇到问题,请及时联系平台进行协调解决,联系【微信客服】、【QQ客服】,若有其他问题请点击或扫码反馈【服务填表】;文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“【版权申诉】”,意见反馈和侵权处理邮箱:1219186828@qq.com;也可以拔打客服电话:0574-28810668;投诉电话:18658249818。

注意事项

本文(windows快捷方式的格式结构.doc)为本站上传会员【xrp****65】主动上传,咨信网仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知咨信网(发送邮件至1219186828@qq.com、拔打电话4009-655-100或【 微信客服】、【 QQ客服】),核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载【60天内】不扣币。 服务填表

windows快捷方式的格式结构.doc

1、  查看文章   【转】 快捷方式lnk文件格式详解(英文)(中文) 2009-11-07 10:55 转自: You should consider using the IShellLink interface which is a safe way to handle windows shortcuts. If you have a strong reason not to use that interface then I have to remind you that this file format is not documented by Microsoft.

2、I cannot say that the info gathered here is accurate nor that it will work in the future.  .LNK File Format   1. Header   2. Shell Item Id List   3. File Location Info   4. Description   5. Relative Path   6. Working Directory   7. Command Line Arguments   8. Icon Filename   9. Additonal

3、Info  1. Header Size Contents Description 4 bytes Always 4C 00 00 00 This is how windows knows it is a shortcut file 16 bytes GUID for shortcut files The current GUID for shortcuts. It may change in the future. 01 14 02 00 00 00 00 00 C0 00 00 00 00 00 46 1 dword Shortcut flags Shortc

4、ut flags are explained below 1 dword Target file flags Flags are explained below 1 qword Creation time   1 qword Last access time   1 qword Modification time   1 dword File length The length of the target file. 0 if the target is not a file. This value is used to find the target when

5、the link is broken. 1 dword Icon number If the file has a custom icon (set by the flags bit 6), then this long integer indicates the index of the icon to use. Otherwise it is zero. 1 dword Show Window the ShowWnd value to pass to the target application when starting it. 1:Normal Window 2:Minim

6、ized 3:Maximized 1 dword Hot Key The hot key assigned for this shortcut 1 dword Reserved Always 0 1 dword Reserved Always 0 Shortcut flags Bit Meaning 0 Shell item id list is present 1 Target is a file or directory 2 Has a description 3 Has a relative path 4 Has a working dir

7、ectory 5 Has command line arguments 6 Has a custom icon. Target flags Bit Meaning 0 Target is read only. 1 Target is hidden. 2 Target is a system file. 3 Target is a volume label. (Not possible) 4 Target is a directory. 5 Target has been modified since last backup. (archive) 6

8、 Target is encrypted (NTFS partitions) 7 Target is Normal 8 Target is temporary. 9 Target is a sparse file. 10 Target has reparse point data. 11 Target is compressed. 12 Target is offline. Last Access and Modified time offsets corrected thanks to JimmyW Shell Item Id List Note:

9、This section exists only if the first bit for shortcut flags is set the header section. If that bit is not set then this section does not exists. The first word contains the size of the list in bytes. Each item (except the last) in the list contains its size in a word fallowed by the content. Th

10、e size includes and the space used to store it. The last item has the size 0. These items are used to store various informations. For more info read the SHITEMID documentation. File Location Info This section is always present, but if bit 1 is not set in the flags value, then the length of

11、 this section will be zero. The header of this section is described below. Size Description 1 dword This length value includes all the assorted pathnames and other data structures. All offsets are relative to the start of this section. 1 dword The offset at which the basic file info structure

12、 ends. Should be 1C. 1 dword File available on local volume (0) or network share(1) 1 dword Offset to the local volume table. 1 dword Offset to the base path on the local volume. 1 dword Offset to the network volume table. 1 dword Offset to the final part of the pathname. Combine the

13、base path string and the final path string to find the filename of the file on the local volume. To find the filename of the file on the network you need to combine the share name in the network volume table with the final path string. The local volume table Size Description 1 dword Length of t

14、his structure including the volume label string. 1 dword Type of volume (code below) 1 dword Volume serial number 1 dword Offset of the volume name (Always 0x10) ASCIZ Volume label Type of volumes Code Description 0 Unknown 1 No root directory 2 Removable (Floppy, Zip ...) 3 Fixed

15、 (Hard disk) 4 Remote (Network drive) 5 CD-ROM 6 Ram drive The network volume table Size Description 1 dword Length of this structure 1 dword Always 02 1 dword Offset of network share name (Always 0x14) 1 dword Reserved 0 1 dword Always 0x20000 ASCIZ Network share name Descript

16、ion This section is present if bit 2 is set in the flags value in the header. The first word value indicates the length of the string. Following the length value is a string of ASCII characters. It is a description of the item. Relative path string This section is present if bit 3 is s

17、et in the flags value in the header. The first word value indicates the length of the string. Following the length value is a string of ASCII characters. It is a relative path to the target. Working directory This section is present if bit 4 is set in the flags value in the header. The fir

18、st word value indicates the length of the string. Following the length value is a string of ASCII characters. It is the working directory as specified in the shortcut properties. Command line arguments This section is present if bit 5 is set in the flags value in the header. The first word

19、 value indicates the length of the string. Following the length value is a string of ASCII characters. The command line string includes everything except the program name. Icon filename This section is present if bit 6 is set in the flags value in the header. The first word value indicates

20、 the length of the string. Following the length value is a string of ASCII characters. This the name of the file containing the icon. Additonal Info Usualy consists of a dword with the value 0. 大家知道通过IShellLink接口可以得到快捷方式的各种属性。具体怎么做,网上有很多文章,这里就不介绍了。现在主要是分析一下快捷方式文件的格 式,并且自己写一个解析程序。 为了方便大家理解,

21、解说完每个段后附上一个快捷方式对应部分的事例数据并附内容解说。这里以Windows Media Player在桌面上的快捷方式为例。 一、文件的整体结构  .LNK 文件格式  1. 文件头  2. Shell Item Id List 段  3. 文件位置信息段  4. 描述字符段  5. 相对路径段  6. 工作目录段  7. 命令行段  8. 图标文件段  9. 附加信息段 二、文件头 文件头结构,参照下面表格: Offset  Size/Type  Description 0h 1 dword 值常为0000004CH

22、为字符"L" 4h 16 bytes GUID ①14h 1 dword Flags,用来标识快捷方式文件中有哪些可选属性,后面有表单独解释每一位的意义。 ②18h 1 dword 目标文件属性,后面解释。 1ch 1 qword 文件创建时间 24h 1 qword 文件修改时间 2ch 1 qword 文件最后一次访问时间 34h 1 dword 目标文件长度 38h 1 dword 自定义图标个数, 3ch 1 dword 目标文件执行时窗口显示方式: 1、 正常显示 2、 最小化 3、 最大化 40h 1 dword

23、热键 44h 2 dword 暂时还不清楚用途值常为0 ① 偏移14h开始的标志标示有哪些可选属性,见下表: Bit 所在位为1时表示 0 有shell item id list 1 指向文件或文件夹,如果此位为0表示指向其他。 2 存在描述字符串 3 存在相对路径 4 存在工作路径 5 存在命令行参数 6 存在自定义图标 ② 偏移18h开始的目标文件属性:  Bit 所在位为1时表示 0 快捷方式所指目标文件有只读属性 1 快捷方式所指目标文件有隐藏属性 2 快捷方式所指目标文件是系统文件 3 快捷方式所指目标是卷标 4

24、 快捷方式所指目标是文件夹 5 快捷方式所指目标文件上次存档后被改变过 6 快捷方式所指目标文件被加密 7 快捷方式所指目标文件属性为一般 8 快捷方式所指目标文件为临时 9 快捷方式所指目标文件为稀疏文件(sparse file) 10 快捷方式所指目标文件有重分析点数据(reparse point) 11 快捷方式所指目标文件被压缩 12 快捷方式所指目标文件脱机 例: 偏移 数据 解释 0000 4c 00 00 00 字符"L" 0004 01 14 02 00 快捷方

25、式的GUID。值固定 00 00 00 00 C0 00 00 00 00 00 00 46 0014 8F 00 00 00 flags。对照表可知 有shell item id list 目标是文件 存在描述字符串 存在相对路径 0018 20 00 00 00

26、 文件属性,具体内容可以查上面的属性说明表 001C 40 51 0A 0C 文件创建时间 AD CB C4 01 0024 C4 D8 A5 91 文件修改时间 AD CB C4 01 002C 00 33 16 74 文件最后一次访问时间 F6 C7 C3 01 0034 00 20 01 00 文件长度 0038 00 00 00 00 自定义图标个数 003C 01 00 00 00 打开时窗口为normal状

27、态 0040 00 00 00 00 热键 0044 00 00 00 00 暂时还不清楚用途值常为0 00 00 00 00 三、Shell item ID list段 当文件头中○1的第0位置位时才有。第一个unsigned short integer表示item ID list段的总长度。后面紧跟着SHITEMID结构。SHITEMID的定义如下: typedef struct _SHITEMID { USHORT cb; BYTE abID[0]; } SHITEM

28、ID, * LPSHITEMID; cb保存SHITEMID结构的大小。abID是可变长度的对象标识。具体都是什么含义没看明白,可以参阅MSDN。因为item ID list段的开始为这个段的总长度,所以在读取的时候可以把此段跳过不做处理!!:) 例:(文件头段的flags标志显示存在shell item id list段) 偏移 数据 解释 004C 9c 00 item ID list总长度(下一段的起始地址为004E+009C=00EA) 004E 14 00 第一个item ID的

29、长度 0050 1F 50 E0 4F 第一个item ID标示内容 D0 20 EA 3A 69 10 A2 D8 08 00 2B 30 30 9D 0062 19 00 第二个item ID的长度 0064 23 43 3A 5C 第二个item ID标示内容 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

30、 F1 93 007B 25 00 007D 31 00 00 00 00 00 70 31 47 3B 31 00 50 72 6F 67 72 61 6D 20 46 69 6C 65 73 00 50 52 4F 47 52 41 7E 31 00 00A0 2C 00 00A2 31 00 00 00 00 00 70 31 47 3B 10 00 57 69

31、 6E 64 6F 77 73 20 4D 65 64 69 61 20 50 6C 61 79 65 72 00 57 49 4E 44 4F 57 7E 32 00 00CC 1C 00 00CE 32 00 00 20 01 00 95 2F A1 99 20 00 77 6D 70 6C 61 79 65 72 2E 65 78 65 00

32、 00 00E8 00 00 item ID list段结束 四、文件位置信息段 开始的一个long integer表示此段的总长度,当文件头中○1的第1位没有置位时表示既不是文件也不是文件夹,所以这个信息没有意义,所以总长度为0。先让我们看一下 这个段的头: Offset  Size/Type  Description 0h 1 dword 此段的总长度 4h 1 dword 头结构长度,固定为1ch 8h 1 dword Flags指示文件在哪些卷有效,这里只用到低两位,第一位置位表示本地卷有效,反之无效。第二位置位表示网

33、络 卷有效,反之无效。 ch 1 dword 本地卷信息表的偏移(固定1ch) 10h 1 dword 本地路径信息的偏移 14h 1 dword 网络卷信息表的偏移 18h 1 dword 附加信息的偏移 如果文件在本地卷,那么文件名为:本地路径信息+附加信息 如果文件在网络卷,那么文件名为:网络卷信息中的共享名+附加信息 紧 跟在段头后面的是本地卷信息表(段内偏移为1ch),结构如下: Offset  Size/Type  Description 0h 1 dword 本地卷信息表的长度 4h 1 dword 卷类型: 0 Unknow

34、n 1 No root directory 2 Removable (Floppy, Zip, etc..) 3 Fixed (Hard disk) 4 Remote (Network drive) 5 CD-ROM 6 Ram drive (Shortcuts to stuff on a ram drive, now that''s smart...) 8h 1 dword 卷序列号 ch 1 dword 固定长度部分的大小,固定为10h 10h 可变长度  卷标签 然后是本地路径信息串段内偏移决定于10h的值。 再往后就是网络卷信息表段内偏移决定于14

35、h的 值。结构如下: Offset  Size/Type  Description 0h 1 dword 网络卷信息表的长度 4h 1 dword 固定为2h 8h 1 dword 固定长度部分的大小,固定为14h ch 1 dword 固定为0h 10h 1 dword 固定为20000h 14h 可变长度 网络共享名 最后是附加信息串段内偏移决定于18h的值 例: 偏移 数据 解释 段头 00EA 67 00 00 00 文件位置信息段总长度 00EE 1C 00 00 00

36、 段头长度,固定为1ch 00F2 01 00 00 00 本地卷 00F6 1C 00 00 00 本地卷信息表的段内偏移 00FA 33 00 00 00 本地路径信息的偏移 00FE 00 00 00 00 网络卷信息表的偏移 0102 66 00 00 00 附加信息的偏移 本地卷信息表 0106 17 00 00 00 表长度 010A 03 00 00 00 Fixed (Hard disk) 010E AD C9 B2 F0 卷序列号 011

37、2 10 00 00 00 固定为10h 0116 73 79 73 74 卷标"system" 65 6D 00 本地路径信息串 011D 43 3A 5C 50 C:\Program Files\Windows Media Player\wmplayer.exe 72 6F 67 72 61 6D 20 46 69 6C 65 73 5C 57 69 6E 64 6F 77 73 20 4D 65 64

38、69 61 20 50 6C 61 79 65 72 5C 77 6D 70 6C 61 79 65 72 2E 65 78 65 00 网络卷信息表 因为段头里flags指示仅为本地卷,并且网络卷信息表的偏移值为零。所以不存在网络卷信息表。 | 附加信 息串 0150 00 五、描述字符段 当文件头中○1的第2位置位时才有。开始的一个unsigned short int表示描述字符串的长度(描述字符为Unicode字符,所以字节数需乘以2,可以使用API函数WideCharToMu

39、ltiByte将其转换成 ANSI字符)。后面为内容。例: 偏移 数据 解释 0151 20 00 描述字符长度 0153 AD 64 3E 65 70 65 57 5B 92 5A 53 4F 0C FF 05 53 EC 62 F3 97 50 4E 01 30 C6 89 91 98 01 30 43 00 44 00 20 00 8C 54 20 00

40、 49 00 6E 00 74 00 65 00 72 00 6E 00 65 00 74 00 20 00 35 75 F0 53 02 30 转换成ANSI字符为"播放数字媒体,包括音乐、视频、CD 和 Internet 电台。 六、相对路径段 当文件头中○1的第3位置位时才有。同描述字符段一样开始的一个unsigned short int表示相对路径字符串的长度。后面为内容。 例: 偏移 数据 解释 0193 38 00

41、 相对路径字符长度 0195 2E 00 2E 00 5C 00 2E 00 2E 00 5C 00 2E 00 2E 00 5C 00 50 00 72 00 6F 00 67 00 72 00 61 00 6D 00 20 00 46 00 69 00 6C 00 65 00 73 00 5C 00 57 00 69 00 6E 00 64 0

42、0 6F 00 77 00 73 00 20 00 4D 00 65 00 64 00 69 00 61 00 20 00 50 00 6C 00 61 00 79 00 65 00 72 00 5C 00 77 00 6D 00 70 00 6C 00 61 00 79 00 65 00 72 00 2E 00 65 00 78 00 65 0

43、0 转换成ANSI字符为"..\..\..\Program Files\Windows Media Player\wmplayer.exe" 七、工作目录段 同上。 例:因为文件头中○1flags的第四位没有置位,所以此段不存在 八、 命令行段 同上。 例:因为文件头中○1flags的第五位没有置位,所以此段不存在 九、图标文件段 同上。 例: 因为文件头中○1flags的第六位没有置位,所以此段不存在 十、 附加信息段 具体信息不清楚!!!!! 以上很多资料来自网上,并不是微软文档,所以难免有理解错误的地方,请包含。所附代码只是为了 跟踪显示,没有输出,嘿嘿,自己改改看吧!!:)有兴趣可以自己写一个类,分析快捷方式的所有信息。

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2026 宁波自信网络信息技术有限公司  版权所有

客服电话:0574-28810668  投诉电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服