{"id":4752,"date":"2017-10-21T16:39:31","date_gmt":"2017-10-21T08:39:31","guid":{"rendered":"http:\/\/blog.qdac.cc\/?p=4752"},"modified":"2017-10-22T10:08:55","modified_gmt":"2017-10-22T02:08:55","slug":"fmx%e5%9c%a8-qplugins-%e4%b8%ad-vcl-%e5%ae%bf%e4%b8%bb%e4%bd%bf%e7%94%a8-fmx-dll-%e9%9c%80%e8%a6%81%e6%89%8b%e5%8a%a8%e5%a4%84%e7%90%86%e7%9a%84%e9%97%ae%e9%a2%98%e8%af%b4%e6%98%8e","status":"publish","type":"post","link":"https:\/\/blog.qdac.cc\/?p=4752","title":{"rendered":"[FMX]\u5728 QPlugins \u4e2d VCL \u5bbf\u4e3b\u4f7f\u7528 FMX DLL \u9700\u8981\u624b\u52a8\u5904\u7406\u7684\u95ee\u9898\u8bf4\u660e"},"content":{"rendered":"<p>\u7531\u4e8e\u4f17\u6240\u5468\u77e5\u7684\u539f\u56e0\uff0cFMX \u7684 DLL \u5728 FreeLibrary \u65f6\uff0c\u4f1a\u51fa\u73b0 AV \u5f02\u5e38\uff0c\u8fd9\u5b9e\u9645\u4e0a\u5305\u542b\u4e86\u4e24\u65b9\u9762\u7684\u539f\u56e0\uff1a<\/p>\n<ol>\n<li>\u00a0FreeLibrary \u65f6\uff0c\u672a\u6b63\u786e\u6e05\u7406\u5185\u90e8\u7684\u8ba1\u65f6\u5668\uff0c\u9020\u6210 FreeLibrary \u540e\uff0c\u5185\u90e8\u7684\u8ba1\u65f6\u5668\u5230\u6307\u5b9a\u7684\u65f6\u95f4\u70b9\u540e\u4ecd\u7136\u8fd0\u884c\uff0c\u7ed3\u679c\u5c31\u51fa\u73b0\u4e86 AV \u9519\u8bef\u3002<\/li>\n<li>\u00a0GDI+ \u521d\u59cb\u5316\u548c\u6e05\u7406\u53ea\u80fd\u5728\u5bbf\u4e3b\u7a0b\u5e8f\u4e2d\u6267\u884c\uff08\u5fae\u8f6f\u7684\u8981\u6c42\uff09\uff0c\u800c\u5bbf\u4e3b\u7a0b\u5e8f\u6ca1\u6709\u5f15\u7528 winapi.GDIPObj\u3002<\/li>\n<li>\u00a0FMX.Canvas.D2D \u4e2d\u7684 TCustomCanvasD2D \u7c7b\u578b\u91ca\u653e\u65f6\uff0c\u91ca\u653e FShareDevice \u63a5\u53e3\u65f6\uff0c\u4f1a\u51fa\u5f02\u5e38\uff0c\u9020\u6210 AV \u9519\u8bef\uff0c\u800c\u8fd9\u4e2a\u9519\u8bef\u5b98\u65b9\u5e76\u6ca1\u6709\u5904\u7406\uff0c\u4e5f\u53ef\u80fd\u662f\u6ca1\u7a7a\u627e\u5230\u5b83\u3002<\/li>\n<\/ol>\n<p>\u65e2\u7136\u539f\u56e0\u660e\u786e\u4e86\uff0c\u4fee\u8be5\u65b9\u6cd5\u4e5f\u5c31\u660e\u786e\u4e86\uff1a<\/p>\n<ol>\n<li>\u00a0\u8fd9\u4e2a\u5f53\u4f60\u5f15\u7528 qplugins_fmx_messages \u65f6\uff0c\u5b83\u5df2\u7ecf\u5e2e\u4f60\u5904\u7406\u5b8c\u4e86\uff0c\u4e0d\u9700\u8981\u4f60\u624b\u5de5\u5904\u7406\u4e86\u3002\u5f53\u7136\u624b\u5de5\u4fee\u6b63 FMX.Platform.Win \u4e5f\u662f\u53ef\u4ee5\u7684\uff0c\u4e24\u8005\u5e76\u4e0d\u4f1a\u51b2\u7a81\u3002<\/li>\n<li>\u00a0\u5728\u4e3b\u7a0b\u5e8f\u4e2d\u5f15\u7528\u4e0b winapi.GDIPObj \u5355\u5143\uff0c\u7136\u540e\u5c31\u6ca1\u522b\u7684\u4e8b\u4e86\uff0c\u8fd9\u4e2a\u662f\u89e3\u51b3\u5728 XP \u4e0a\u7684\u95ee\u9898\u3002<\/li>\n<li>\u00a0\u590d\u5236FMX.Platform.Win \u548c\u00a0FMX.Canvas.D2D \u5230\u4f60\u7684\u5de5\u7a0b\u76ee\u5f55\uff0c\u7136\u540e\u4e3a TCustomCanvasD2D \u6dfb\u52a0\u7c7b\u7684\u6790\u6784\u65b9\u6cd5\uff08\u6ce8\u610f\u4e0d\u662fTCustomCanvasD2D\u7684\u6790\u6784\u51fd\u6570\uff0c\u662f class destructor\uff09\uff0c\u5b9e\u73b0\u4ee3\u7801\u5982\u4e0b\uff1a\n<pre class=\"lang:delphi decode:true\">class destructor TCustomCanvasD2D.Destroy;\r\nbegin\r\n  inherited;\r\n  try\r\n    DestroySharedResources;\r\n  except\r\n  end;\r\nend;<\/pre>\n<p>FMX.Platform.Win \u5355\u5143\u5230\u4f60\u7684\u5de5\u7a0b\u76ee\u5f55\u4e0b\uff0c\u4e0d\u9700\u8981\u505a\u4efb\u4f55\u53d8\u52a8\uff0c\u5f53\u7136\u5982\u679c\u4f60\u505a\u8fc7\u5176\u5b83\u4fee\u6b63\uff0c\u4e5f\u6ca1\u95ee\u9898\uff0c\u7136\u540e\u5c31\u53ef\u4ee5\u6309\u7167\u6b63\u5e38\u7684FMX \u7a0b\u5e8f\u5728DLL\u4e2d\u4f7f\u7528\u4e86\u3002\u4e4b\u6240\u4ee5\u8981\u590d\u5236\u5b83\uff0c\u662f\u56e0\u4e3a\u6211\u4eec\u4fee\u6539\u4e86 FMX.Canvas.D2D \u7684\u63a5\u53e3\u90e8\u5206\uff0c\u8fd9\u5c31\u9700\u8981\u91cd\u65b0\u7f16\u8bd1\u4f9d\u8d56\u4e8e\u5b83\u7684\u5355\u5143\uff0c\u800c FMX.Platform.Win \u6070\u6070\u4f7f\u7528\u4e86\u5b83\u3002<\/li>\n<\/ol>\n<h4>\u3010\u989d\u5916\u8bf4\u660e\u3011<\/h4>\n<p>\u5982\u679c\u60a8\u4e0d\u662f QPlugins \u7684\u7528\u6237\uff0c\u8bf7\u624b\u52a8\u5904\u7406\u4e0b FMX.Platform.Win\uff0c\u5728\u505a\u4fee\u8ba2\u65f6\uff0c\u4f60\u53c2\u8003 <a href=\"https:\/\/blog.qdac.cc\/?p=4722\">[FMX]FMX \u7f16\u5199 Windows \u5e73\u53f0\u4e0b DLL \u9700\u8981\u89e3\u51b3\u7684\u4e24\u4e2a\u95ee\u9898<\/a> \u5916\uff0c\u4f60\u8fd8\u9700\u8981\u5904\u7406 FMX Application \u548c\u5bbf\u4e3b\u7684\u4e24\u4e2a Application \u5e94\u7528\u7a97\u53e3\u9020\u6210\u53cc\u4efb\u52a1\u680f\u7684\u95ee\u9898\u3002\u5177\u4f53\u53ef\u4ee5\u53c2\u8003 QPlugins \u7684\u76f8\u5173\u5904\u7406\uff0c\u5728\u6b64\u4e0d\u518d\u7f00\u8ff0\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7531\u4e8e\u4f17\u6240\u5468\u77e5\u7684\u539f\u56e0\uff0cFMX \u7684 DLL  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[69,8,9],"tags":[30,149,441,237],"class_list":["post-4752","post","type-post","status-publish","format-standard","hentry","category-c-builder","category-delphi","category-qdac","tag-dll","tag-fmx","tag-qplugins","tag-vcl"],"views":4610,"_links":{"self":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/4752","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4752"}],"version-history":[{"count":6,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/4752\/revisions"}],"predecessor-version":[{"id":4758,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/4752\/revisions\/4758"}],"wp:attachment":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4752"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4752"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4752"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}