热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

CryptSIPRetrieveSubjectGuid

简介CryptSIPRetrieveSubjectGuid根据文件类型检索SubjectGUID,用于CryptSIPLoad。提示如果检索失败可以使用通用的CRYPT_SUBJT
简介

  CryptSIPRetrieveSubjectGuid根据文件类型检索SubjectGUID, 用于 CryptSIPLoad。

提示

  如果检索失败可以使用通用的 CRYPT_SUBJTYPE_FLAT_IMAGE;

  GUID为{DE351A42-8E59-11D0-8C47-00C04FC295EE}

 

代码

program CryptSIPRetrieveSubjectGuid;{$APPTYPE CONSOLE}usesWindows, SysUtils;/// ///
//
// CryptSIPRetrieveSubjectGuid (defined in crypt32.dll)
// ----------------------------------------------------------------------------
// looks at the file's "Magic Number" and tries to determine which
// SIP's object ID is right for the file type.
//
// Returns:
// TRUE: No fatal errors
// FALSE: Errors occured. See GetLastError()
//function _CryptSIPRetrieveSubjectGuid(FileName: LPCWSTR; // wide file namehFileIn: THandle; // or handle of open filepgSubject: PGUID // defined SIP's GUID): BOOL; stdcall; external 'crypt32.dll' name 'CryptSIPRetrieveSubjectGuid';varSubjectGuid: TGUID;
beginif ParamCount <1 thenbeginWriteLn(&#39;1. 检索文件 "Magic Number"&#39;);WriteLn(&#39;2. Created 2011/12/19 by Hou&#39;);WriteLn(&#39;3. Command: App &#39;);Exit;end;if not _CryptSIPRetrieveSubjectGuid(PWChar(WideString(ParamStr(ParamCount))),0,&#64;SubjectGuid) thenbeginWriteLn(&#39;Retrieve Fail!&#39;);Exit;end;WriteLn(GUIDToString(SubjectGuid));
end.

附录&#xff1a;

const// 根据Win2k泄漏的部分源码 mscdfapi.cpp &#43; OllyICE makecat.exe获得(2011/12/20 by Hou)// http://mikolajapp.appspot.com/uuid/query?q&#61;%7Bc689aaba-8e78-11d0-8c47-00c04fc295ee%7DCRYPT_SUBJTYPE_PE_IMAGE:TGUID &#61; &#39;{C689AAB8-8E78-11D0-8C47-00C04FC295EE}&#39;;CRYPT_SUBJTYPE_JAVACLASS_IMAGE:TGUID &#61; &#39;{C689AAB9-8E78-11D0-8C47-00C04FC295EE}&#39;;CRYPT_SUBJTYPE_CABINET_IMAGE:TGUID &#61; &#39;{C689AABA-8E78-11D0-8C47-00C04FC295EE}&#39;;CRYPT_SUBJTYPE_FLAT_IMAGE:TGUID &#61; &#39;{DE351A42-8E59-11D0-8C47-00C04FC295EE}&#39;;CRYPT_SUBJTYPE_CATALOG_IMAGE:TGUID &#61; &#39;{DE351A43-8E59-11D0-8C47-00C04FC295EE}&#39;;CRYPT_SUBJTYPE_CTL_IMAGE:TGUID &#61; &#39;{9BA61D3F-E73A-11D0-8CD2-00C04FC295EE}&#39;;

转:https://www.cnblogs.com/yryz/archive/2011/12/20/2294460.html



推荐阅读
author-avatar
null5269
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有