diff --git a/FAQ.rtf b/FAQ.rtf new file mode 100644 index 0000000000000000000000000000000000000000..0b8b2f80458af3202b1d935c7498a23b1330614c --- /dev/null +++ b/FAQ.rtf @@ -0,0 +1,274 @@ +{\rtf1\adeflang1025\ansi\ansicpg936\uc2\adeff0\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi0\deflang1033\deflangfe2052\themelang1033\themelangfe2052\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\f13\fbidi \fnil\fcharset134\fprq2{\*\panose 02010600030101010101}\'cb\'ce\'cc\'e5{\*\falt SimSun};}{\f34\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria Math;} +{\f37\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\f39\fbidi \fnil\fcharset134\fprq2{\*\panose 00000000000000000000}@\'cb\'ce\'cc\'e5;} +{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fdbmajor\f31501\fbidi \fnil\fcharset134\fprq2{\*\panose 02010600030101010101}\'cb\'ce\'cc\'e5{\*\falt SimSun};} +{\fhimajor\f31502\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0302020204030204}Calibri Light;}{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fdbminor\f31505\fbidi \fnil\fcharset134\fprq2{\*\panose 02010600030101010101}\'cb\'ce\'cc\'e5{\*\falt SimSun};} +{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f41\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} +{\f42\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\f44\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f45\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f46\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\f47\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f48\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f49\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);} +{\f173\fbidi \fnil\fcharset0\fprq2 SimSun Western{\*\falt SimSun};}{\f381\fbidi \froman\fcharset238\fprq2 Cambria Math CE;}{\f382\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;}{\f384\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;} +{\f385\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f388\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;}{\f389\fbidi \froman\fcharset163\fprq2 Cambria Math (Vietnamese);}{\f411\fbidi \fswiss\fcharset238\fprq2 Calibri CE;} +{\f412\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}{\f414\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\f415\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\f418\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;} +{\f419\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}{\f433\fbidi \fnil\fcharset0\fprq2 @\'cb\'ce\'cc\'e5 Western;}{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} +{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} +{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} +{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbmajor\f31520\fbidi \fnil\fcharset0\fprq2 SimSun Western{\*\falt SimSun};}{\fhimajor\f31528\fbidi \fswiss\fcharset238\fprq2 Calibri Light CE;} +{\fhimajor\f31529\fbidi \fswiss\fcharset204\fprq2 Calibri Light Cyr;}{\fhimajor\f31531\fbidi \fswiss\fcharset161\fprq2 Calibri Light Greek;}{\fhimajor\f31532\fbidi \fswiss\fcharset162\fprq2 Calibri Light Tur;} +{\fhimajor\f31535\fbidi \fswiss\fcharset186\fprq2 Calibri Light Baltic;}{\fhimajor\f31536\fbidi \fswiss\fcharset163\fprq2 Calibri Light (Vietnamese);}{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} +{\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} +{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} +{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flominor\f31549\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);} +{\fdbminor\f31560\fbidi \fnil\fcharset0\fprq2 SimSun Western{\*\falt SimSun};}{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\fhiminor\f31569\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;} +{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;} +{\fhiminor\f31576\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbiminor\f31579\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}} +{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0; +\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\*\defchp \fs21\kerning2\loch\af31506\hich\af31506\dbch\af31505 }{\*\defpap +\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{\qj \li0\ri0\nowidctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 +\fs21\lang1033\langfe2052\kerning2\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052 \snext0 \sqformat \spriority0 Normal;}{\*\cs10 \additive \ssemihidden \sunhideused \spriority1 Default Paragraph Font;}{\* +\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv +\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs21\alang1025 \ltrch\fcs0 \fs21\lang1033\langfe2052\kerning2\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052 +\snext11 \ssemihidden \sunhideused Normal Table;}{\s15\qc \li0\ri0\nowidctlpar\brdrb\brdrs\brdrw15\brsp20 \tqc\tx4153\tqr\tx8306\wrapdefault\aspalpha\aspnum\faauto\nosnaplinegrid\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs18\alang1025 \ltrch\fcs0 +\fs18\lang1033\langfe2052\kerning2\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052 \sbasedon0 \snext15 \slink16 \sunhideused \styrsid13054739 header;}{\*\cs16 \additive \rtlch\fcs1 \af0\afs18 \ltrch\fcs0 \fs18 +\sbasedon10 \slink15 \slocked \styrsid13054739 \'d2\'b3\'c3\'bc Char;}{\s17\ql \li0\ri0\nowidctlpar\tqc\tx4153\tqr\tx8306\wrapdefault\aspalpha\aspnum\faauto\nosnaplinegrid\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs18\alang1025 \ltrch\fcs0 +\fs18\lang1033\langfe2052\kerning2\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052 \sbasedon0 \snext17 \slink18 \sunhideused \styrsid13054739 footer;}{\*\cs18 \additive \rtlch\fcs1 \af0\afs18 \ltrch\fcs0 \fs18 +\sbasedon10 \slink17 \slocked \styrsid13054739 \'d2\'b3\'bd\'c5 Char;}}{\*\rsidtbl \rsid1641563\rsid4200827\rsid5394562\rsid5968504\rsid6822522\rsid8723419\rsid9775256\rsid11624254\rsid13054739\rsid15336270}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0 +\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\author ymofen}{\operator ymofen}{\creatim\yr2015\mo5\dy27\hr10\min6}{\revtim\yr2015\mo7\dy16\hr15\min28}{\version6}{\edmins18}{\nofpages1}{\nofwords125} +{\nofchars717}{\*\company Microsoft}{\nofcharsws841}{\vern57439}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}\paperw11906\paperh16838\margl1800\margr1800\margt1440\margb1440\gutter0\ltrsect +\deftab420\ftnbj\aenddoc\trackmoves0\trackformatting1\donotembedsysfont1\relyonvml0\donotembedlingdata0\grfdocevents0\validatexml1\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors1\formshade\horzdoc\dgmargin\dghspace180\dgvspace156 +\dghorigin450\dgvorigin0\dghshow0\dgvshow2\jcompress\lnongrid +\viewkind5\viewscale100\splytwnine\ftnlytwnine\htmautsp\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct\asianbrkrule\rsidroot4200827\newtblstyruls +\nogrowautofit\usenormstyforlist\noindnmbrts\felnbrelev\nocxsptable\indrlsweleven\noafcnsttbl\afelev\utinl\hwelev\spltpgpar\notcvasp\notbrkcnstfrctbl\notvatxbx\krnprsnet\cachedcolbal \nouicompat {\upr{\*\fchars +!%),.:\'3b>?]\'7d\'a1\'e9\'a1\'a7\'a1\'e3\'a1\'a4\'a1\'a6\'a1\'a5\'a8\'44\'a1\'ac\'a1\'af\'a1\'b1\'a1\'ad\'a1\'eb\'a1\'e4\'a1\'e5?\'a1\'e6\'a1\'c3\'a1\'a2\'a1\'a3\'a1\'a8\'a1\'b5\'a1\'b7\'a1\'b9\'a1\'bb\'a1\'bf\'a1\'b3\'a1\'bd\'a8\'95\'a6\'e1\'a6\'e3\'a6\'e7\'a6\'e5\'a6\'eb\'a9\'77\'a9\'79\'a9\'7b\'a3\'a1\'a3\'a2\'a3\'a5\'a3\'a7\'a3\'a9\'a3\'ac\'a3\'ae\'a3\'ba\'a3\'bb\'a3\'bf\'a3\'dd\'a3\'e0\'a3\'fc\'a3\'fd\'a1\'ab\'a1\'e9 +}{\*\ud\uc0{\*\fchars +!%),.:\'3b>?]\'7d{\uc2\u162 \'a1\'e9\'a1\'a7\'a1\'e3\'a1\'a4\'a1\'a6\'a1\'a5\'a8D\'a1\'ac\'a1\'af\'a1\'b1\'a1\'ad\'a1\'eb\'a1\'e4\'a1\'e5}{\uc1\u8250 ?\'a1\'e6\'a1\'c3\'a1\'a2\'a1\'a3\'a1\'a8\'a1\'b5\'a1\'b7\'a1\'b9\'a1\'bb\'a1\'bf\'a1\'b3\'a1\'bd\'a8\'95\'a6\'e1\'a6\'e3\'a6\'e7\'a6\'e5\'a6\'eb\'a9w\'a9y\'a9\'7b\'a3\'a1\'a3\'a2\'a3\'a5\'a3\'a7\'a3\'a9\'a3\'ac\'a3\'ae\'a3\'ba\'a3\'bb\'a3\'bf\'a3\'dd\'a3\'e0\'a3\'fc\'a3\'fd\'a1\'ab\'a1\'e9} +}}}{\upr{\*\lchars $([\'7b\'a1\'ea\'a3\'a4\'a1\'a4\'a1\'ae\'a1\'b0\'a1\'b4\'a1\'b6\'a1\'b8\'a1\'ba\'a1\'be\'a1\'b2\'a1\'bc\'a8\'94\'a9\'76\'a9\'78\'a9\'7a\'a1\'e7\'a3\'a8\'a3\'ae\'a3\'db\'a3\'fb\'a1\'ea\'a3\'a4}{\*\ud\uc0{\*\lchars +$([\'7b{\uc2\u163 \'a1\'ea\u165 \'a3\'a4\'a1\'a4\'a1\'ae\'a1\'b0\'a1\'b4\'a1\'b6\'a1\'b8\'a1\'ba\'a1\'be\'a1\'b2\'a1\'bc\'a8\'94\'a9v\'a9x\'a9z\'a1\'e7\'a3\'a8\'a3\'ae\'a3\'db\'a3\'fb\'a1\'ea\'a3\'a4}}}}\fet0{\*\wgrffmtfilter 2450}\nofeaturethrottle1 +\ilfomacatclnup0{\*\ftnsep \ltrpar \pard\plain \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid13054739 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 +\fs21\lang1033\langfe2052\kerning2\loch\af31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid5394562 \chftnsep +\par }}{\*\ftnsepc \ltrpar \pard\plain \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid13054739 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 +\fs21\lang1033\langfe2052\kerning2\loch\af31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid5394562 \chftnsepc +\par }}{\*\aftnsep \ltrpar \pard\plain \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid13054739 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 +\fs21\lang1033\langfe2052\kerning2\loch\af31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid5394562 \chftnsep +\par }}{\*\aftnsepc \ltrpar \pard\plain \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid13054739 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 +\fs21\lang1033\langfe2052\kerning2\loch\af31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid5394562 \chftnsepc +\par }}\ltrpar \sectd \ltrsect\linex0\headery851\footery992\colsx425\endnhere\sectlinegrid312\sectspecifyl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta \dbch .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta \dbch .}} +{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta \dbch .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta \dbch )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb \dbch (}{\pntxta \dbch )}}{\*\pnseclvl6 +\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb \dbch (}{\pntxta \dbch )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb \dbch (}{\pntxta \dbch )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb \dbch (}{\pntxta \dbch )}}{\*\pnseclvl9 +\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb \dbch (}{\pntxta \dbch )}}\pard\plain \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 +\fs21\lang1033\langfe2052\kerning2\loch\af31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052 {\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \hich\af31506\dbch\af31505\loch\f31506 Q: }{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 +\loch\af31506\hich\af31506\dbch\f31505 \'b1\'e0\'d2\'eb}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \hich\af31506\dbch\af31505\loch\f31506 DEMO}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \loch\af31506\hich\af31506\dbch\f31505 \'ce\'ca\'cc\'e2}{ +\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid15336270 +\par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid1641563 {\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \hich\af31506\dbch\af31505\loch\f31506 * }{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 +\loch\af31506\hich\af31506\dbch\f31505 \'d7\'a2\'d2\'e2}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \hich\af31506\dbch\af31505\loch\f31506 Delphi}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \loch\af31506\hich\af31506\dbch\f31505 \'d7\'f6\'b4\'b0 +\'cc\'e5\'b2\'e5\'bc\'fe\'ca\'b1\'d2\'bb\'b0\'e3\'cd\'c6\'bc\'f6\'b4\'f8\'b0\'fc\'a3\'ac\'b5\'b1\'cc\'e1\'ca\'be}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \hich\af31506\dbch\af31505\loch\f31506 [Cannot create form. No MDI forms are currently active]}{ +\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \loch\af31506\hich\af31506\dbch\f31505 \'cb\'b5\'c3\'f7\'c4\'e3\'b5\'c4}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \hich\af31506\dbch\af31505\loch\f31506 DLL}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 +\loch\af31506\hich\af31506\dbch\f31505 \'ba\'cd\'d6\'f7\'b4\'b0\'cc\'e5\'d6\'b1\'bd\'d3\'c3\'bb\'d3\'d0\'b9\'b2\'cf\'ed}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \hich\af31506\dbch\af31505\loch\f31506 Application}{\rtlch\fcs1 \af0 \ltrch\fcs0 +\insrsid1641563 \loch\af31506\hich\af31506\dbch\f31505 \'a1\'a3\'bf\'c9\'d2\'d4\'b4\'f8\'b0\'fc\'bd\'e2\'be\'f6\'b8\'c3\'ce\'ca\'cc\'e2}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 +\par \hich\af31506\dbch\af31505\loch\f31506 project ->options ->build with packages +\par \hich\af31506\dbch\af31505\loch\f31506 }{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \loch\af31506\hich\af31506\dbch\f31505 \'d2\'bb\'b0\'e3\'d0\'e8\'d2\'aa\'b4\'f8\'c9\'cf}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 +\hich\af31506\dbch\af31505\loch\f31506 vcl;rtl; +\par +\par \hich\af31506\dbch\af31505\loch\f31506 * }{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \loch\af31506\hich\af31506\dbch\f31505 \'d2\'f2\'ce\'aa}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \hich\af31506\dbch\af31505\loch\f31506 delphi}{\rtlch\fcs1 \af0 +\ltrch\fcs0 \insrsid1641563 \loch\af31506\hich\af31506\dbch\f31505 \'b5\'c4\'b8\'f7\'b8\'f6\'b0\'e6\'b1\'be\'d6\'b1\'bd\'d3\'b9\'a4\'b3\'cc\'c5\'e4\'d6\'c3\'ce\'c4\'bc\'fe}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 +\hich\af31506\dbch\af31505\loch\f31506 (.dproj)}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \loch\af31506\hich\af31506\dbch\f31505 \'b2\'bb\'cc\'ab\'bc\'e6\'c8\'dd\'a3\'ac\'cb\'f9\'d2\'d4\'d4\'da\'cc\'e1\'bd\'bb\'ce\'c4 +\loch\af31506\hich\af31506\dbch\f31505 \'bc\'fe\'ca\'b1\'a3\'ac\'c3\'bb\'d3\'d0\'cc\'e1\'bd\'bb\'c5\'e4\'d6\'c3\'ce\'c4\'bc\'fe\'a1\'a3\'d0\'e8\'d2\'aa\'d7\'d4\'bc\'ba\'c5\'e4\'d6\'c3}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 +\hich\af31506\dbch\af31505\loch\f31506 mybean}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \loch\af31506\hich\af31506\dbch\f31505 \'b5\'c4}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \hich\af31506\dbch\af31505\loch\f31506 source}{\rtlch\fcs1 \af0 +\ltrch\fcs0 \insrsid1641563 \loch\af31506\hich\af31506\dbch\f31505 \'c2\'b7\'be\'b6}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \hich\af31506\dbch\af31505\loch\f31506 (}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 +\loch\af31506\hich\af31506\dbch\f31505 \'c8\'e7\'b9\'fb\'bc\'d3\'c8\'eb\'b5\'bd}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \hich\af31506\dbch\af31505\loch\f31506 libary search path}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 +\loch\af31506\hich\af31506\dbch\f31505 \'d6\'d0\'c4\'c7\'bf\'c9\'d2\'d4\'b2\'bb\'d0\'e8\'d2\'aa\'c9\'e8\'d6\'c3\'b9\'a4\'b3\'cc\'b5\'c4\'cb\'d1\'cb\'f7\'c2\'b7\'be\'b6}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \hich\af31506\dbch\af31505\loch\f31506 +), }{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \loch\af31506\hich\af31506\dbch\f31505 \'b4\'f8\'b0\'fc\'d1\'a1\'cf\'ee}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \hich\af31506\dbch\af31505\loch\f31506 project ->options ->build with packages, }{ +\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \loch\af31506\hich\af31506\dbch\f31505 \'ba\'cd\'ca\'e4\'b3\'f6\'c2\'b7\'be\'b6\'a1\'a3}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 +\par +\par \hich\af31506\dbch\af31505\loch\f31506 * }{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \loch\af31506\hich\af31506\dbch\f31505 \'b8\'df\'b0\'e6\'b1\'be}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \hich\af31506\dbch\af31505\loch\f31506 (XE)}{ +\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \loch\af31506\hich\af31506\dbch\f31505 \'b5\'c4\'b4\'f8\'b0\'fc}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \hich\af31506\dbch\af31505\loch\f31506 +, project - options -> packages -> runtime packages (link with runtime packages}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \loch\af31506\hich\af31506\dbch\f31505 \'c9\'e8\'ce\'aa}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 +\hich\af31506\dbch\af31505\loch\f31506 true}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \loch\af31506\hich\af31506\dbch\f31505 \'a3\'ac}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \hich\af31506\dbch\af31505\loch\f31506 runtime packages}{\rtlch\fcs1 +\af0 \ltrch\fcs0 \insrsid1641563 \loch\af31506\hich\af31506\dbch\f31505 \'c9\'e8\'ce\'aa\'d2\'aa\'b4\'f8\'b5\'c4\'b0\'fc\'c8\'e7}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \hich\af31506\dbch\af31505\loch\f31506 rtl; +\hich\af31506\dbch\af31505\loch\f31506 vcl;) +\par +\par \hich\af31506\dbch\af31505\loch\f31506 * DEV}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \loch\af31506\hich\af31506\dbch\f31505 \'b7\'a2\'cf\'d6\'d3\'d0\'ba\'dc\'b6\'e0\'bb\'b7\'be\'b3\'d4\'da}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 +\hich\af31506\dbch\af31505\loch\f31506 DLL}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \loch\af31506\hich\af31506\dbch\f31505 \'d6\'d0\'ca\'b9\'d3\'c3\'ca\'b1\'b3\'f6\'cf\'d6\'b7\'c3\'ce\'ca\'ce\'a5\'b9\'e6\'b5\'c4\'d2\'ec\'b3\'a3\'a3\'ac\'d5\'e2 +\'b8\'f6\'b2\'bb\'ca\'c7}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \hich\af31506\dbch\af31505\loch\f31506 MyBean}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \loch\af31506\hich\af31506\dbch\f31505 \'bf\'f2\'bc\'dc\'b5\'bc\'d6\'c2\'b5\'c4\'a3\'ac +\'c4\'e3\'bf\'c9\'d2\'d4\'bd\'a8\'d2\'bb\'b8\'f6\'b1\'ea\'d7\'bc\'b5\'c4}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \hich\af31506\dbch\af31505\loch\f31506 DLL}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \loch\af31506\hich\af31506\dbch\f31505 \'ba\'cd +}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \hich\af31506\dbch\af31505\loch\f31506 EXE}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \loch\af31506\hich\af31506\dbch\f31505 \'bf\'c9\'d2\'d4\'bc\'ec\'b2\'e2\'ca\'c7\'b7\'f1\'d2\'b2\'b4\'e6\'d4\'da\'d5\'e2 +\'d1\'f9\'b5\'c4\'ce\'ca\'cc\'e2\'a3\'ac\'bb\'f2\'d5\'df\'d6\'b1\'bd\'d3\'d3\'c3}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \hich\af31506\dbch\af31505\loch\f31506 Blessed}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 +\loch\af31506\hich\af31506\dbch\f31505 \'cc\'e1\'b9\'a9\'b5\'c4\'b9\'a4\'b3\'cc}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 ,}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \loch\af31506\hich\af31506\dbch\f31505 \'b4\'e6\'b7\'c5\'d4\'da}{\rtlch\fcs1 +\af0 \ltrch\fcs0 \insrsid1641563 \hich\af31506\dbch\af31505\loch\f31506 samples\\CheckDEVInDLL}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 \loch\af31506\hich\af31506\dbch\f31505 \'c4\'bf\'c2\'bc\'cf\'c2\'c3\'e6\'a1\'a3\'bf\'c9\'d2\'d4\'b1\'e0\'d2\'eb +\'bf\'b4\'bf\'b4\'ca\'c7\'b2\'bb\'ca\'c7\'d3\'d0\'cf\'e0\'cd\'ac\'b5\'c4\'ce\'ca\'cc\'e2\'a1\'a3}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 +\par }\pard \ltrpar\qj \li0\ri0\nowidctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid1641563 +\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid13054739 +\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid13054739 \hich\af31506\dbch\af31505\loch\f31506 Q: }{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid13054739 \loch\af31506\hich\af31506\dbch\f31505 \'ce\'aa\'ca\'b2\'c3\'b4}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid13054739 +\loch\af31506\hich\af31506\dbch\f31505 \'d3\'d0\loch\af31506\hich\af31506\dbch\f31505 \'b5\'c4\'c5\'e4\'d6\'c3}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid13054739 \loch\af31506\hich\af31506\dbch\f31505 \'ce\'c4\'bc\'fe}{\rtlch\fcs1 \af0 \ltrch\fcs0 +\insrsid13054739 \loch\af31506\hich\af31506\dbch\f31505 \'d6\'d0\'b5\'c4\'c5\'e4\'d6\'c3\'d0\'c5\'cf\'a2\'b2\'e5\'bc\'fe\'d6\'d0\'ce\'de\'b7\'a8\'cc\'e1\'c8\'a1}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid13054739 \loch\af31506\hich\af31506\dbch\f31505 \'a1\'a3 +}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid13054739 +\par \hich\af31506\dbch\af31505\loch\f31506 A: }{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid13054739 \loch\af31506\hich\af31506\dbch\f31505 \'ca\'d7\'cf\'c8\loch\af31506\hich\af31506\dbch\f31505 \'b2\'e5\'bc\'fe}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid13054739 +\loch\af31506\hich\af31506\dbch\f31505 \'b1\'d8\'d0\'eb\'ca\'b5\'cf\'d6}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid13054739\charrsid13054739 \hich\af31506\dbch\af31505\loch\f31506 IBeanConfigSetter}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid13054739 ,}{\rtlch\fcs1 +\af0 \ltrch\fcs0 \insrsid13054739 \loch\af31506\hich\af31506\dbch\f31505 \'d5\'e2\'d1\'f9}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid13054739 \loch\af31506\hich\af31506\dbch\f31505 \'c5\'e4\'d6\'c3\'ce\'c4\'bc\'fe\'d6\'d0\'b5\'c4\'c5\'e4\'d6\'c3\'d0\'c5 +\'cf\'a2\'b2\'c5\'bf\'c9\'d2\'d4\'cd\'a8\'b9\'fd\'bd\'d3\'bf\'da\'b5\'c4\'ba\'af\'ca\'fd}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid13054739 \loch\af31506\hich\af31506\dbch\f31505 \'c9\'e8\'d6\'c3}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid13054739 +\loch\af31506\hich\af31506\dbch\f31505 \'b8\'f8\'b2\'e5\'bc\'fe}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid13054739 \loch\af31506\hich\af31506\dbch\f31505 \'a1\'a3}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid13054739 +\par }{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid5968504 \hich\af31506\dbch\af31505\loch\f31506 }{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid5968504 \loch\af31506\hich\af31506\dbch\f31505 \'bb\'b9\'d3\'d0}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid5968504 +\loch\af31506\hich\af31506\dbch\f31505 \'d2\'bb\'d6\'d6\'c7\'e9\'bf\'f6\'d0\'e8\'d2\'aa\'d7\'a2\'d2\'e2\'b5\'c4\'ca\'c7\'a3\'ac\'c8\'e7\'b9\'fb\'d5\'e2\'b8\'f6\'b2\'e5\'bc\'fe}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid5968504 +\hich\af31506\dbch\af31505\loch\f31506 ID}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid5968504 \loch\af31506\hich\af31506\dbch\f31505 \'d2\'d1\'be\'ad}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid5968504 \loch\af31506\hich\af31506\dbch\f31505 \'b1\'bb\'c6\'e4\'cb\'fb}{ +\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid5968504 \hich\af31506\dbch\af31505\loch\f31506 DL}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid5968504 \hich\af31506\dbch\af31505\loch\f31506 L}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid5968504 +\loch\af31506\hich\af31506\dbch\f31505 \'bb\'f2\'d5\'df}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid5968504 \loch\af31506\hich\af31506\dbch\f31505 \'c5\'e4\'d6\'c3\'ce\'c4\'bc\'fe\'d6\'d0\'c7\'c0\'cf\'c8}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid5968504 +\loch\af31506\hich\af31506\dbch\f31505 \'bc\'d3\'d4\'d8}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid5968504 \loch\af31506\hich\af31506\dbch\f31505 \'bb\'f2\'d5\'df\'d7\'a2\'b2\'e1\'a3\'ac\'c4\'c7\'c3\'b4}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid5968504 +\loch\af31506\hich\af31506\dbch\f31505 \'d5\'e2\'b8\'f6}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid5968504 \loch\af31506\hich\af31506\dbch\f31505 \'c5\'e4\'d6\'c3\'ce\'c4\'bc\'fe\'d6\'d0\'b5\'c4}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid5968504 +\loch\af31506\hich\af31506\dbch\f31505 \'b2\'e5\'bc\'fe}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid5968504 \loch\af31506\hich\af31506\dbch\f31505 \'c5\'e4\'d6\'c3}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid5968504 \loch\af31506\hich\af31506\dbch\f31505 \'d0\'c5 +\'cf\'a2}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid5968504 \loch\af31506\hich\af31506\dbch\f31505 \'bb\'e1\'b1\'bb\'ba\'f6\'c2\'d4}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid9775256 \hich\af31506\dbch\af31505\loch\f31506 (}{\rtlch\fcs1 \af0 \ltrch\fcs0 +\insrsid9775256 \loch\af31506\hich\af31506\dbch\f31505 \'bf\'c9\'d2\'d4\loch\af31506\hich\af31506\dbch\f31505 \'bc\'ec\'b2\'e9}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid9775256 \loch\af31506\hich\af31506\dbch\f31505 \'b8\'c3}{\rtlch\fcs1 \af0 \ltrch\fcs0 +\insrsid9775256 \hich\af31506\dbch\af31505\loch\f31506 DLL}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid9775256 \loch\af31506\hich\af31506\dbch\f31505 \'ca\'c7\'b7\'f1\loch\af31506\hich\af31506\dbch\f31505 \'d4\'da}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid9775256 +\loch\af31506\hich\af31506\dbch\f31505 \'c6\'e4\'cb\'fb\'b5\'c4}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid9775256 \loch\af31506\hich\af31506\dbch\f31505 \'ce\'c4\'bc\'fe\'bc\'d0}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid9775256 +\loch\af31506\hich\af31506\dbch\f31505 \'d6\'d0}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid9775256 \loch\af31506\hich\af31506\dbch\f31505 \'b4\'e6\'d4\'da}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid9775256 \hich\af31506\dbch\af31505\loch\f31506 )}{\rtlch\fcs1 \af0 +\ltrch\fcs0 \insrsid6822522 \hich\af31506\dbch\af31505\loch\f31506 (}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid6822522 \loch\af31506\hich\af31506\dbch\f31505 \'bf\'c9\'d2\'d4}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid6822522 +\loch\af31506\hich\af31506\dbch\f31505 \'b2\'e9\'d4\'c4\'c8\'d5\'d6\'be}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid6822522\charrsid6822522 \hich\af31506\dbch\af31505\loch\f31506 load_warning_}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid6822522 +\hich\af31506\dbch\af31505\loch\f31506 )}{\rtlch\fcs1 \af0 \ltrch\fcs0 \insrsid5968504\charrsid13054739 +\par }{\*\themedata 504b030414000600080000002100e9de0fbfff0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb4ec3301045f748fc83e52d4a +9cb2400825e982c78ec7a27cc0c8992416c9d8b2a755fbf74cd25442a820166c2cd933f79e3be372bd1f07b5c3989ca74aaff2422b24eb1b475da5df374fd9ad +5689811a183c61a50f98f4babebc2837878049899a52a57be670674cb23d8e90721f90a4d2fa3802cb35762680fd800ecd7551dc18eb899138e3c943d7e503b6 +b01d583deee5f99824e290b4ba3f364eac4a430883b3c092d4eca8f946c916422ecab927f52ea42b89a1cd59c254f919b0e85e6535d135a8de20f20b8c12c3b0 +0c895fcf6720192de6bf3b9e89ecdbd6596cbcdd8eb28e7c365ecc4ec1ff1460f53fe813d3cc7f5b7f020000ffff0300504b030414000600080000002100a5d6 +a7e7c0000000360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4f +c7060abb0884a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b6309512 +0f88d94fbc52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462 +a1a82fe353bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f746865 +6d652f7468656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b +4b0d592c9c070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b +4757e8d3f729e245eb2b260a0238fd010000ffff0300504b0304140006000800000021002ead900ed10600008c1a0000160000007468656d652f7468656d652f +7468656d65312e786d6cec595d8bdb46147d2ff43f08bd3bfe92fcb1c41b6cd9ceb6d94d42eca4e471d61e5b931d698c66bc1b130225792c144ad39287064a5f +fa50da061268a1e9afd934254d217fa17746b63c638fbbc992c252b286451a9d7be7ccbd57e78ea4f3176e47d439c409272c6eb8c57305d7c1f1800d493c6eb8 +d7fbdd5ccd75b840f1105116e3863bc3dcbdb0fde107e7d1960871841db08ff9166ab8a11093ad7c9e0f6018f1736c8263b836624984049c26e3fc304147e037 +a2f952a150c94788c4ae13a308dc5e198dc8003bcf7ffdede5770fdded85f70e852962c1e5c080263de91b1b260a3b3c284a049ff18026ce21a20d17261ab2a3 +3ebe2d5c87222ee042c32da83f37bf7d3e8fb6e646546cb0d5ecbaea6f6e3737181e94d49cc9783f9bd4f37cafd2ccfc2b0015ebb84eb553e954327f0a800603 +5869ca45f7e9b7eaadb63fc76aa0f4d0e2bb5d6d978b065ef35f5ee3dcf4e5cfc02b50eadf5bc377bb0144d1c02b508af7d7f09e572d059e8157a0145f59c357 +0bcdb65735f00a1452121faca10b7ea51c2c569b41468cee58e175dfeb564b73e74b145443565d728a118bc5a65a8bd02d96740120811409123b6236c1233480 +320e1025fb097176c93884c29ba09871182e940add4219fecb9fa78e5444d016469ab5e4054cf8da90e4e3f0414226a2e17e0c5e5d0df2fad98faf9f3d718eef +3d3dbef7cbf1fdfbc7f77e4e1d19563b281eeb56afbeffe2ef479f3a7f3df9f6d583afec78aee3fff8e9b3e7bf7f6907c24a972178f1f5e33f9f3e7ef1f0f397 +3f3cb0c09b09dad7e17d1261ee5cc647ce3516c1c254084ce6783f793b8b7e88886ed18cc71cc548ce62f1df11a181be3c431459702d6c46f046021263035e9c +de3208f7c2642a88c5e3a53032807b8cd1164bac51b824e7d2c2dc9fc663fbe4c954c75d43e8d03677806223bf9de904b495d85c062136685ea52816688c632c +1c798d1d606c59dd4d428cb8ee9141c2381b09e726715a885843d227fb46352d8d7648047999d90842be8dd8ecdd705a8cda56ddc6872612ee0a442de4fb981a +61bc88a6024536977d14513de0bb48843692bd5932d0711d2e20d3634c99d31962ce6d36571258af96f44b202ff6b4efd159642213410e6c3e7711633ab2cd0e +821045131bb647e250c77ec40fa044917395091b7c8f9977883c873ca07863ba6f106ca4fb6435b80ecaaa535a1688bc324d2cb9bc889951bfbd191d21aca406 +84dfd0f388c4278afb8aacfbffadac8390bef8e69165556755d09b09b1de513b2b32be09b72ade014b86e4ec6b771b4de3ab186e97f506f65ebadf4bb7fbbf97 +ee4df7f3bb17eca546837ccbad62ba55571bf768e3be7d4428ed8919c5bb5c6ddd3974a6611706a59d7a68c5d973dc2484437927c304066e9c2065e3244c7c42 +44d80bd104f6f745573a19f3b9eb3177268cc3b65f0d5b7d4b3c9d467b6c983eae168bf2d134150f8ec472bce067e3f0a8215274a5ba7c04cbdc2bb663f5a8bc +20206ddf8684369949a26c21515d0cca20a90773089a85845ad93b6151b7b0a849f78b54adb1006a595660ebe4c086abe1fa1e9880113c51218a87324f69aa17 +d955c97c9799de144ca302601fb1a88065a6eb92ebc6e5c9d5a5a5f60699364868e566925091513d8c876888e7d52947df84c6dbe6babe4ca9414f8642cd07a5 +b5a451adfd1b8bd3e61aec56b581c6ba52d0d8396ab895b20f25334093863b82c77e388c26503b5c6e79111dc3cbb38148d21bfe34ca3249b868231ea60157a2 +93aa4144044e1c4aa2862b979fa581c64a4314b7620904e1cc92ab83ac9c3572907433c97834c203a1a75d1b91914e4f41e153adb05e55e6a7074b4b368574f7 +c2e191b34fa7c9350425e6578b328043c2e1ed4f318de690c0ebcc4cc896f5b7d298e6b2abbf4f5435948e233a09d1bca3e8629ec295946774d4591603ed6cbe +6608a816927923dc1fcb06ab07d5e8a659d748396cecba271bc9c869a2b9ec9986aac8ae6957316386451b5889e5e99abcc66a1162d034bdc3a7d2bd2ab9f585 +d6adec13b22e0101cfe267e9ba6fd010346acbc90c6a92f1ba0c4bcd9e8f9abd63b1c013a8bd4993d054bfb270bb12b7ac4758a783c153757eb05bad5a181a2d +f6952ad2eac387fe6982eddf02f168c34be029155ca5123e3c240836443db5274965036e91db627e6bc091334d48c3bd53f09b5e50f2835ca1e677725ed92be4 +6a7eb39c6bfa7eb9d8f18b8576ab74171a8b08a3a29f7e74e9c2ab283a9b7f7a51e36b9f5fa2c5dbb6730316e599fabc9257c4d5e79762c9f6f9a52f3fafb80e +01d1b9532975ebe57aab92ab979bdd9cd76ed572f5a0d2cab52b41b5dd6d077eaddebdeb3a870aec35cb8157e9d472956210e4bc4a41d2afd57355af546a7ad5 +66ade335efceb731b0f2543ee6b180f02a5edbff000000ffff0300504b0304140006000800000021000dd1909fb60000001b010000270000007468656d652f74 +68656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484f78277086f6fd3ba109126dd88d0add40384e4350d363f24 +51eced0dae2c082e8761be9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e89d93b64b060828e6f37ed1567914b284d262452282e3198 +720e274a939cd08a54f980ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd5001996509affb3fd381a89672f1f165dfe514173d9850528 +a2c6cce0239baa4c04ca5bbabac4df000000ffff0300504b01022d0014000600080000002100e9de0fbfff0000001c0200001300000000000000000000000000 +000000005b436f6e74656e745f54797065735d2e786d6c504b01022d0014000600080000002100a5d6a7e7c0000000360100000b000000000000000000000000 +00300100005f72656c732f2e72656c73504b01022d00140006000800000021006b799616830000008a0000001c00000000000000000000000000190200007468 +656d652f7468656d652f7468656d654d616e616765722e786d6c504b01022d00140006000800000021002ead900ed10600008c1a000016000000000000000000 +00000000d60200007468656d652f7468656d652f7468656d65312e786d6c504b01022d00140006000800000021000dd1909fb60000001b010000270000000000 +0000000000000000db0900007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d010000d60a00000000} +{\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d +617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169 +6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363 +656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e} +{\*\latentstyles\lsdstimax371\lsdlockeddef0\lsdsemihiddendef0\lsdunhideuseddef0\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 1; +\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 2;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 3;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 4; +\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 5;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 6;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 7; +\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 8;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 9;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 1; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 5; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 6;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 7;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 8;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 9; +\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 1;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 2;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 3; +\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 4;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 5;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 6; +\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 7;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 8;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 9;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Normal Indent; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footnote text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 header;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footer; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index heading;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority35 \lsdlocked0 caption;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 table of figures; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 envelope address;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 envelope return;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footnote reference;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation reference; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 line number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 page number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 endnote reference;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 endnote text; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 table of authorities;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 macro;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 toa heading;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 3; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 3; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 3; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 5;\lsdqformat1 \lsdpriority10 \lsdlocked0 Title;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Closing; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Signature;\lsdsemihidden1 \lsdunhideused1 \lsdpriority1 \lsdlocked0 Default Paragraph Font;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 4; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Message Header;\lsdqformat1 \lsdpriority11 \lsdlocked0 Subtitle;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Salutation; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Date;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text First Indent;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text First Indent 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Note Heading; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent 3; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Block Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Hyperlink;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 FollowedHyperlink;\lsdqformat1 \lsdpriority22 \lsdlocked0 Strong; +\lsdqformat1 \lsdpriority20 \lsdlocked0 Emphasis;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Document Map;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Plain Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 E-mail Signature; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Top of Form;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Bottom of Form;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Normal (Web);\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Acronym; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Address;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Cite;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Code;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Definition; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Keyboard;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Preformatted;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Sample;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Typewriter; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Variable;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation subject;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 No List;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 1; +\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Balloon Text;\lsdpriority39 \lsdlocked0 Table Grid; +\lsdsemihidden1 \lsdlocked0 Placeholder Text;\lsdqformat1 \lsdpriority1 \lsdlocked0 No Spacing;\lsdpriority60 \lsdlocked0 Light Shading;\lsdpriority61 \lsdlocked0 Light List;\lsdpriority62 \lsdlocked0 Light Grid; +\lsdpriority63 \lsdlocked0 Medium Shading 1;\lsdpriority64 \lsdlocked0 Medium Shading 2;\lsdpriority65 \lsdlocked0 Medium List 1;\lsdpriority66 \lsdlocked0 Medium List 2;\lsdpriority67 \lsdlocked0 Medium Grid 1;\lsdpriority68 \lsdlocked0 Medium Grid 2; +\lsdpriority69 \lsdlocked0 Medium Grid 3;\lsdpriority70 \lsdlocked0 Dark List;\lsdpriority71 \lsdlocked0 Colorful Shading;\lsdpriority72 \lsdlocked0 Colorful List;\lsdpriority73 \lsdlocked0 Colorful Grid;\lsdpriority60 \lsdlocked0 Light Shading Accent 1; +\lsdpriority61 \lsdlocked0 Light List Accent 1;\lsdpriority62 \lsdlocked0 Light Grid Accent 1;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 1;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 1;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 1; +\lsdsemihidden1 \lsdlocked0 Revision;\lsdqformat1 \lsdpriority34 \lsdlocked0 List Paragraph;\lsdqformat1 \lsdpriority29 \lsdlocked0 Quote;\lsdqformat1 \lsdpriority30 \lsdlocked0 Intense Quote;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 1; +\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 1;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 1;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 1;\lsdpriority70 \lsdlocked0 Dark List Accent 1;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 1; +\lsdpriority72 \lsdlocked0 Colorful List Accent 1;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 1;\lsdpriority60 \lsdlocked0 Light Shading Accent 2;\lsdpriority61 \lsdlocked0 Light List Accent 2;\lsdpriority62 \lsdlocked0 Light Grid Accent 2; +\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 2;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 2;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 2;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 2; +\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 2;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 2;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 2;\lsdpriority70 \lsdlocked0 Dark List Accent 2;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 2; +\lsdpriority72 \lsdlocked0 Colorful List Accent 2;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 2;\lsdpriority60 \lsdlocked0 Light Shading Accent 3;\lsdpriority61 \lsdlocked0 Light List Accent 3;\lsdpriority62 \lsdlocked0 Light Grid Accent 3; +\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 3;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 3;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 3;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 3; +\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 3;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 3;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 3;\lsdpriority70 \lsdlocked0 Dark List Accent 3;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 3; +\lsdpriority72 \lsdlocked0 Colorful List Accent 3;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 3;\lsdpriority60 \lsdlocked0 Light Shading Accent 4;\lsdpriority61 \lsdlocked0 Light List Accent 4;\lsdpriority62 \lsdlocked0 Light Grid Accent 4; +\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 4;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 4;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 4;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 4; +\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 4;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 4;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 4;\lsdpriority70 \lsdlocked0 Dark List Accent 4;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 4; +\lsdpriority72 \lsdlocked0 Colorful List Accent 4;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 4;\lsdpriority60 \lsdlocked0 Light Shading Accent 5;\lsdpriority61 \lsdlocked0 Light List Accent 5;\lsdpriority62 \lsdlocked0 Light Grid Accent 5; +\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 5;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 5;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 5;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 5; +\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 5;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 5;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 5;\lsdpriority70 \lsdlocked0 Dark List Accent 5;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 5; +\lsdpriority72 \lsdlocked0 Colorful List Accent 5;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 5;\lsdpriority60 \lsdlocked0 Light Shading Accent 6;\lsdpriority61 \lsdlocked0 Light List Accent 6;\lsdpriority62 \lsdlocked0 Light Grid Accent 6; +\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 6;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 6;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 6;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 6; +\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 6;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 6;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 6;\lsdpriority70 \lsdlocked0 Dark List Accent 6;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 6; +\lsdpriority72 \lsdlocked0 Colorful List Accent 6;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 6;\lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle Emphasis;\lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis; +\lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference;\lsdqformat1 \lsdpriority32 \lsdlocked0 Intense Reference;\lsdqformat1 \lsdpriority33 \lsdlocked0 Book Title;\lsdsemihidden1 \lsdunhideused1 \lsdpriority37 \lsdlocked0 Bibliography; +\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority39 \lsdlocked0 TOC Heading;\lsdpriority41 \lsdlocked0 Plain Table 1;\lsdpriority42 \lsdlocked0 Plain Table 2;\lsdpriority43 \lsdlocked0 Plain Table 3;\lsdpriority44 \lsdlocked0 Plain Table 4; +\lsdpriority45 \lsdlocked0 Plain Table 5;\lsdpriority40 \lsdlocked0 Grid Table Light;\lsdpriority46 \lsdlocked0 Grid Table 1 Light;\lsdpriority47 \lsdlocked0 Grid Table 2;\lsdpriority48 \lsdlocked0 Grid Table 3;\lsdpriority49 \lsdlocked0 Grid Table 4; +\lsdpriority50 \lsdlocked0 Grid Table 5 Dark;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 1;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 1; +\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 1;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 1;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 1;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 1; +\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 1;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 2;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 2;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 2; +\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 2;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 2;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 2;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 2; +\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 3;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 3;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 3;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 3; +\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 3;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 3;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 3;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 4; +\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 4;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 4;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 4;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 4; +\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 4;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 4;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 5;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 5; +\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 5;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 5;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 5;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 5; +\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 5;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 6;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 6;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 6; +\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 6;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 6;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 6;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 6; +\lsdpriority46 \lsdlocked0 List Table 1 Light;\lsdpriority47 \lsdlocked0 List Table 2;\lsdpriority48 \lsdlocked0 List Table 3;\lsdpriority49 \lsdlocked0 List Table 4;\lsdpriority50 \lsdlocked0 List Table 5 Dark; +\lsdpriority51 \lsdlocked0 List Table 6 Colorful;\lsdpriority52 \lsdlocked0 List Table 7 Colorful;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 1;\lsdpriority47 \lsdlocked0 List Table 2 Accent 1;\lsdpriority48 \lsdlocked0 List Table 3 Accent 1; +\lsdpriority49 \lsdlocked0 List Table 4 Accent 1;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 1;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 1;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 1; +\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 2;\lsdpriority47 \lsdlocked0 List Table 2 Accent 2;\lsdpriority48 \lsdlocked0 List Table 3 Accent 2;\lsdpriority49 \lsdlocked0 List Table 4 Accent 2; +\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 2;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 2;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 2;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 3; +\lsdpriority47 \lsdlocked0 List Table 2 Accent 3;\lsdpriority48 \lsdlocked0 List Table 3 Accent 3;\lsdpriority49 \lsdlocked0 List Table 4 Accent 3;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 3; +\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 3;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 3;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 4;\lsdpriority47 \lsdlocked0 List Table 2 Accent 4; +\lsdpriority48 \lsdlocked0 List Table 3 Accent 4;\lsdpriority49 \lsdlocked0 List Table 4 Accent 4;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 4;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 4; +\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 4;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 5;\lsdpriority47 \lsdlocked0 List Table 2 Accent 5;\lsdpriority48 \lsdlocked0 List Table 3 Accent 5; +\lsdpriority49 \lsdlocked0 List Table 4 Accent 5;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 5;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 5;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 5; +\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 6;\lsdpriority47 \lsdlocked0 List Table 2 Accent 6;\lsdpriority48 \lsdlocked0 List Table 3 Accent 6;\lsdpriority49 \lsdlocked0 List Table 4 Accent 6; +\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 6;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 6;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 6;}}{\*\datastore 010500000200000018000000 +4d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000 +d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e5000000000000000000000000b068 +671399bfd001feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000105000000000000}} \ No newline at end of file diff --git a/Source/ForCPlusPlus/BeanFactory.h b/Source/ForCPlusPlus/BeanFactory.h new file mode 100644 index 0000000000000000000000000000000000000000..e874599bf78254c24d0b4d48e4132f7a2e867865 --- /dev/null +++ b/Source/ForCPlusPlus/BeanFactory.h @@ -0,0 +1,114 @@ +#if _MSC_VER > 1000 +#pragma once +#endif + +#include "MyBeanInterfaceForCPlus.h" +#include +#include + +using namespace std; + +/// ´´½¨²å¼þ·½·¨ +typedef void(*CreateInstanceMethod)(IInterface ** instance); + + + +class BeanInfo +{ +private: + IInterface * instance; +public: + BeanInfo(); + ~BeanInfo(); + string beanid; + CreateInstanceMethod createMethod; +}; + +class BeanFactory :public IBeanFactory, IBeanFactory4CPlus +{ +private: + long m_ref; + map beanInfoList; + void ClearBeanInfoList(); +public: + BeanFactory(); + ~BeanFactory(); + HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppv); + ULONG STDMETHODCALLTYPE AddRef(); + ULONG STDMETHODCALLTYPE Release(); + + BeanInfo * RegisterBean(string beanid, CreateInstanceMethod method); +public: + /// + /// »ñÈ¡ËùÓеIJå¼þID + /// ·µ»Ø»ñÈ¡IDµÄ³¤¶È·Ö¸ô·û#10#13 + /// + int __stdcall GetBeanList(PMyBeanChar IDs, int len); + + /// + /// ¸ù¾ÝbeanID»ñÈ¡¶ÔÓ¦µÄ²å¼þ + /// + /// function GetBean(pvBeanID: PAnsiChar): IInterface; stdcall; + HRESULT __stdcall GetBean(PMyBeanChar beanId); + + /// + /// ¸ù¾ÝbeanID»ñÈ¡¶ÔÓ¦µÄ²å¼þ + /// + /// function GetBeanForCPlus(pvBeanID: PAnsiChar; out vInstance : IInterface) : HRESULT; stdcall; + HRESULT __stdcall GetBeanForCPlus(PMyBeanChar beanId, IInterface **p); + + /// + /// ³õʼ»¯,¼ÓÔØDLLºóÖ´ÐÐ + /// + /// procedure CheckInitalize; stdcall; + void __stdcall CheckInitalize(); + + /// + /// Ð¶ÔØDLL֮ǰִÐÐ + /// + /// procedure CheckFinalize; stdcall; + void __stdcall CheckFinalize(); + + /// + /// ÅäÖÃËùÓÐbeanµÄÏà¹ØµÄÅäÖÃ,»á¸²¸Ç֮ǰµÄBeanÅäÖà + /// pvConfigÊÇJson¸ñʽ + /// beanID(mapKey) + /// { + /// id:xxxx, + /// ..... + /// } + /// + /// function ConfigBeans(pvConfig:PAnsiChar) : Integer; stdcall; + int __stdcall ConfigBeans(PMyBeanChar config); + + /// + /// ÅäÖÃbeanµÄÏà¹ØÐÅÏ¢ + /// pvConfigÊÇJson¸ñʽµÄ²ÎÊý + /// »á¸²¸Ç֮ǰµÄbeanÅäÖà + /// { + /// id:xxxx, + /// ..... + /// } + /// + /// function ConfigBean(pvBeanID, pvConfig: PAnsiChar) : Integer; stdcall; + int __stdcall ConfigBean(PMyBeanChar beanId, PMyBeanChar config); + + + /// + /// ÅäÖÃbeanÅäÖà + /// pluginID,ÄÚ²¿µÄ²å¼þID + /// + /// function ConfigBeanPluginID(pvBeanID, pvPluginID: PAnsiChar) : Integer; stdcall; + int __stdcall ConfigBeanPluginID(PMyBeanChar beanId, PMyBeanChar pluginId); + + /// + /// ÅäÖÃbeanÅäÖà + /// singleton,µ¥ÊµÀý, + /// ÅäÖõ¥ÊµÀýʱ£¬Çë×¢ÒâҪô¶ÔÏóÓнӿڹÜÀíÉúÃüÖÜÆÚ£¬ÒªÃ´ÊµÏÖIFreeObject½Ó¿Ú + /// ²»ÒªÊÖ¶¯ÊÍ·ÅÊͷŶÔÏó. + /// + /// function ConfigBeanSingleton(pvBeanID: PAnsiChar; pvSingleton:Boolean) : Integer; stdcall; + int __stdcall ConfigBeanSingleton(PMyBeanChar beanId, bool pvSingleton); +}; + + diff --git a/Source/ForCPlusPlus/MyBeanDesignMode.h b/Source/ForCPlusPlus/MyBeanDesignMode.h new file mode 100644 index 0000000000000000000000000000000000000000..ad6107f0966d45dff6c9c8922dc00e3770b1d243 --- /dev/null +++ b/Source/ForCPlusPlus/MyBeanDesignMode.h @@ -0,0 +1,136 @@ +#if _MSC_VER > 1000 +#pragma once +#endif + +#include "mybeanInterfaceForCPlus.h" + +/// +/// ¶©ÔÄÕìÌýÕß +/// +/// ISubscribeListener = interface +/// ['{ECC2BDC4-737E-4493-BFF1-DCC7B5CE0BD8}'] +interface DECLSPEC_UUID("{ECC2BDC4-737E-4493-BFF1-DCC7B5CE0BD8}") +ISubscribeListener: public IInterface{ + +/// +/// Ìí¼ÓÁËÒ»¸ö¶©ÔÄÕß +/// +/// ¶©ÔÄÕßID +/// ¶©ÔÄÕß +/// procedure OnAddSubscriber(pvSubscriberID: Integer; const pvSubscriber : IInterface); stdcall; +virtual void __stdcall OnAddSubscriber(int index, const IInterface * subscriber) = 0; + + +/// +/// ÒÆ³ýÁËÒ»¸ö¶©ÔÄÕß +/// +/// ¶©ÔÄÕßID +/// procedure OnRemoveSubscriber(pvSubscriberID: Integer); stdcall; +virtual void __stdcall OnRemoveSubscriber(int subscriberId) = 0; +}; + + +/// +/// ·¢²¼Õß½Ó¿Ú +/// +///IPublisher = interface +///['{AF590D7D-2E86-4729-8282-0423781EBB4C}'] +interface DECLSPEC_UUID("{AF590D7D-2E86-4729-8282-0423781EBB4C}") +IPublisher: public IInterface{ + +/// +/// ×¢²áÒ»¸öÕìÌýÕßµ½·¢²¼ÕßʵÀýÖÐ +/// +/// +/// ·µ»ØÒ»¸öID,ÒÆ³ýʱͨ¹ý¸ÃID½øÐÐÒÆ³ý, ×¢²áʧ°Ü·µ»Ø-1 +/// +/// (IInterface) +/// function AddSubscriber(const pvSubscriber : IInterface) : Integer; stdcall; +virtual int __stdcall AddSubscriber(const IInterface *p) = 0; + +/// +/// ´Ó·¢²¼ÕßÖÐÒÆ³ýµôÒ»¸öÕìÌýÕß +/// +/// +/// ³É¹¦·µ»ØTrue, ʧ°Ü·µ»Ø:False +/// +/// ¶©ÔÄÕßID(Ìí¼Óʱ·µ»ØµÄID) +/// function RemoveSubscriber(pvSubscriberID: Integer) : HRESULT; stdcall; +virtual HRESULT __stdcall RemoveSubscriber(int subscriberId) = 0; + + +/// +/// »ñÈ¡¶©ÔÄÕßÊýÁ¿ +/// +/// +/// ¸öÊý +/// +/// function GetSubscriberCount : Integer; stdcall; +virtual int __stdcall GetSubscriberCount() = 0; + + +/// +/// »ñÈ¡ÆäÖеÄÒ»¸ö¶©ÔÄÕß +/// +/// +/// S_OK,»ñÈ¡³É¹¦ +/// +/// ÐòºÅ +/// ·µ»ØµÄ¶©ÔÄÕß +/// function GetSubscriber(pvIndex: Integer; out vSubscribeInstance : IInterface) :HRESULT; stdcall; +virtual HRESULT __stdcall GetSubscriber(int index, IInterface ** vSubscribeInstance) = 0; + + +/// +/// Ìí¼ÓÁËÒ»¸ö¶©ÔÄÕìÌýÕß +/// Ìí¼Ó»òÕßÒÆ³ý¶©ÔÄÕßʱ½øÐÐ֪ͨ +/// +/// +/// S_OK: ³É¹¦ +/// +/// ¶©ÔÄÕìÌýÕß +/// function AddSubscribeListener(const pvInstance : ISubscribeListener) : HRESULT; stdcall; +virtual HRESULT __stdcall AddSubscribeListener(const ISubscribeListener * p) = 0; + +/// +/// ÒÆ³ýÒ»¸ö¶©ÔÄÕìÌýÕß +/// +/// S_OK: ³É¹¦ +/// +/// (ISubscribeListener) +/// function RemoveSubscribeListener(const pvInstance : ISubscribeListener) : HRESULT; stdcall; +virtual HRESULT __stdcall RemoveSubscribeListener(const ISubscribeListener * p) = 0; +}; + +/// +/// MyBean ¶©ÔÄģʽÖÐÐÄ +/// +/// ISubscribeCenter = interface +// ['{805F8214-6766-4A51-9CD8-09BE67B8D383}'] +interface DECLSPEC_UUID("{805F8214-6766-4A51-9CD8-09BE67B8D383}") +ISubscribeCenter: public IInterface{ + +/// +/// ͨ¹ý·¢²¼ÕßID»ñȡһ¸ö·¢²¼Õß½Ó¿ÚʵÀý, Èç¹û¸ÃʵÀý²»´æÔÚÔò½øÐд´½¨¡£·ñÔòÖ±½Ó·µ»Ø +/// Ḭ̈߳²È«°æ±¾( +/// +/// +/// S_OK£º»ñÈ¡³É¹¦ +/// S_FALSE: »ñȡʧ°Ü +/// +/// ͬһ¸öpvPublisherID»ñÈ¡µÄ·¢²¼ÕßʵÀýÊÇÏàͬµÄ +/// ·µ»ØµÄ½Ó¿ÚʵÀý +/// function GetPublisher(pvPublisherID:PMyBeanChar; out vPubInstance : IPublisher) : HRESULT; stdcall; +virtual HRESULT __stdcall GetPublisher(PMyBeanChar publisherId, IPublisher **p) = 0; +}; + + +/// +/// »ñȡһ¸ö¶©ÔÄÕß½Ó¿ÚʵÀý +/// +extern IPublisher * GetPublisher(PMyBeanChar publisherId); + +/// +/// Ïò·¢²¼ÕßÌí¼ÓÒ»¸ö¶©ÔÄÕß +/// +extern bool AddSubscriber(PMyBeanChar publisherId, IInterface * subscriber); \ No newline at end of file diff --git a/Source/ForCPlusPlus/MyBeanDesignModeServiceImpl.h b/Source/ForCPlusPlus/MyBeanDesignModeServiceImpl.h new file mode 100644 index 0000000000000000000000000000000000000000..271db8e6d03d6eea7426c2a9a65eb9ece4275568 --- /dev/null +++ b/Source/ForCPlusPlus/MyBeanDesignModeServiceImpl.h @@ -0,0 +1,53 @@ +#if _MSC_VER > 1000 +#pragma once +#endif + +#include "MyBeanDesignMode.h" + + + + +/// È«¾ÖµÄ²å¼þ¹¤³Ì±äÁ¿ÐÞÊÎ +/// +/// »ñȡһ¸ö¶©ÔÄÕß½Ó¿ÚʵÀý +/// +IPublisher * GetPublisher(PMyBeanChar publisherId) +{ + + IInterface * intf = GetBean("MyBeanSubscribeCenter"); + ISubscribeCenter * subscribeCenter = NULL; + IPublisher * publisher = NULL; + if (intf != NULL) + { + if (intf->QueryInterface(__uuidof(ISubscribeCenter), (void**)&subscribeCenter) == S_OK) + { + intf->Release(); + subscribeCenter->GetPublisher(publisherId, (IPublisher**)&publisher); + subscribeCenter->Release(); + return publisher; + } + else + { + intf->Release(); + return NULL; + } + } +} + +/// +/// Ïò·¢²¼ÕßÌí¼ÓÒ»¸ö¶©ÔÄÕß +/// +bool AddSubscriber(PMyBeanChar publisherId, IInterface * subscriber) +{ + IPublisher * publisher = GetPublisher(publisherId); + if (publisher != NULL) + { + publisher->AddSubscriber(subscriber); + publisher->Release(); + return true; + } + else + { + return false; + } +} \ No newline at end of file diff --git a/Source/ForCPlusPlus/MyBeanInterfaceForCPlus.h b/Source/ForCPlusPlus/MyBeanInterfaceForCPlus.h new file mode 100644 index 0000000000000000000000000000000000000000..e5d93d49a04e7bcf0eadc1affb7df50598dc35f5 --- /dev/null +++ b/Source/ForCPlusPlus/MyBeanInterfaceForCPlus.h @@ -0,0 +1,151 @@ +#if _MSC_VER > 1000 +#pragma once +#endif + +#include + +#define MyBeanChar char +#define PMyBeanChar char * + +typedef IUnknown IInterface; + +/// TGetInterfaceFunctionForStdcall = function(out vIntf : IInterface) :HRESULT; stdcall; +typedef HRESULT(__stdcall *TGetInterfaceFunctionForStdcall) (IInterface ** instance); + +/// +/// C++ ÓïÑÔµ÷ÓõĽӿÚ, Ö÷¿ØÌ¨Ìṩ +/// +interface DECLSPEC_UUID("{9A7238C4-5A47-494B-9058-77500C1622DC}") +IApplicationContextForCPlus: public IInterface{ + /// + /// ¸ù¾ÝbeanID»ñÈ¡¶ÔÓ¦µÄ²å¼þ + /// + /// function GetBeanForCPlus(pvBeanID: PAnsiChar; out vInstance : IInterface) : HRESULT; stdcall; + virtual HRESULT __stdcall GetBeanForCPlus(PMyBeanChar beanId, IInterface **p) = 0; + + /// + /// »ñÈ¡beanID¶ÔÓ¦µÄ¹¤³§½Ó¿Ú + /// + /// function GetBeanFactoryForCPlus(pvBeanID:PAnsiChar; out vInstance : IInterface) : HRESULT; stdcall; + virtual HRESULT __stdcall GetBeanFactoryForCPlus(PMyBeanChar beanId, IInterface **p) = 0; +}; + + +/// +/// C++ ÓïÑÔµ÷ÓõĽӿÚ, Ö÷¿ØÌ¨Ìṩ +/// +interface DECLSPEC_UUID("{66828066-38B7-4613-8F9B-627CB76D84F2}") +IStrMapForCPlus: public IInterface{ +/// +/// ¸ù¾ÝkeyÖµ»ñÈ¡½Ó¿Ú +/// +/// function GetValue(pvKey:PAnsiChar; out vIntf : IInterface) : HRESULT; stdcall; +virtual HRESULT __stdcall GetValue(PMyBeanChar beanId, IInterface **p) = 0; + + +/// +/// ¸³Öµ½Ó¿Ú +/// +/// function SetValue(pvKey:PAnsiChar; pvIntf: IInterface) : HRESULT; stdcall; +virtual HRESULT __stdcall SetValue(PMyBeanChar beanId, IInterface * p) = 0; + +/// +/// ÒÆ³ý½Ó¿Ú +/// +/// function Remove(pvKey:PAnsiChar) : HRESULT; stdcall; +virtual HRESULT __stdcall Remove(PMyBeanChar beanId) = 0; + +/// +/// ÅжÏÊÇ·ñ´æÔÚ½Ó¿Ú +/// +/// function Exists(pvKey:PAnsiChar) : HRESULT; stdcall; +virtual HRESULT __stdcall Exists(PMyBeanChar beanId) = 0; +}; + + +/// +/// ²å¼þ¹¤³§½Ó¿Ú,Óɲå¼þËÞÖ÷(DLL, BPL)¿âÎļþÌṩ +/// +interface DECLSPEC_UUID("{480EC845-2FC0-4B45-932A-57711D518E70}") +IBeanFactory: public IInterface{ + /// + /// »ñÈ¡ËùÓеIJå¼þID + /// ·µ»Ø»ñÈ¡IDµÄ³¤¶È·Ö¸ô·û#10#13 + /// + virtual int __stdcall GetBeanList(PMyBeanChar IDs, int len) = 0; + + /// + /// ¸ù¾ÝbeanID»ñÈ¡¶ÔÓ¦µÄ²å¼þ + /// + /// function GetBean(pvBeanID: PAnsiChar): IInterface; stdcall; + virtual HRESULT __stdcall GetBean(PMyBeanChar beanId) = 0; + + + /// + /// ³õʼ»¯,¼ÓÔØDLLºóÖ´ÐÐ + /// + /// procedure CheckInitalize; stdcall; + virtual void __stdcall CheckInitalize() = 0; + + /// + /// Ð¶ÔØDLL֮ǰִÐÐ + /// + /// procedure CheckFinalize; stdcall; + virtual void __stdcall CheckFinalize() = 0; + + /// + /// ÅäÖÃËùÓÐbeanµÄÏà¹ØµÄÅäÖÃ,»á¸²¸Ç֮ǰµÄBeanÅäÖà + /// pvConfigÊÇJson¸ñʽ + /// beanID(mapKey) + /// { + /// id:xxxx, + /// ..... + /// } + /// + /// function ConfigBeans(pvConfig:PAnsiChar) : Integer; stdcall; + virtual int __stdcall ConfigBeans(PMyBeanChar config) = 0; + + /// + /// ÅäÖÃbeanµÄÏà¹ØÐÅÏ¢ + /// pvConfigÊÇJson¸ñʽµÄ²ÎÊý + /// »á¸²¸Ç֮ǰµÄbeanÅäÖà + /// { + /// id:xxxx, + /// ..... + /// } + /// + /// function ConfigBean(pvBeanID, pvConfig: PAnsiChar) : Integer; stdcall; + virtual int __stdcall ConfigBean(PMyBeanChar beanId, PMyBeanChar config) = 0; + + + /// + /// ÅäÖÃbeanÅäÖà + /// pluginID,ÄÚ²¿µÄ²å¼þID + /// + /// function ConfigBeanPluginID(pvBeanID, pvPluginID: PAnsiChar) : Integer; stdcall; + virtual int __stdcall ConfigBeanPluginID(PMyBeanChar beanId, PMyBeanChar pluginId) = 0; + + /// + /// ÅäÖÃbeanÅäÖà + /// singleton,µ¥ÊµÀý, + /// ÅäÖõ¥ÊµÀýʱ£¬Çë×¢ÒâҪô¶ÔÏóÓнӿڹÜÀíÉúÃüÖÜÆÚ£¬ÒªÃ´ÊµÏÖIFreeObject½Ó¿Ú + /// ²»ÒªÊÖ¶¯ÊÍ·ÅÊͷŶÔÏó. + /// + /// function ConfigBeanSingleton(pvBeanID: PAnsiChar; pvSingleton:Boolean) : Integer; stdcall; + virtual int __stdcall ConfigBeanSingleton(PMyBeanChar beanId, bool pvSingleton) = 0; + + }; + + + /// + /// C++ µÄÀ©Õ¹ÊµÏÖ²å¼þ¹¤³§ + /// + interface DECLSPEC_UUID("{D6F1B138-ECEA-44FC-A3E3-0B5169F1077A}") + IBeanFactory4CPlus: public IInterface{ + /// + /// ¸ù¾ÝbeanID»ñÈ¡¶ÔÓ¦µÄ²å¼þ + /// + /// function GetBeanForCPlus(pvBeanID: PAnsiChar; out vInstance : IInterface) : HRESULT; stdcall; + virtual HRESULT __stdcall GetBeanForCPlus(PMyBeanChar beanId, IInterface **p) = 0; + }; + diff --git a/Source/ForCPlusPlus/MyBeanService.h b/Source/ForCPlusPlus/MyBeanService.h new file mode 100644 index 0000000000000000000000000000000000000000..94212f9be5da9341eb3d95d41f2a908fca9b0f14 --- /dev/null +++ b/Source/ForCPlusPlus/MyBeanService.h @@ -0,0 +1,9 @@ +#if _MSC_VER > 1000 +#pragma once +#endif + +/// È«¾ÖµÄ²å¼þ¹¤³Ì±äÁ¿ÐÞÊÎ +extern BeanFactory * __beanFactory; +extern IInterface * __applicationContext; +extern IInterface * __stdcall GetBean(PMyBeanChar beanID); +extern IInterface * GetMapObject(PMyBeanChar objId); \ No newline at end of file diff --git a/Source/ForCPlusPlus/MyBeanServiceImpl.h b/Source/ForCPlusPlus/MyBeanServiceImpl.h new file mode 100644 index 0000000000000000000000000000000000000000..4844afb477ef8f2af0392e9c7c0e60fdc0de2c19 --- /dev/null +++ b/Source/ForCPlusPlus/MyBeanServiceImpl.h @@ -0,0 +1,83 @@ +#if _MSC_VER > 1000 +#pragma once +#endif + +#include "mybeanInterfaceForCPlus.h" +#include "BeanFactory.h" + +/// È«¾ÖµÄ²å¼þ¹¤³§±äÁ¿ +BeanFactory * __beanFactory; + +/// È«¾ÖµÄApplicationContext +IInterface * __applicationContext; + +/// »ñÈ¡ApplicationContext½Ó¿Ú +TGetInterfaceFunctionForStdcall __ApplicationContextGetter; + +/// »ñÈ¡ApplicationKeyMap½Ó¿Ú +TGetInterfaceFunctionForStdcall __ApplicationMapGetter; + + +IStrMapForCPlus * GetApplicationMap() +{ + if (__ApplicationMapGetter == NULL) + { + return NULL; + } + else + { + IInterface * map; + __ApplicationMapGetter(&map); + if (map == NULL){ + return NULL; + } + else{ + IStrMapForCPlus * ret= NULL; + OutputDebugStringA("Map->QueryInterfaced(IStrMapForCPlus)\r\n"); + if (map->QueryInterface(__uuidof(IStrMapForCPlus), (void**)&ret) == S_OK) + { + map->Release(); + return ret; + } + else + { + map->Release(); + return NULL; + } + } + } +} + +IInterface * GetMapObject(PMyBeanChar objId) +{ + IStrMapForCPlus * map = GetApplicationMap(); + if (map != NULL) + { + IInterface * ret; + map->GetValue(objId, &ret); + map->Release(); + return ret; + } + else + { + return NULL; + } +} + + +IInterface * __stdcall GetBean(PMyBeanChar beanID){ + IApplicationContextForCPlus * applicationContext; + IInterface * ret; + const GUID intfIID = __uuidof(IApplicationContextForCPlus); + if (__applicationContext->QueryInterface(intfIID, (void**)&applicationContext) == S_OK) + { + applicationContext->GetBeanForCPlus(beanID, (IInterface**)&ret); + applicationContext->Release(); // QueryInterfaceÔÚDelphiÖнøÐÐÁËÀÛ¼Ó, ´¦ÀíÍê³Éºó ½øÐмõÉÙÒýÓà + return ret; + } + else + { + return NULL; + } +} + diff --git a/Source/mybean.console.loader.dll.pas b/Source/mybean.console.loader.dll.pas index 3165b0ed9e865a0f19194342a287af2ea84ffa3c..0e6c0f1901bcfb51e4a181015787725829b1ed2d 100644 --- a/Source/mybean.console.loader.dll.pas +++ b/Source/mybean.console.loader.dll.pas @@ -13,6 +13,7 @@ * * *) + unit mybean.console.loader.dll; @@ -34,14 +35,20 @@ type procedure DoInitalizeBeanFactory; procedure DoCreatePluginFactory; + procedure DoFinalizeBeanFactory; procedure DoInitialize; procedure SetLibFileName(const Value: String); + function GetBeanFactoryForCPlus(out beanFactory: IBeanFactory): Boolean; + public + function GetBeanIDList():String; public procedure CheckInitialize; override; procedure Cleanup; override; + procedure StartService; override; + /// /// ÅжÏÖ¸¶¨µÄLibÎļþÊÇ·ñÊÇMyBeanµÄ²å¼þÎļþ /// @@ -70,16 +77,49 @@ type implementation +function TLibFactoryObject.GetBeanFactoryForCPlus(out beanFactory: + IBeanFactory): Boolean; +var + lvProc:procedure(out beanFactory:IBeanFactory); stdcall; +begin + @lvProc := GetProcAddress(FLibHandle, PChar('GetBeanFactoryForCPlus')); + if (@lvProc <> nil) then + begin + lvProc(beanFactory); + FIsDelphiLib := False; + end; + Result := beanFactory <> nil; +end; + +function TLibFactoryObject.GetBeanIDList: String; +var + lvBeanIDs:array[1..4096] of AnsiChar; + lvRet:AnsiString; +begin + FillChar(lvBeanIDs[1], 4096, 0); + (FBeanFactory as IBeanFactory).getBeanList(@lvBeanIDs[1], 4096); + lvRet := StrPas(PAnsiChar(@lvBeanIDs[1])); + Result := lvRet; +end; + procedure TLibFactoryObject.DoCreatePluginFactory; var - lvFunc:function:IBeanFactory; stdcall; + lvFunc : function:IBeanFactory; stdcall; begin - @lvFunc := GetProcAddress(FLibHandle, PChar('getBeanFactory')); - if (@lvFunc = nil) then + if not GetBeanFactoryForCPlus(FBeanFactory) then begin - raise Exception.CreateFmt('·Ç·¨µÄPluginÄ£¿éÎļþ(%s),ÕÒ²»µ½Èë¿Úº¯Êý(getBeanFactory)', [self.FLibFileName]); + @lvFunc := GetProcAddress(FLibHandle, PChar('getBeanFactory')); + if (@lvFunc = nil) then + begin + raise Exception.CreateFmt('·Ç·¨µÄPluginÄ£¿éÎļþ(%s),ÕÒ²»µ½Èë¿Úº¯Êý(getBeanFactory)', [self.FLibFileName]); + end; + FBeanFactory := lvFunc; + if FBeanFactory = nil then + begin + raise Exception.CreateFmt('·Ç·¨µÄPluginÄ£¿éÎļþ(%s),getBeanFactory ·µ»ØµÄ¶ÔÏóΪNil', [self.FLibFileName]); + end; + FIsDelphiLib := True; end; - FBeanFactory := lvFunc; end; procedure TLibFactoryObject.DoFreeLibrary; @@ -101,22 +141,45 @@ end; procedure TLibFactoryObject.DoInitalizeBeanFactory; var lvFunc:procedure(appContext: IApplicationContext; appKeyMap: IKeyMap); stdcall; + lvProc:procedure(func: TGetInterfaceFunctionForStdcall) stdcall; begin - @lvFunc := GetProcAddress(FLibHandle, PChar('initializeBeanFactory')); - if (@lvFunc = nil) then + @lvFunc := GetProcAddress(FLibHandle, PChar('InitializeLibrary')); + if (@lvFunc <> nil) then + begin + lvFunc(appPluginContext, applicationKeyMap); + end else + begin + @lvFunc := GetProcAddress(FLibHandle, PChar('initializeBeanFactory')); + if (@lvFunc = nil) then + begin + raise Exception.CreateFmt( + '·Ç·¨µÄPluginÄ£¿éÎļþ(%s),ÕÒ²»µ½Èë¿Úº¯Êý(initializeBeanFactory)', + [self.FLibFileName]); + end; + lvFunc(appPluginContext, applicationKeyMap); + end; + + lvProc := GetProcAddress(FLibHandle, PChar('SetApplicationContextGetterFunction')); + if (@lvProc <> nil) then + begin + lvProc(__GetApplicationContextFunctionForStdcall); + end; + + lvProc := GetProcAddress(FLibHandle, PChar('SetApplicationMapGetterFunction')); + if (@lvProc <> nil) then begin - raise Exception.CreateFmt( - '·Ç·¨µÄPluginÄ£¿éÎļþ(%s),ÕÒ²»µ½Èë¿Úº¯Êý(initializeBeanFactory)', - [self.FLibFileName]); + lvProc(__GetApplicationMapFunctionForStdcall); end; - lvFunc(appPluginContext, applicationKeyMap); end; procedure TLibFactoryObject.DoInitialize; begin DoInitalizeBeanFactory; DoCreatePluginFactory; - FbeanFactory.checkInitalize; + if FIsDelphiLib then + begin + (FBeanFactory as IBeanFactory).CheckInitalize; + end; end; procedure TLibFactoryObject.CheckInitialize; @@ -136,8 +199,8 @@ begin lvBeanID := AnsiString(lvBeanConfig.S['id']); lvConfigStr := AnsiString(lvBeanConfig.AsJSon(false, false)); - //ÅäÖõ¥¸öbean - FbeanFactory.configBean(PAnsiChar(lvBeanID), PAnsiChar(lvConfigStr)); + (FBeanFactory as IBeanFactory).configBean(PAnsiChar(lvBeanID), PAnsiChar(lvConfigStr)); + end; end; @@ -169,8 +232,15 @@ begin if lvLibHandle <> 0 then begin try - @lvFunc := GetProcAddress(lvLibHandle, PChar('initializeBeanFactory')); + // ´óд + @lvFunc := GetProcAddress(lvLibHandle, PChar('InitializeLibrary')); result := (@lvFunc <> nil); + + if not Result then + begin + @lvFunc := GetProcAddress(lvLibHandle, PChar('initializeBeanFactory')); + result := (@lvFunc <> nil); + end; finally if Result then begin @@ -237,9 +307,21 @@ end; procedure TLibFactoryObject.Cleanup; begin + DoFinalizeBeanFactory; DoFreeLibrary; end; +procedure TLibFactoryObject.DoFinalizeBeanFactory; +var + lvFunc:procedure(); stdcall; +begin + @lvFunc := GetProcAddress(FLibHandle, PChar('FinalizeLibrary')); + if (@lvFunc <> nil) then + begin + lvFunc(); + end; +end; + function TLibFactoryObject.GetBean(pvBeanID:string): IInterface; begin result := inherited GetBean(pvBeanID); @@ -251,4 +333,16 @@ begin Fnamespace := FLibFileName; end; +procedure TLibFactoryObject.StartService; +var + lvFunc:procedure(); stdcall; +begin + @lvFunc := GetProcAddress(FLibHandle, PChar('StartLibraryService')); + if (@lvFunc <> nil) then + begin + lvFunc(); + end; + +end; + end. diff --git a/Source/mybean.console.loader.pas b/Source/mybean.console.loader.pas index f905d5bf5edee331639db9e486cb41302d38aa5c..8995c540ca4c4adbed868a0d8985a73bb71ab6a0 100644 --- a/Source/mybean.console.loader.pas +++ b/Source/mybean.console.loader.pas @@ -23,6 +23,8 @@ type private FTag: Integer; protected + // DelphiµÄ¿âÎļþ + FIsDelphiLib:Boolean; /// /// beanµÄÅäÖÃ,ÎļþÖжÁÈ¡µÄÓÐÒ»¸ölistÅäÖÃÊý×é /// @@ -40,6 +42,8 @@ type procedure CheckInitialize; virtual; + procedure StartService;virtual; + /// /// ¼ì²âÊÇ·ñÊÇÓÐЧµÄ²å¼þËÞÖ÷Îļþ /// @@ -55,11 +59,15 @@ type /// function GetBean(pvBeanID:string): IInterface; virtual; + + function GetBeanForCPlus(pvBeanId:string; out vInstance:IInterface): HRESULT; + /// /// DLLÖÐBeanFactory½Ó¿Ú /// property BeanFactory: IBeanFactory read FBeanFactory; + property Namespace: string read FNamespace; property Tag: Integer read FTag write FTag; @@ -96,18 +104,61 @@ begin end; function TBaseFactoryObject.GetBean(pvBeanID:string): IInterface; +var + lvFactoryCPlus:IBeanFactoryForCPlus; begin - if BeanFactory = nil then + if FBeanFactory = nil then begin CheckInitialize; + + // GetBeanµÄʱºòÈç¹ûFBeanFactory»¹Ã»Óи³Öµ£¬ + // ´ú±í¿âÎļþÊǰ´Ðè¼ÓÔØµÄ£¬ËùÒÔÐèÒªÖ´ÐÐÒ»´ÎStartService + StartService; end; - if BeanFactory <> nil then + if FBeanFactory <> nil then begin - Result := BeanFactory.GetBean(PAnsiChar(AnsiString(pvBeanID))); + if FBeanFactory.QueryInterface(IBeanFactoryForCPlus, lvFactoryCPlus) = S_OK then + begin // C++ ·½Ê½»ñÈ¡ + lvFactoryCPlus.GetBeanForCPlus(PAnsiChar(AnsiString(pvBeanID)), Result); + end else + begin + Result := FBeanFactory.GetBean(PAnsiChar(AnsiString(pvBeanID))); + end; end; end; +function TBaseFactoryObject.GetBeanForCPlus(pvBeanId:string; out + vInstance:IInterface): HRESULT; +var + lvFactoryCPlus:IBeanFactoryForCPlus; +begin + if FBeanFactory = nil then + begin + CheckInitialize; + end; + + if FBeanFactory <> nil then + begin + if FBeanFactory.QueryInterface(IBeanFactoryForCPlus, lvFactoryCPlus) = S_OK then + begin // C++ ·½Ê½»ñÈ¡ + Result := lvFactoryCPlus.GetBeanForCPlus(PAnsiChar(AnsiString(pvBeanID)), vInstance); + end else + begin + vInstance := FBeanFactory.GetBean(PAnsiChar(AnsiString(pvBeanID))); + Result := S_OK; + end; + end else + begin + Result := S_FALSE; + end; +end; + +procedure TBaseFactoryObject.StartService; +begin + +end; + { TBaseFactoryObject } procedure TBaseFactoryObject.CheckFinalize; diff --git a/Source/mybean.console.pas b/Source/mybean.console.pas index 422b6cd5be67ddc1d248175c3a4fd778376ed635..c8358b55eb09ee47828f5dcd6029630e69369f93 100644 --- a/Source/mybean.console.pas +++ b/Source/mybean.console.pas @@ -67,14 +67,16 @@ uses type TApplicationContext = class(TInterfacedObject + , IInterface , IApplicationContext + , IApplicationContextForCPlus , IApplicationContextEx01 , IApplicationContextEx2 , IApplicationContextEx3 , IbeanFactoryRegister ) private - FINIFile:TIniFile; + FIniFile: TIniFile; FTraceLoadFile: Boolean; @@ -85,7 +87,7 @@ type /// /// ±£´æbeanIDºÍFactoryObjectµÄ¶ÔÓ¦¹ØÏµ - /// + /// FBeanMapList: TStrings; procedure DoRegisterPluginIDS(pvPluginIDS: String; pvFactoryObject: @@ -93,12 +95,18 @@ type procedure DoRegisterPlugins(pvPlugins: TStrings; pvFactoryObject: TBaseFactoryObject); - procedure checkCreateINIFile; + procedure CheckCreateINIFile; function CheckInitializeFactoryObject(pvFactoryObject:TBaseFactoryObject; pvRaiseException:Boolean): Boolean; procedure removeRegistedBeans(pvLibFile:string); + + public + function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall; + function _AddRef: Integer; stdcall; + function _Release: Integer; stdcall; + protected /// /// Ð¶ÔØµôÖ¸¶¨µÄ²å¼þËÞÖ÷Îļþ(dll) @@ -146,6 +154,8 @@ type /// /// (PAnsiChar) function CheckLoadBeanConfigFile(pvConfigFile:PAnsiChar): Boolean; stdcall; + public + procedure StartLibraryService; protected /// @@ -219,7 +229,16 @@ type /// »ñÈ¡beanID¶ÔÓ¦µÄ¹¤³§½Ó¿Ú /// function GetBeanFactory(pvBeanID:PAnsiChar): IInterface; stdcall; + public + /// + /// ¸ù¾ÝbeanID»ñÈ¡¶ÔÓ¦µÄ²å¼þ + /// + function GetBeanForCPlus(pvBeanID: PAnsiChar; out vInstance: IInterface): HRESULT; stdcall; + /// + /// »ñÈ¡beanID¶ÔÓ¦µÄ¹¤³§½Ó¿Ú + /// + function GetBeanFactoryForCPlus(pvBeanID:PAnsiChar; out vInstance: IInterface): HRESULT; stdcall; protected /// /// Ö±½Ó×¢²áBean¹¤³§²å¼þ @@ -303,13 +322,33 @@ type end; - TKeyMapImpl = class(TInterfacedObject, IKeyMap) + TKeyMapImpl = class(TInterfacedObject, IKeyMap, IStrMapForCPlus) private FKeyIntface:TKeyInterface; protected + function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall; function _AddRef: Integer; stdcall; function _Release: Integer; stdcall; + public + /// + /// ¸ù¾ÝkeyÖµ»ñÈ¡½Ó¿Ú + /// + function GetValue(pvKey:PAnsiChar; out vIntf: IInterface): HRESULT; stdcall; + + /// + /// ¸³Öµ½Ó¿Ú + /// + function SetValue(pvKey:PAnsiChar; pvIntf: IInterface): HRESULT; stdcall; + /// + /// ÒÆ³ý½Ó¿Ú + /// + function Remove(pvKey:PAnsiChar): HRESULT; stdcall; + + /// + /// ÅжÏÊÇ·ñ´æÔÚ½Ó¿Ú + /// + function Exists(pvKey:PAnsiChar): HRESULT; stdcall; protected /// /// ÅжÏÊÇ·ñ´æÔÚ½Ó¿Ú @@ -376,6 +415,12 @@ function ApplicationKeyMap: IKeyMap; stdcall; /// procedure ExecuteLoadLibFiles(const pvLibFiles: string); + +/// +/// Ö´ÐÐËùÓÐDLLÖеĺ¯Êý +/// +procedure StartLibraryService; + /// /// ´ÓÅäÖÃÎļþÖмÓÔØ, ·µ»Ø³É¹¦´¦ÀíµÄBeanÅäÖÃÊýÁ¿ /// ¿ÉÒÔµ÷Óöà´Î @@ -419,6 +464,16 @@ function HashOf(const p:Pointer; l:Integer): Integer; overload; /// function HashOf(const vStrData:String): Integer; overload; +/// +/// »ñÈ¡ApplicatioinContextº¯Êý, ¹©ÆäËû DLL(VC)ʹÓà +/// +function __GetApplicationContextFunc(out vIntf:IInterface): HRESULT; stdcall; + + +/// +/// »ñÈ¡ApplicatioinKeyMapº¯Êý, ¹©ÆäËû DLL(VC)ʹÓà +/// +function __GetApplicationMapFunc(out vIntf:IInterface): HRESULT; stdcall; @@ -567,6 +622,24 @@ begin TApplicationContext.instance.ExecuteLoadBeanFromConfigFiles(pvConfigFiles); end; +function __GetApplicationContextFunc(out vIntf:IInterface): HRESULT; stdcall; +begin + vIntf := __instanceAppContext; + Result := S_OK; +end; + + +function __GetApplicationMapFunc(out vIntf:IInterface): HRESULT; stdcall; +begin + vIntf := __instanceKeyMap; + Result := S_OK; +end; + +procedure StartLibraryService; +begin + TApplicationContext.Instance.StartLibraryService; +end; + procedure TApplicationContext.CheckInitialize; @@ -577,13 +650,13 @@ begin if FFactoryObjectList.Count = 0 then begin // ÏȶÁÈ¡beanÅäÖÃÎļþ plug-ins\*.plug-ins, *.plug-ins - lvConfigFiles := FINIFile.ReadString('main', 'beanConfigFiles', ''); + lvConfigFiles := FIniFile.ReadString('main', 'beanConfigFiles', ''); if lvConfigFiles <> '' then begin if FTraceLoadFile then __beanLogger.logMessage(sDebug_loadFromConfigFile, 'LOAD_TRACE_'); if ExecuteLoadBeanFromConfigFiles(lvConfigFiles) > 0 then begin - if FINIFile.ReadBool('main', 'loadOnStartup', False) then + if FIniFile.ReadBool('main', 'loadOnStartup', False) then begin // È·±£DLL¹¤³§¶¼ÒѾ­¼ÓÔØÁ˶ÔÓ¦µÄDLL CheckInitializeFactoryObjects; @@ -603,6 +676,8 @@ begin /// ¼ÓÔØConfigPluginsÏÂÃæµÄ ÅäÖÃÎļþ ExecuteLoadBeanFromConfigFiles('ConfigPlugins\*.plug-ins'); end; + + StartLibraryService; end; end; @@ -611,9 +686,9 @@ var lvTempPath:String; l:Integer; begin - lvTempPath := FINIFile.ReadString('main', 'copyDest', 'plug-ins\'); + lvTempPath := FIniFile.ReadString('main', 'copyDest', 'plug-ins\'); - FTraceLoadFile := FINIFile.ReadBool('main','traceLoadLib', FTraceLoadFile); + FTraceLoadFile := FIniFile.ReadBool('main','traceLoadLib', FTraceLoadFile); FCopyDestPath := GetAbsolutePath(FRootPath, lvTempPath); @@ -644,9 +719,7 @@ function TApplicationContext.CheckRegisterBean(pvBeanID: string; var j:Integer; lvID:String; - {$IFDEF LOG_ON} lvLibObject:TBaseFactoryObject; - {$ENDIF} begin Result := false; lvID := trim(pvBeanID); @@ -655,11 +728,9 @@ begin j := FBeanMapList.IndexOf(lvID); if j <> -1 then begin - {$IFDEF LOG_ON} - lvLibObject := TBaseFactoryObject(FBeanMapList.Objects[j]); - __beanLogger.logMessage(Format(sLoadTrace_BeanID_Repeat, - [lvID,lvLibObject.namespace]), 'LOAD_TRACE_'); - {$ENDIF} + lvLibObject := TBaseFactoryObject(FBeanMapList.Objects[j]); + __beanLogger.logMessage(Format(sLoadTrace_BeanID_Repeat, + [lvID , pvFactoryObject.Namespace, lvLibObject.namespace]), 'load_warning_', lgvWarning); end else begin FBeanMapList.AddObject(lvID, pvFactoryObject); @@ -722,10 +793,13 @@ end; destructor TApplicationContext.Destroy; begin - FINIFile.Free; + FIniFile.Free; CheckFinalize; FBeanMapList.Free; FFactoryObjectList.Free; + {$IFDEF DEBUG} + OutputDebugString('ApplicationContext Destroyed In Delphi'); + {$ENDIF} inherited Destroy; end; @@ -737,7 +811,7 @@ begin Result := FBeanMapList.IndexOf(lvBeanID)<> -1; end; -procedure TApplicationContext.checkCreateINIFile; +procedure TApplicationContext.CheckCreateINIFile; var lvFile:String; begin @@ -755,7 +829,7 @@ begin {$ENDIF} end; - FINIFile := TIniFile.Create(lvFile); + FIniFile := TIniFile.Create(lvFile); end; function TApplicationContext.CheckRemoveLibObjectFromList(pvFileName:String): @@ -880,9 +954,7 @@ procedure TApplicationContext.DoRegisterPlugins(pvPlugins: TStrings; var i, j:Integer; lvID:String; - {$IFDEF LOG_ON} lvLibObject:TBaseFactoryObject; - {$ENDIF} begin for i := 0 to pvPlugins.Count - 1 do begin @@ -892,11 +964,9 @@ begin j := FBeanMapList.IndexOf(lvID); if j <> -1 then begin - {$IFDEF LOG_ON} lvLibObject := TBaseFactoryObject(FBeanMapList.Objects[j]); __beanLogger.logMessage(Format(sLoadTrace_BeanID_Repeat, - [lvID,lvLibObject.namespace])); - {$ENDIF} + [lvID , pvFactoryObject.Namespace, lvLibObject.namespace]), 'load_warning_', lgvWarning); end else begin FBeanMapList.AddObject(lvID, pvFactoryObject); @@ -967,7 +1037,8 @@ var lvFile: string; lvLib:TLibFactoryObject; lvIsOK:Boolean; - lvBeanIDs:array[1..4096] of AnsiChar; + + lvBeanIDList:String; begin Result := nil; if pvFile = '' then exit; @@ -983,10 +1054,8 @@ begin if CheckInitializeFactoryObject(TBaseFactoryObject(lvLib), False) then begin try - ZeroMemory(@lvBeanIDs[1], 4096); - lvLib.beanFactory.getBeanList(@lvBeanIDs[1], 4096); - - DoRegisterPluginIDS(String(AnsiString(PAnsiChar(@lvBeanIDs[1]))), TBaseFactoryObject(lvLib)); + lvBeanIDList := lvLib.GetBeanIDList; + DoRegisterPluginIDS(lvBeanIDList, TBaseFactoryObject(lvLib)); lvIsOK := true; lvLib.Tag := 1; except @@ -1003,7 +1072,7 @@ begin if lvIsOK then // ÒѾ­¼ÓÔØ begin - Result := lvLib.BeanFactory; + Result := lvLib.BeanFactory as IBeanFactory; end; finally if not lvIsOK then @@ -1214,6 +1283,11 @@ begin __beanLogger.logMessage(sLoadTrace_Factory_Init_BEGIN, [lvLibObject.namespace], 'LOAD_TRACE_'); lvLibObject.CheckInitialize; + + // GetBeanFactoryµÄʱºòÈç¹ûFBeanFactory»¹Ã»Óи³Öµ£¬ + // ´ú±í¿âÎļþÊǰ´Ðè¼ÓÔØµÄ£¬ËùÒÔÐèÒªÖ´ÐÐÒ»´ÎStartService + lvLibObject.StartService; + if FTraceLoadFile then __beanLogger.logMessage(sLoadTrace_Factory_Init_END, [lvLibObject.namespace], 'LOAD_TRACE_'); @@ -1239,6 +1313,70 @@ end; +function TApplicationContext.GetBeanFactoryForCPlus(pvBeanID: PAnsiChar; + out vInstance: IInterface): HRESULT; +var + j:Integer; + lvLibObject:TBaseFactoryObject; + lvBeanID:AnsiString; +begin + lvBeanID := pvBeanID; + try + j := FBeanMapList.IndexOf(String(lvBeanID)); + if j <> -1 then + begin + lvLibObject := TBaseFactoryObject(FBeanMapList.Objects[j]); + if lvLibObject.BeanFactory = nil then + begin + if FTraceLoadFile then + __beanLogger.logMessage(sLoadTrace_Factory_Init_BEGIN, [lvLibObject.namespace], + 'LOAD_TRACE_'); + lvLibObject.CheckInitialize; + if FTraceLoadFile then + __beanLogger.logMessage(sLoadTrace_Factory_Init_END, [lvLibObject.namespace], + 'LOAD_TRACE_'); + end; + vInstance := lvLibObject.BeanFactory; + Result := S_OK; + end else + begin + Result := S_FALSE; + {$IFDEF LOG_ON} + __beanLogger.logMessage( + Format('ÕÒ²»µ½¶ÔÓ¦µÄ[%s]²å¼þ¹¤³§', [lvBeanID]), + 'LOAD_TRACE_'); + {$ENDIF} + end; + except + on E:Exception do + begin + __beanLogger.logMessage( + Format('»ñÈ¡²å¼þ¹¤³§[%s]³öÏÖÒì³£', [lvBeanID]) + e.Message, + 'LOAD_TRACE_'); + Result := S_FALSE; + end; + end; +end; + +function TApplicationContext.GetBeanForCPlus(pvBeanID: PAnsiChar; + out vInstance: IInterface): HRESULT; +var + j:Integer; + lvLibObject:TBaseFactoryObject; + lvBeanID:String; +begin + lvBeanID := string(AnsiString(pvBeanID)); + j := FBeanMapList.IndexOf(lvBeanID); + if j <> -1 then + begin + lvLibObject := TBaseFactoryObject(FBeanMapList.Objects[j]); + Result := lvLibObject.GetBeanForCPlus(pvBeanID, vInstance); + end else + begin + Result := S_FALSE; + end; +end; + class function TApplicationContext.Instance: TApplicationContext; begin Result := __instanceAppContext; @@ -1347,6 +1485,11 @@ begin SetLength(Result, I); end; +function TApplicationContext.QueryInterface(const IID: TGUID; out Obj): HResult; +begin + Result := inherited QueryInterface(IID, Obj); +end; + function TApplicationContext.RegisterBeanFactory(const pvFactory: IBeanFactory; const pvNameSapce:PAnsiChar): Integer; var @@ -1385,6 +1528,19 @@ begin end; end; +procedure TApplicationContext.StartLibraryService; +var + lvLibObject:TBaseFactoryObject; + i:Integer; +begin + ///È«²¿Ö´ÐÐÒ»´ÎStartService; + for i := 0 to FFactoryObjectList.Count -1 do + begin + lvLibObject := TBaseFactoryObject(FFactoryObjectList.Objects[i]); + lvLibObject.StartService; + end; +end; + function TApplicationContext.UnLoadLibraryFile(pvLibFile: PAnsiChar; pvRaiseException: Boolean = true): Boolean; var @@ -1430,6 +1586,32 @@ begin end; end; +function TApplicationContext._AddRef: Integer; +{$IFDEF DEBUG} +var + lvOutput:String; +{$ENDIF} +begin + {$IFDEF DEBUG} + lvOutput := Format('ApplicationContext AddRef By Delphi: %d\r\n', [RefCount + 1]); + OutputDebugString(PChar(lvOutput)); + {$ENDIF} + Result := inherited _AddRef; +end; + +function TApplicationContext._Release: Integer; +{$IFDEF DEBUG} +var + lvOutput:String; +{$ENDIF} +begin + {$IFDEF DEBUG} + lvOutput := Format('ApplicationContext Release By Delphi: %d\r\n', [RefCount-1]); + OutputDebugString(PChar(lvOutput)); + {$ENDIF} + Result := inherited _Release; +end; + procedure TKeyMapImpl.AfterConstruction; begin inherited; @@ -1443,12 +1625,26 @@ end; destructor TKeyMapImpl.Destroy; begin + {$IFDEF DEBUG} + OutputDebugString('ApplicationKeyMap Destroyed In Delphi\r\n'); + {$ENDIF} cleanupObjects; FKeyIntface.Free; FKeyIntface := nil; inherited Destroy; end; +function TKeyMapImpl.Exists(pvKey: PAnsiChar): HRESULT; +begin + if FKeyIntface.exists(string(AnsiString(pvKey))) then + begin + Result := S_OK; + end else + begin + Result := S_FALSE; + end; +end; + function TKeyMapImpl.existsObject(const pvKey: PAnsiChar): Boolean; begin Result := FKeyIntface.exists(string(AnsiString(pvKey))); @@ -1459,6 +1655,35 @@ begin Result := FKeyIntface.find(string(AnsiString(pvKey))); end; +function TKeyMapImpl.GetValue(pvKey: PAnsiChar; out vIntf: IInterface): HRESULT; +var + s:String; +begin + try + vIntf := FKeyIntface.find(string(AnsiString(pvKey))); + s := Format('%s¶ÔÏóµØÖ·:%d\r\n', [pvKey, IntPtr(vIntf)]); + OutputDebugString(PChar(s)); + if vIntf <> nil then Result := S_OK else Result := S_FALSE; + except + Result := -1; + end; +end; + +function TKeyMapImpl.QueryInterface(const IID: TGUID; out Obj): HResult; +begin + Result := inherited QueryInterface(IID, Obj); +end; + +function TKeyMapImpl.Remove(pvKey: PAnsiChar): HRESULT; +begin + try + FKeyIntface.remove(string(AnsiString(pvKey))); + Result := S_OK; + except + Result := -1; + end; +end; + procedure TKeyMapImpl.removeObject(const pvKey: PAnsiChar); begin try @@ -1476,13 +1701,39 @@ begin end; end; +function TKeyMapImpl.SetValue(pvKey: PAnsiChar; pvIntf: IInterface): HRESULT; +begin + try + FKeyIntface.put(string(AnsiString(pvKey)), pvIntf); + Result := S_OK; + except + Result := -1; + end; +end; + function TKeyMapImpl._AddRef: Integer; +{$IFDEF DEBUG} +var + lvOutput:String; +{$ENDIF} begin + {$IFDEF DEBUG} + lvOutput := Format('ApplicationKeyMap AddRef By Delphi: %d\r\n', [RefCount + 1]); + OutputDebugString(PChar(lvOutput)); + {$ENDIF} Result := inherited _AddRef; end; function TKeyMapImpl._Release: Integer; +{$IFDEF DEBUG} +var + lvOutput:String; +{$ENDIF} begin + {$IFDEF DEBUG} + lvOutput := Format('ApplicationKeyMap Release By Delphi: %d\r\n', [RefCount-1]); + OutputDebugString(PChar(lvOutput)); + {$ENDIF} Result := inherited _Release; end; @@ -1500,6 +1751,10 @@ initialization mybean.core.intf.AppPluginContext := __instanceAppContext; mybean.core.intf.ApplicationKeyMap := __instanceKeyMap; + mybean.core.intf.__GetApplicationContextFunctionForStdcall := __GetApplicationContextFunc; + mybean.core.intf.__GetApplicationMapFunctionForStdcall := __GetApplicationMapFunc; + + // // ³õʼ»¯ // AppPluginContext.checkInitialize; diff --git a/Source/mybean.core.beanFactory.pas b/Source/mybean.core.beanFactory.pas index 777307024df1a0eae2ee08b3fad703c0d6b41758..adb723637117a5084e7b8a4e657a3a28f50cfbbf 100644 --- a/Source/mybean.core.beanFactory.pas +++ b/Source/mybean.core.beanFactory.pas @@ -53,7 +53,7 @@ type private FbeanID: string; FInstance: IInterface; - procedure checkFreeInstance; + procedure CheckFreeInstance; public destructor Destroy; override; property beanID: string read FbeanID write FbeanID; @@ -136,7 +136,7 @@ type /// function getErrorDesc(pvErrorDesc: PAnsiChar; pvLength: Integer): Integer; stdcall; protected - procedure clear; + procedure Clear; function _Release: Integer; stdcall; public /// @@ -320,8 +320,12 @@ end; procedure TBeanFactory.checkFinalize; begin + // ÇåÀí×¢²áÐÅÏ¢ºÍµ¥ÊµÀý½Ó¿Ú + Clear; + + // ÇåÀíGetBeanµÄ×é¼þ²å¼þ FVclOwners.DestroyComponents; - clear; + if Assigned(OnFinalizeLibFactory) then begin @@ -410,7 +414,7 @@ begin end; -procedure TBeanFactory.clear; +procedure TBeanFactory.Clear; var i: Integer; begin @@ -620,7 +624,7 @@ destructor TBeanFactory.Destroy; begin FVclOwners.Free; - clear; + Clear; FreeAndNil(FCS); FConfig := nil; FPlugins.Free; @@ -880,29 +884,15 @@ begin FInstance := nil; end; -procedure TBeanInfo.checkFreeInstance; -//var -// lvFree:IFreeObject; +procedure TBeanInfo.CheckFreeInstance; begin -// if FInstance <> nil then -// begin -// if FInstance.QueryInterface(IFreeObject, lvFree)=S_OK then -// begin -// FInstance := nil; -// lvFree.FreeObject; -// lvFree := nil; -// end; -// end; - FInstance := nil; - - end; destructor TBeanInfo.Destroy; begin try - checkFreeInstance; + CheckFreeInstance; except end; inherited Destroy; diff --git a/Source/mybean.core.intf.pas b/Source/mybean.core.intf.pas index 62b3bc6d2f5b0c1227c8acc4f8f1f2aa885ac6ae..844d0f65cda5142ccf9b1e8737cd0a9d3b8df13b 100644 --- a/Source/mybean.core.intf.pas +++ b/Source/mybean.core.intf.pas @@ -23,6 +23,18 @@ unit mybean.core.intf; interface type +{$IF RTLVersion<25} + IntPtr = Integer; +{$IFEND} + PInterface = ^IInterface; + + PMyBeanChar = PAnsiChar; + MyBeanChar = AnsiChar; + MyBeanString = AnsiString; + + /// »ñÈ¡½Ó¿ÚʵÀý + TGetInterfaceFunctionForStdcall = function(out vIntf:IInterface):HRESULT; stdcall; + IBeanFactory = interface; /// /// ½Ó¿ÚÒѾ­¸Ä±äÐèÒªÖØÐ±àÒëËùÓеÄDLLºÍÖ÷¿ØÌ¨ @@ -91,6 +103,23 @@ type function CheckLoadBeanConfigFile(pvConfigFile:PAnsiChar): Boolean; stdcall; end; + /// + /// C++ ÓïÑÔµ÷ÓÃµÄ½Ó¿Ú + /// + IApplicationContextForCPlus = interface + ['{9A7238C4-5A47-494B-9058-77500C1622DC}'] + + /// + /// ¸ù¾ÝbeanID»ñÈ¡¶ÔÓ¦µÄ²å¼þ + /// + function GetBeanForCPlus(pvBeanID: PAnsiChar; out vInstance: IInterface): HRESULT; stdcall; + + /// + /// »ñÈ¡beanID¶ÔÓ¦µÄ¹¤³§½Ó¿Ú + /// + function GetBeanFactoryForCPlus(pvBeanID:PAnsiChar; out vInstance: IInterface): HRESULT; stdcall; + end; + /// /// Ö÷¿ØÌ¨À©Õ¹½Ó¿Ú /// 2014-09-22 12:27:56 @@ -158,7 +187,6 @@ type end; - /// /// ²å¼þ¹¤³§½Ó¿Ú,Óɲå¼þËÞÖ÷(DLL, BPL)¿âÎļþÌṩ /// @@ -226,6 +254,17 @@ type Integer; stdcall; end; +/// + /// VC ½Ó¿Ú + /// + IBeanFactoryForCPlus = interface + ['{D6F1B138-ECEA-44FC-A3E3-0B5169F1077A}'] + /// + /// ¸ù¾ÝbeanID»ñÈ¡¶ÔÓ¦µÄ²å¼þ + /// + function GetBeanForCPlus(pvBeanID: PAnsiChar; out vInstance: IInterface): HRESULT; stdcall; + end; + /// /// ²å¼þ¹¤³§×¢²á /// @@ -260,6 +299,35 @@ type procedure FreeObject; stdcall; end; + + /// + /// Map½Ó¿Ú(ÓëC++½»»¥) + /// + IStrMapForCPlus = interface + ['{66828066-38B7-4613-8F9B-627CB76D84F2}'] + /// + /// ¸ù¾ÝkeyÖµ»ñÈ¡½Ó¿Ú + /// + function GetValue(pvKey:PAnsiChar; out vIntf: IInterface): HRESULT; stdcall; + + /// + /// ¸³Öµ½Ó¿Ú + /// + function SetValue(pvKey:PAnsiChar; pvIntf: IInterface): HRESULT; stdcall; + + /// + /// ÒÆ³ý½Ó¿Ú + /// + function Remove(pvKey:PAnsiChar): HRESULT; stdcall; + + /// + /// ÅжÏÊÇ·ñ´æÔÚ½Ó¿Ú + /// S_OK(0) ´æÔÚ + /// S_False(1) ²»´æÔÚ + /// + function Exists(pvKey:PAnsiChar): HRESULT; stdcall; + end; + IKeyMap = interface(IInterface) ['{3CF4907D-C1FF-4E93-9E32-06AAD82310B4}'] @@ -306,7 +374,6 @@ type var - appPluginContext:IApplicationContext; applicationKeyMap:IKeyMap; @@ -319,7 +386,17 @@ var /// Ìṩһ¸ö»ñÈ¡applicationKeyMap¶ÔÏóµÄº¯ÊýÖ¸Õ룬TMyBeanFactoryToolsÖÐÈç¹û¸ÃÖ¸Õë´æÔÚ£¬Ö±½Óµ÷Óøú¯Êý /// GetApplicationKeyMapFunc: function:IKeyMap; stdcall; - + + + /// + /// »ñȡһ¸öApplicationContext½Ó¿ÚʵÀýµÄº¯ÊýÖ¸Õë, È«¾Ö¹ý³Ì + /// + __GetApplicationContextFunctionForStdcall: TGetInterfaceFunctionForStdcall; + + /// + /// Ìṩһ¸ö»ñÈ¡applicationKeyMap¶ÔÏóµÄº¯ÊýÖ¸Õ룬TMyBeanFactoryToolsÖÐÈç¹û¸ÃÖ¸Õë´æÔÚ£¬Ö±½Óµ÷Óøú¯Êý + /// + __GetApplicationMapFunctionForStdcall: TGetInterfaceFunctionForStdcall; implementation diff --git a/Source/mybean.core.keyInterface.pas b/Source/mybean.core.keyInterface.pas index 8d39b89cee6819d13c1b3c7b0f313297afeb064b..969e0317c582112732f8f58a26de64d6148dcc43 100644 --- a/Source/mybean.core.keyInterface.pas +++ b/Source/mybean.core.keyInterface.pas @@ -113,6 +113,9 @@ begin if lvBlock <> nil then begin Result := lvBlock.intf; + end else + begin + Result := nil; end; end; diff --git a/Source/mybean.core.objects.pas b/Source/mybean.core.objects.pas index c821043b442059fdd17c4cca392931df1bba7912..d20f62b449ff479c755597d437564d9447c21c34 100644 --- a/Source/mybean.core.objects.pas +++ b/Source/mybean.core.objects.pas @@ -2,12 +2,26 @@ unit mybean.core.objects; interface +{$IFDEF DEBUG} +uses + Windows, SysUtils; // Êä³öÈÕÖ¾ +{$ENDIF} + type - TMyBeanInterfacedObject = class(TInterfacedObject) + TMyBeanInterfacedObjectClass = class of TMyBeanInterfacedObject; + TMyBeanInterfacedObject = class(TInterfacedObject {$IFDEF DEBUG},IInterface{$ENDIF}) public constructor Create; virtual; + public + {$IFDEF DEBUG} + __DebugInstanceID:String; + function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall; + function _AddRef: Integer; stdcall; + function _Release: Integer; stdcall; + destructor Destroy; override; + {$ENDIF} end; - TMyBeanInterfacedObjectClass = class of TMyBeanInterfacedObject; + implementation @@ -16,4 +30,46 @@ begin inherited Create; end; + +{$IFDEF DEBUG} +function TMyBeanInterfacedObject.QueryInterface(const IID: TGUID; out Obj): + HResult; +var + __debugStr:string; +begin + __debugStr := Format('[%s]:QueryInterface():IID:%s In Delphi' + sLineBreak, [__DebugInstanceID, GUIDToString(IID)]); + OutputDebugString(PChar(__debugStr)); + Result := inherited QueryInterface(IID, Obj); +end; + +function TMyBeanInterfacedObject._AddRef: Integer; +var + __debugStr:string; +begin + __debugStr := Format('[%s]:%d AddRef In Delphi' + sLineBreak, [__DebugInstanceID, RefCount + 1]); + OutputDebugString(PChar(__debugStr)); + + Result := inherited _AddRef; +end; + +function TMyBeanInterfacedObject._Release: Integer; +var + __debugStr:string; +begin + __debugStr := Format('[%s]:%d Release In Delphi' + sLineBreak, [__DebugInstanceID, RefCount - 1]); + OutputDebugString(PChar(__debugStr)); + + Result := inherited _Release; +end; + +destructor TMyBeanInterfacedObject.Destroy; +var + __debugStr:string; +begin + __debugStr := Format('[%s] is Destroying In Delphi', [__DebugInstanceID]); + OutputDebugString(PChar(__debugStr)); + inherited; +end; +{$ENDIF} + end. diff --git a/Source/mybean.ex.designmode.intf.pas b/Source/mybean.ex.designmode.intf.pas new file mode 100644 index 0000000000000000000000000000000000000000..b378f4c0f70444e0e5142e4ee7cf064e15812757 --- /dev/null +++ b/Source/mybean.ex.designmode.intf.pas @@ -0,0 +1,125 @@ +unit mybean.ex.designmode.intf; + +interface + +uses + mybean.core.intf; + +type + IPublisher = interface; + + /// + /// MyBean ¶©ÔÄģʽÖÐÐÄ + /// + ISubscribeCenter = interface + ['{805F8214-6766-4A51-9CD8-09BE67B8D383}'] + + /// + /// ͨ¹ý·¢²¼ÕßID»ñȡһ¸ö·¢²¼Õß½Ó¿ÚʵÀý, Èç¹û¸ÃʵÀý²»´æÔÚÔò½øÐд´½¨¡£·ñÔòÖ±½Ó·µ»Ø + /// Ḭ̈߳²È«°æ±¾( + /// + /// + /// S_OK£º»ñÈ¡³É¹¦ + /// S_FALSE: »ñȡʧ°Ü + /// + /// ͬһ¸öpvPublisherID»ñÈ¡µÄ·¢²¼ÕßʵÀýÊÇÏàͬµÄ + /// ·µ»ØµÄ½Ó¿ÚʵÀý + function GetPublisher(pvPublisherID:PMyBeanChar; out vPubInstance:IPublisher): HRESULT; stdcall; + + end; + + /// + /// ¶©ÔÄÕìÌýÕß + /// + ISubscribeListener = interface + ['{ECC2BDC4-737E-4493-BFF1-DCC7B5CE0BD8}'] + + /// + /// Ìí¼ÓÁËÒ»¸ö¶©ÔÄÕß + /// + /// ¶©ÔÄÕßID + /// ¶©ÔÄÕß + procedure OnAddSubscriber(pvSubscriberID: Integer; const pvSubscriber: + IInterface); stdcall; + + /// + /// ÒÆ³ýÁËÒ»¸ö¶©ÔÄÕß + /// + /// ¶©ÔÄÕßID + procedure OnRemoveSubscriber(pvSubscriberID: Integer); stdcall; + end; + + + /// + /// ·¢²¼Õß½Ó¿Ú + /// + IPublisher = interface + ['{AF590D7D-2E86-4729-8282-0423781EBB4C}'] + + /// + /// ×¢²áÒ»¸öÕìÌýÕßµ½·¢²¼ÕßʵÀýÖÐ + /// + /// + /// ·µ»ØÒ»¸öID,ÒÆ³ýʱͨ¹ý¸ÃID½øÐÐÒÆ³ý, ×¢²áʧ°Ü·µ»Ø-1 + /// + /// (IInterface) + function AddSubscriber(const pvSubscriber: IInterface): Integer; stdcall; + + /// + /// ´Ó·¢²¼ÕßÖÐÒÆ³ýµôÒ»¸öÕìÌýÕß + /// + /// + /// ³É¹¦·µ»ØTrue, ʧ°Ü·µ»Ø:False + /// + /// ¶©ÔÄÕßID(Ìí¼Óʱ·µ»ØµÄID) + function RemoveSubscriber(pvSubscriberID: Integer): HRESULT; stdcall; + + + /// + /// »ñÈ¡¶©ÔÄÕßÊýÁ¿ + /// + /// + /// ¸öÊý + /// + function GetSubscriberCount: Integer; stdcall; + + + /// + /// »ñÈ¡ÆäÖеÄÒ»¸ö¶©ÔÄÕß + /// + /// + /// S_OK,»ñÈ¡³É¹¦ + /// + /// ÐòºÅ + /// ·µ»ØµÄ¶©ÔÄÕß + function GetSubscriber(pvIndex: Integer; out vSubscribeInstance: IInterface): + HRESULT; stdcall; + + + /// + /// Ìí¼ÓÁËÒ»¸ö¶©ÔÄÕìÌýÕß + /// Ìí¼Ó»òÕßÒÆ³ý¶©ÔÄÕßʱ½øÐÐ֪ͨ + /// + /// + /// S_OK: ³É¹¦ + /// + /// ¶©ÔÄÕìÌýÕß + function AddSubscribeListener(const pvInstance: ISubscribeListener): HRESULT; + stdcall; + + /// + /// ÒÆ³ýÒ»¸ö¶©ÔÄÕìÌýÕß + /// + /// S_OK: ³É¹¦ + /// + /// (ISubscribeListener) + function RemoveSubscribeListener(const pvInstance: ISubscribeListener): + HRESULT; stdcall; + end; + + + + +implementation + +end. diff --git a/Source/mybean.ex.designmode.utils.pas b/Source/mybean.ex.designmode.utils.pas new file mode 100644 index 0000000000000000000000000000000000000000..db3d4a9af597c25bfb8bad1fe4f35d6487452b54 --- /dev/null +++ b/Source/mybean.ex.designmode.utils.pas @@ -0,0 +1,42 @@ +(* + * MyBeanÀ©Õ¹µ¥Ôª + * ³£ÓÃÉè¼ÆÄ£Ê½µ÷Óõ¥Ôª + * ¸Ãµ¥Ôª£¬ÐèÒªÒÀÀµMyBeanSubscribeCenter²å¼þ(¶©ÔÄÖÐÐIJå¼þ) + * + * 1.0 + * ¶©ÔÄÕß²å¼þ +*) +unit mybean.ex.designmode.utils; + +interface + +uses + mybean.ex.designmode.intf, mybean.tools.beanFactory, mybean.core.intf; + + +/// +/// ͨ¹ý·¢²¼ÕßID»ñȡһ¸ö·¢²¼Õß½Ó¿ÚʵÀý, Èç¹û¸ÃʵÀý²»´æÔÚÔò½øÐд´½¨¡£·ñÔòÖ±½Ó·µ»Ø +/// Ḭ̈߳²È«°æ±¾ +/// +/// +/// ·µ»Ø»ñÈ¡µ½·¢²¼Õß½Ó¿ÚʵÀý +/// +/// ͬһ¸öpvPublisherID»ñÈ¡µÄ·¢²¼ÕßʵÀýÊÇÏàͬµÄ +function GetPublisher(const pvPublisherID: string): IPublisher; stdcall; + +implementation + +function GetPublisher(const pvPublisherID: string): IPublisher; +var + lvCenter: ISubscribeCenter; + lvIntf:IInterface; +begin + Result := nil; + lvIntf := TMyBeanFactoryTools.GetBean('MyBeanSubscribeCenter'); + if lvIntf.QueryInterface(ISubscribeCenter, lvCenter) = S_OK then + begin + lvCenter.GetPublisher(PMyBeanChar(MyBeanString(pvPublisherID)), Result); + end; +end; + +end. diff --git a/Source/mybean.strConsts.pas b/Source/mybean.strConsts.pas index c2cf53cc649d9f82263fe9809591857f92d41bd9..9f6625c4192de2e6505d852c27e4b010ffb2c279 100644 --- a/Source/mybean.strConsts.pas +++ b/Source/mybean.strConsts.pas @@ -9,7 +9,7 @@ resourcestring sDebug_applicationContextUnload = 'applicationContext´æÔÚ[%d]δÊͷŵÄÇé¿ö'; sDebug_applicationKeyMapUnload = 'applicationKeyMap´æÔÚ[%d]δÊͷŵÄÇé¿ö'; - sLoadTrace_BeanID_Repeat = 'ÔÚ×¢²á²å¼þ[%s]ʱ·¢ÏÖÖØ¸´,ÒѾ­ÔÚ[%s]½øÐÐÁË×¢²á'; + sLoadTrace_BeanID_Repeat = 'ÔÚ×¢²á²å¼þ[%s(%s)]ʱ·¢ÏÖÖØ¸´,ÒѾ­ÔÚ[%s]½øÐÐÁË×¢²á'; sLoadTrace_Lib_Initalize = '×¼±¸³õʼ»¯²å¼þÎļþ[%s]'; sLoadTrace_Lib_Invalidate = 'Îļþ[%s]²»ÊÇÓÐЧµÄ²å¼þËÞÖ÷Îļþ'; sLoadTrace_Lib_Error = '¼ÓÔØ²å¼þÎļþ[%s]³öÏÖÒì³£:%s'; diff --git a/Source/mybean.tools.beanFactory.pas b/Source/mybean.tools.beanFactory.pas index de34cad748e0a9340bd76f99f1c41d70e9d2d225..3fb98e69e2dfa8c6c9823b82f6f941d9f0605fe5 100644 --- a/Source/mybean.tools.beanFactory.pas +++ b/Source/mybean.tools.beanFactory.pas @@ -166,19 +166,39 @@ end; class function TMyBeanFactoryTools.GetBean(pvBeanID: string; pvRaiseIfNil: Boolean = true): IInterface; var + lvTempIntf:IInterface; lvFactory:IBeanFactory; + lvFactoryCPlus:IBeanFactoryForCPlus; begin - lvFactory := ApplicationContext.getBeanFactory(PAnsiChar(AnsiString(pvBeanID))) as IBeanFactory; - if lvFactory = nil then + lvTempIntf := ApplicationContext.getBeanFactory(PAnsiChar(AnsiString(pvBeanID))); + if lvTempIntf = nil then begin if pvRaiseIfNil then raise Exception.CreateFmt('ÕÒ²»µ½²å¼þ[%s]¶ÔÓ¦µÄ¹¤³§', [pvBeanID]); + Exit; + end; + + if lvTempIntf.QueryInterface(IBeanFactoryForCPlus, lvFactoryCPlus) = S_OK then + begin + lvTempIntf := nil; + if lvFactoryCPlus.GetBeanForCPlus(PAnsiChar(AnsiString(pvBeanID)), Result) = -1 then + begin + raise Exception.Create(Format('ÕÒ²»µ½¶ÔÓ¦µÄ²å¼þ[%s]!', [pvBeanID])); + end; end else begin - result := lvFactory.GetBean(PAnsiChar(AnsiString(pvBeanID))); - if (Result = nil) and (pvRaiseIfNil) then + lvFactory := lvTempIntf as IBeanFactory; + if lvFactory = nil then + begin + if pvRaiseIfNil then + raise Exception.CreateFmt('ÕÒ²»µ½²å¼þ[%s]¶ÔÓ¦µÄ¹¤³§', [pvBeanID]); + end else begin - CheckRaiseErrorINfo(lvFactory); + result := lvFactory.GetBean(PAnsiChar(AnsiString(pvBeanID))); + if (Result = nil) and (pvRaiseIfNil) then + begin + CheckRaiseErrorINfo(lvFactory); + end; end; end; end; diff --git a/Source/utils.hashs.pas b/Source/utils.hashs.pas new file mode 100644 index 0000000000000000000000000000000000000000..474425526ecc4bc1f4b89a33039e3c926d18d14c --- /dev/null +++ b/Source/utils.hashs.pas @@ -0,0 +1,782 @@ +(* + * Unit owner: d10.ÌìµØÏÒ,qdac.swish + * blog: http://www.cnblogs.com/dksoft + * homePage: www.diocp.org + * + * 2015-02-22 08:29:43 + * DIOCP-V5 ·¢²¼ + * + *) + +unit utils.hashs; + +interface + +uses + SysUtils, SyncObjs, Classes; + + +type +{$IF RTLVersion<25} + IntPtr = Integer; +{$IFEND} + + EDHashTableException = Class(Exception); + /// + /// hash value type + /// + TDHashValueType = Cardinal; + + PDHashData=^TDHashData; + TDHashData=record + Key : String; // Data Key + Next : PDHashData; // next value + Data : Pointer; // data + Hash : TDHashValueType; // data hash value + end; + + TDBuckets =array of PDHashData; + +{$IFDEF UNICODE} + TOnDataCompare = reference to function(P1,P2:Pointer): Integer; + TOnDHashDataNotify = reference to procedure(pvData:PDHashData); + TOnDHashDataNotifyEx = reference to procedure(pvData: PDHashData; pvParamData: Pointer); + TOnDataNotify = reference to procedure(pvData:Pointer); +{$ELSE} + TOnDataCompare = function(P1,P2:Pointer): Integer of object; + TOnDHashDataNotify = procedure(pvData:PDHashData) of object; + TOnDHashDataNotifyEx = procedure(pvData: PDHashData; pvParamData: Pointer) of object; + TOnDataNotify = procedure(pvData:Pointer) of object; +{$ENDIF} + + + TDHashTable = class(TObject) + private + FOnCompare: TOnDataCompare; + + FBucketSize: Cardinal; + + FCount:Integer; + + FBuckets:TDBuckets; + FOnDelete: TOnDataNotify; + + + procedure DoDelete(AHash:TDHashValueType; AData:Pointer); + + procedure CreateHashData(var vData: PDHashData); + function GetBuckets(AIndex: Cardinal): PDHashData; + + + procedure ReleaseHashData(var vData: PDHashData); + + function InnerCompare(pvData1, pvData2:Pointer): Integer; + + procedure SetOnCompare(const Value: TOnDataCompare); + + procedure SetValues(pvHashValue: Cardinal; const Value: Pointer); + function GetValues(pvHashValue: Cardinal): Pointer; + private + function GetValueMap(pvKey:String): Pointer; + procedure SetValueMap(pvKey:String; const Value: Pointer); + public + constructor Create(pvBucketSize: Cardinal = 1361); + + destructor Destroy; override; + + /// + /// Ñ­»·Ã¿Ò»¸öÊý¾Ý½øÐлص÷ + /// + procedure ForEach(pvCallback:TOnDHashDataNotify);overload; + + /// + /// Ñ­»·Ã¿Ò»¸öÊý¾Ý, ´øÒ»¸öÀ©Õ¹µÄ²ÎÊýÊý¾Ý½øÐлص÷ + /// + procedure ForEach(pvCallback:TOnDHashDataNotifyEx; pvParamData:Pointer); overload; + + /// + /// add AData + /// + procedure Add(pvHashValue: TDHashValueType; pvData: Pointer); + + /// + /// set key->value + /// + procedure SetData(pvHashValue: TDHashValueType; pvData: Pointer); + + /// + /// find first item by hashValue + /// + function FindFirst(pvHashValue:TDHashValueType): PDHashData; + + + /// + /// find first data by hashValue + /// + function FindFirstData(pvHashValue:TDHashValueType): Pointer; + + /// + /// clear all data + /// + procedure Clear; + + /// + /// delete frist element by hashValue + /// + function DeleteFirst(pvHashValue: TDHashValueType; pvData: Pointer): Boolean; overload; + + /// + /// delete frist element by hashValue + /// + function DeleteFirst(pvHashValue: TDHashValueType): Boolean; overload; + + + /// + /// exists? + /// + function Exists(pvHashValue: TDHashValueType; pvData: Pointer): Boolean;overload; + + /// + /// exists? + /// + function Exists(pvHashValue: TDHashValueType): Boolean; overload; + public + /// + /// remove data by strKey + /// + function Remove(pvKey:string):Boolean; + public + + + /// + /// resize bucket length + /// + procedure SetBucketSize(pvBucketSize:Integer); + + procedure FreeAllDataAsObject(); + + /// + /// ½«ËùÓÐÊý¾ÝдÈëµ½ListÖÐ + /// + procedure GetDatas(pvList:TList); + + property Buckets[AIndex: Cardinal]: PDHashData read GetBuckets; + + property BucketSize: Cardinal read FBucketSize; + + property Count: Integer read FCount; + + property OnDelete: TOnDataNotify read FOnDelete write FOnDelete; + + property OnCompare: TOnDataCompare read FOnCompare write SetOnCompare; + + property ValueMap[pvKey:String]: Pointer read GetValueMap write SetValueMap; + + property Values[pvHashValue: Cardinal]: Pointer read GetValues write SetValues; default; + + + end; + + TDHashTableSafe = class(TDHashTable) + private + FLocker: TCriticalSection; + public + constructor Create(pvBucketSize: Cardinal = 1361); + destructor Destroy; override; + + procedure Lock(); + + procedure unLock(); + + end; + + +// copy from qdac +function hashOf(const pvStrData:String): Integer; overload; +function hashOf(const p:Pointer;l:Integer): Integer; overload; + +implementation + +resourcestring + SHashTableIndexError = 'Buckets index out of bounds (%d)'; + + +function hashOf(const p:Pointer;l:Integer): Integer; overload; +var + ps:PInteger; + lr:Integer; +begin + Result:=0; + if l>0 then + begin + ps:=p; + lr:=(l and $03); //check length is multi 4 + l:=(l and $FFFFFFFC); // + while l>0 do + begin + Result:=((Result shl 5) or (Result shr 27)) xor ps^; + Inc(ps); + Dec(l,4); + end; + if lr<>0 then + begin + l:=0; + Move(ps^,l,lr); + Result:=((Result shl 5) or (Result shr 27)) xor l; + end; + end; +end; + +function hashOf(const pvStrData:String): Integer; overload; +begin + Result := hashOf(PChar(pvStrData), Length(pvStrData) * SizeOf(Char)); +end; + +procedure TDHashTable.Clear; +var + I:Integer; + lvBucket: PDHashData; +begin + for I := 0 to High(FBuckets) do + begin + lvBucket := FBuckets[I]; + while lvBucket<>nil do + begin + FBuckets[I]:=lvBucket.Next; + + DoDelete(lvBucket.Hash, lvBucket.Data); + ReleaseHashData(lvBucket); + + lvBucket:=FBuckets[I]; + end; + end; + FCount:=0; +end; + +constructor TDHashTable.Create(pvBucketSize: Cardinal = 1361); +begin + inherited Create; + SetBucketSize(pvBucketSize); + FOnCompare := InnerCompare; +end; + +procedure TDHashTable.Add(pvHashValue: TDHashValueType; pvData: Pointer); +var + lvIndex :Cardinal; + lvBucket:PDHashData; +begin + CreateHashData(lvBucket); + + lvBucket.Data:=pvData; + lvBucket.Hash:=pvHashValue; + + lvIndex := pvHashValue mod FBucketSize; + lvBucket.Next:=FBuckets[lvIndex]; + + FBuckets[lvIndex]:=lvBucket; + + Inc(FCount); +end; + +function TDHashTable.InnerCompare(pvData1, pvData2:Pointer): Integer; +begin + Result := IntPtr(pvData1) - IntPtr(pvData2); +end; + +procedure TDHashTable.CreateHashData(var vData: PDHashData); +begin + New(vData); +end; + +function TDHashTable.DeleteFirst(pvHashValue: TDHashValueType): Boolean; +var + lvIndex:Cardinal; + lvCurrData, lvPrior:PDHashData; +begin + Result := False; + lvIndex:=pvHashValue mod FBucketSize; + lvCurrData:=FBuckets[lvIndex]; + lvPrior:=nil; + + while Assigned(lvCurrData) do + begin + if lvCurrData.Hash = pvHashValue then + begin + if Assigned(lvPrior) then + lvPrior.Next := lvCurrData.Next + else + FBuckets[lvIndex]:= lvCurrData.Next; + + DoDelete(lvCurrData.Hash, lvCurrData.Data); + + ReleaseHashData(lvCurrData); + Dec(FCount); + Result := true; + Break; + end else + begin + lvPrior:= lvCurrData; + lvCurrData:=lvPrior.Next; + end; + end; +end; + +destructor TDHashTable.Destroy; +begin + Clear; + inherited; +end; + +procedure TDHashTable.DoDelete(AHash:TDHashValueType; AData:Pointer); +begin + if Assigned(FOnDelete) then + FOnDelete(AData); + +end; + +function TDHashTable.Exists(pvHashValue: TDHashValueType; pvData: Pointer): + Boolean; +var + lvIndex:Cardinal; + lvCurrData:PDHashData; +begin + Result := False; + lvIndex:=pvHashValue mod FBucketSize; + + lvCurrData:=FBuckets[lvIndex]; + while Assigned(lvCurrData) do + begin + //first compare hash value + if lvCurrData.Hash = pvHashValue then + if FOnCompare(pvData, lvCurrData.Data) = 0 then + begin + Result := true; + Break; + end; + lvCurrData:=lvCurrData.Next; + end; +end; + +function TDHashTable.FindFirst(pvHashValue:TDHashValueType): PDHashData; +var + lvIndex:Cardinal; + lvCurrData:PDHashData; +begin + Result := nil; + lvIndex:=pvHashValue mod FBucketSize; + + lvCurrData:=FBuckets[lvIndex]; + while Assigned(lvCurrData) do + begin + //compare hash value + if lvCurrData.Hash = pvHashValue then + begin + Result := lvCurrData; + Break; + end; + lvCurrData:=lvCurrData.Next; + end; +end; + +function TDHashTable.FindFirstData(pvHashValue:TDHashValueType): Pointer; +var + lvIndex:Cardinal; + lvCurrData:PDHashData; +begin + Result := nil; + lvIndex:=pvHashValue mod FBucketSize; + + lvCurrData:=FBuckets[lvIndex]; + while Assigned(lvCurrData) do + begin + //compare hash value + if lvCurrData.Hash = pvHashValue then + begin + Result := lvCurrData.Data; + Break; + end; + lvCurrData:=lvCurrData.Next; + end; +end; + +procedure TDHashTable.ForEach(pvCallback: TOnDHashDataNotifyEx; + pvParamData: Pointer); +var + I:Integer; + lvBucket: PDHashData; +begin + Assert(Assigned(pvCallback)); + for I := 0 to High(FBuckets) do + begin + lvBucket := FBuckets[I]; + while lvBucket<>nil do + begin + pvCallback(lvBucket, pvParamData); + lvBucket:=lvBucket.Next; + end; + end; +end; + +procedure TDHashTable.ForEach(pvCallback:TOnDHashDataNotify); +var + I:Integer; + lvBucket: PDHashData; +begin + Assert(Assigned(pvCallback)); + for I := 0 to High(FBuckets) do + begin + lvBucket := FBuckets[I]; + while lvBucket<>nil do + begin + pvCallback(lvBucket); + lvBucket:=lvBucket.Next; + end; + end; +end; + +procedure TDHashTable.FreeAllDataAsObject; +var + I:Integer; + lvBucket: PDHashData; +begin + for I := 0 to High(FBuckets) do + begin + lvBucket := FBuckets[I]; + while lvBucket<>nil do + begin + TObject(lvBucket.Data).Free; + lvBucket:=lvBucket.Next; + end; + end; +end; + +function TDHashTable.GetBuckets(AIndex: Cardinal): PDHashData; +begin + if (AIndex>=FBucketSize) then + begin + raise EDHashTableException.CreateFmt(SHashTableIndexError, [AIndex]); + end; + + Result := FBuckets[AIndex]; +end; + +procedure TDHashTable.ReleaseHashData(var vData: PDHashData); +begin + Dispose(vData); +end; + +function TDHashTable.Remove(pvKey: string): Boolean; +var + lvIndex, lvHashValue:Cardinal; + lvCurrData, lvPrior:PDHashData; +begin + Result := False; + lvHashValue := hashOf(LowerCase(pvKey)); + lvIndex:=lvHashValue mod FBucketSize; + lvCurrData:=FBuckets[lvIndex]; + lvPrior:=nil; + + while Assigned(lvCurrData) do + begin + if (lvCurrData.Hash = lvHashValue) and SameText(pvKey, lvCurrData.Key) then + begin + if Assigned(lvPrior) then + lvPrior.Next := lvCurrData.Next + else + FBuckets[lvIndex]:= lvCurrData.Next; + + DoDelete(lvCurrData.Hash, lvCurrData.Data); + + ReleaseHashData(lvCurrData); + Dec(FCount); + Result := true; + Break; + end else + begin + lvPrior:= lvCurrData; + lvCurrData:=lvPrior.Next; + end; + end; +end; + +function TDHashTable.DeleteFirst(pvHashValue: TDHashValueType; pvData: + Pointer): Boolean; +var + lvIndex:Cardinal; + lvCurrData, lvPrior:PDHashData; +begin + Result := False; + lvIndex:=pvHashValue mod FBucketSize; + lvCurrData:=FBuckets[lvIndex]; + lvPrior:=nil; + + while Assigned(lvCurrData) do + begin + if FOnCompare(pvData, lvCurrData.Data) = 0 then + begin + if Assigned(lvPrior) then + lvPrior.Next := lvCurrData.Next + else + FBuckets[lvIndex]:= lvCurrData.Next; + + DoDelete(lvCurrData.Hash, lvCurrData.Data); + + ReleaseHashData(lvCurrData); + Dec(FCount); + Result := true; + Break; + end else + begin + lvPrior:= lvCurrData; + lvCurrData:=lvPrior.Next; + end; + end; +end; + +function TDHashTable.Exists(pvHashValue: TDHashValueType): Boolean; +var + lvIndex:Cardinal; + lvCurrData:PDHashData; +begin + Result := False; + lvIndex:=pvHashValue mod FBucketSize; + + lvCurrData:=FBuckets[lvIndex]; + while Assigned(lvCurrData) do + begin + //compare hash value + if lvCurrData.Hash = pvHashValue then + begin + Result := true; + Break; + end; + lvCurrData:=lvCurrData.Next; + end; +end; + +procedure TDHashTable.GetDatas(pvList:TList); +var + I:Integer; + lvBucket: PDHashData; +begin + for I := 0 to High(FBuckets) do + begin + lvBucket := FBuckets[I]; + while lvBucket<>nil do + begin + pvList.Add(lvBucket.Data); + lvBucket:=lvBucket.Next; + end; + end; +end; + +function TDHashTable.GetValueMap(pvKey:String): Pointer; +var + lvCurrData:PDHashData; + lvIndex, lvHashValue:Cardinal; + lvDataKey : String; +begin + Result := nil; + lvDataKey := LowerCase(pvKey); + lvHashValue := hashOf(lvDataKey); + + lvIndex:=lvHashValue mod FBucketSize; + lvCurrData:=FBuckets[lvIndex]; + + while Assigned(lvCurrData) do + begin + //compare hash value + if (lvCurrData.Hash = lvHashValue) and (SameText(lvDataKey, lvCurrData.Key)) then + begin + Result := lvCurrData.Data; + Break; + end; + lvCurrData:=lvCurrData.Next; + end; +end; + +function TDHashTable.GetValues(pvHashValue: Cardinal): Pointer; +begin + Result := FindFirstData(pvHashValue); +end; + +procedure TDHashTable.SetBucketSize(pvBucketSize:Integer); +const + //default bucket size + BucketNormalSize:array[0..27] of Integer=( + 17,37,79,163,331,673, 1361, 2729, 5471,10949,21911,43853,87719,175447,350899, + 701819,1403641,2807303,5614657,11229331,22458671,44917381,89834777, + 179669557,359339171,718678369,1437356741,2147483647 + ); +var + lvIndex, lvBucketSize:Cardinal; + I :Integer; + lvHash : TDHashValueType; + lvOldBuckets: TDBuckets; + lvData, lvNext: PDHashData; +begin + lvBucketSize := pvBucketSize; + if lvBucketSize=0 then + begin + for i:=0 to 27 do + begin + if BucketNormalSize[i] > FCount then + begin + lvBucketSize:= BucketNormalSize[i]; + Break; + end; + end; + + if lvBucketSize=0 then // max size + lvBucketSize:= BucketNormalSize[27]; + if lvBucketSize = FBucketSize then Exit; + end; + + if FBucketSize <> lvBucketSize then + begin // bucket size changed + + // save old arrange + lvOldBuckets := FBuckets; + + // new bucket size + FBucketSize := lvBucketSize; + SetLength(FBuckets, FBucketSize); + + // empty + for I := 0 to FBucketSize - 1 do FBuckets[I]:=nil; + + + // rearrange element + for I := 0 to High(lvOldBuckets) do + begin + lvData:=lvOldBuckets[I]; + while lvData<>nil do + begin + lvHash := lvData.Hash; + lvIndex := lvHash mod FBucketSize; + lvNext := lvData.Next; + + lvData.Next := FBuckets[lvIndex]; + FBuckets[lvIndex]:=lvData; + lvData := lvNext; + end; + end; + end; +end; + +procedure TDHashTable.SetData(pvHashValue: TDHashValueType; pvData: Pointer); +var + lvPData, lvBucket, lvCurrData:PDHashData; + lvIndex:Cardinal; +begin + lvPData := nil; + lvIndex:=pvHashValue mod FBucketSize; + lvCurrData:=FBuckets[lvIndex]; + + while Assigned(lvCurrData) do + begin + //compare hash value + if lvCurrData.Hash = pvHashValue then + begin + lvPData := lvCurrData; + Break; + end; + lvCurrData:=lvCurrData.Next; + end; + + // found + if lvPData <> nil then + begin + lvPData.Data := pvData; + end else + begin // add + CreateHashData(lvBucket); + lvBucket.Data:=pvData; + lvBucket.Hash:=pvHashValue; + + lvBucket.Next:=FBuckets[lvIndex]; + FBuckets[lvIndex]:=lvBucket; + + Inc(FCount); + end; +end; + +procedure TDHashTable.SetOnCompare(const Value: TOnDataCompare); +begin + if not Assigned(Value) then + FOnCompare := InnerCompare + else + FOnCompare := Value; +end; + +procedure TDHashTable.SetValueMap(pvKey:String; const Value: Pointer); +var + lvPData, lvBucket, lvCurrData:PDHashData; + lvIndex, lvHashValue:Cardinal; + lvDataKey : String; +begin + lvPData := nil; + lvDataKey := LowerCase(pvKey); + lvHashValue := hashOf(lvDataKey); + + lvIndex:=lvHashValue mod FBucketSize; + lvCurrData:=FBuckets[lvIndex]; + + while Assigned(lvCurrData) do + begin + //compare hash value + if (lvCurrData.Hash = lvHashValue) and (SameText(lvDataKey, lvCurrData.Key)) then + begin + lvPData := lvCurrData; + Break; + end; + lvCurrData:=lvCurrData.Next; + end; + + // found + if lvPData <> nil then + begin + lvPData.Data := Value; + end else + begin // add + CreateHashData(lvBucket); + lvBucket.Data:=Value; + lvBucket.Hash:=lvHashValue; + lvBucket.Key := pvKey; + + lvBucket.Next:=FBuckets[lvIndex]; + FBuckets[lvIndex]:=lvBucket; + + Inc(FCount); + end; +end; + +procedure TDHashTable.SetValues(pvHashValue: Cardinal; const Value: Pointer); +begin + SetData(pvHashValue, Value); +end; + +constructor TDHashTableSafe.Create(pvBucketSize: Cardinal = 1361); +begin + inherited Create(pvBucketSize); + FLocker := TCriticalSection.Create(); +end; + +destructor TDHashTableSafe.Destroy; +begin + FreeAndNil(FLocker); + inherited Destroy; +end; + + +procedure TDHashTableSafe.Lock; +begin + FLocker.Enter; +end; + +procedure TDHashTableSafe.unLock; +begin + FLocker.Leave; +end; + +end. diff --git a/change.txt b/change.txt index dc3cd35d3ca62acf4d466a2ee706ffadd1cda618..17a7bfd74c3cbe381e5ac0db30f10b3c219bb2a7 100644 --- a/change.txt +++ b/change.txt @@ -51,4 +51,10 @@ 2>¼ÓÔØConfigPluginsÏÂÃæµÄÅäÖÃÎļþ * ÐÞ¸´ÔÚ¼ÓÔØDLL/BPLÈç¹û²»ÊÇMyBean²å¼þʱ£¬¹Ø±Õ³ÌÐòʱ³öÏÖµÄÄÚ´æÐ¹Â© - 2015Äê1ÔÂ22ÈÕ 14:58:13 \ No newline at end of file + 2015Äê1ÔÂ22ÈÕ 14:58:13 + ++ Ìí¼ÓÉè¼ÆÄ£Ê½²å¼þ¡£ + 2015-05-31 14:38:32 + ++ Ìí¼ÓStartLibraryServiceº¯Êý£¬EXEÔÚ¼ÓÔØÍêËùÓÐDLLºó£¬Ö´Ðиú¯Êý£¬¿ÉÒÔÈÃDLLÖÐ×öһЩ³õʼ»¯¹¤×÷¡£ + 2015-05-31 19:37:59 \ No newline at end of file diff --git a/samples/Blessed_AdditionalConsole/ufrmMain.dfm b/samples/Blessed_AdditionalConsole/ufrmMain.dfm index aab7dba92b4ff46e8974bfb4ec086ab3fd7df3c5..10c72ad63683e00907931109c8fb9883cc319813 100644 --- a/samples/Blessed_AdditionalConsole/ufrmMain.dfm +++ b/samples/Blessed_AdditionalConsole/ufrmMain.dfm @@ -51,8 +51,6 @@ object frmMain: TfrmMain Lines.Strings = ( #23454#29616#30340#25554#20214#38656#35201#23454#29616'IShowAsChild'#25509#21475#25165#33021#26377#34987#35813'DEMO'#35843#29992) TabOrder = 2 - ExplicitWidth = 329 - ExplicitHeight = 213 end object btnGetBeanInfos: TButton Left = 8 diff --git a/samples/Blessed_AdditionalConsole/ufrmMain.pas b/samples/Blessed_AdditionalConsole/ufrmMain.pas index 7bc432eafe9b9d8ef02f5f692c1d64c2f9485a36..e899edba9cc764850bd9d68d4ee429f091294236 100644 --- a/samples/Blessed_AdditionalConsole/ufrmMain.pas +++ b/samples/Blessed_AdditionalConsole/ufrmMain.pas @@ -29,7 +29,7 @@ var frmMain: TfrmMain; implementation - uses Unit1; + {$R *.dfm} procedure TfrmMain.btnGetBeanInfosClick(Sender: TObject); diff --git a/samples/DIOCPFileAccess/BIN/DIOCPFileBean.dll b/samples/DIOCPFileAccess/BIN/DIOCPFileBean.dll index 8902a9cd26518b6c7b9a08729c6702eec7874b6f..78c78e9669329aa0a84c173125eea2dcf1f97594 100644 Binary files a/samples/DIOCPFileAccess/BIN/DIOCPFileBean.dll and b/samples/DIOCPFileAccess/BIN/DIOCPFileBean.dll differ diff --git a/samples/DIOCPFileAccess/DIOCPFileBean/DIOCPFileBean.dpr b/samples/DIOCPFileAccess/DIOCPFileBean/DIOCPFileBean.dpr index d718af1a32145885ba24a22e27a59d41af95b883..c8bca1ebace022dd21c0f2cfd6c278d2d3808729 100644 --- a/samples/DIOCPFileAccess/DIOCPFileBean/DIOCPFileBean.dpr +++ b/samples/DIOCPFileAccess/DIOCPFileBean/DIOCPFileBean.dpr @@ -19,8 +19,6 @@ uses SimpleMsgPack in 'service\SimpleMsgPack.pas', uFileOperaObject in 'service\uFileOperaObject.pas', ufrmMain in 'Tester\ufrmMain.pas' {frmMain}, - uIFormShow in 'Tester\uIFormShow.pas', - uDIOCPFileAccessTools in 'Tester\uDIOCPFileAccessTools.pas', DRawSocket in 'service\DRawSocket.pas', DTcpClient in 'service\DTcpClient.pas', uDTcpClientCoderImpl in 'service\uDTcpClientCoderImpl.pas', diff --git a/samples/DIOCPFileAccess/DIOCPFileBean/Tester/ufrmMain.dfm b/samples/DIOCPFileAccess/DIOCPFileBean/Tester/ufrmMain.dfm index 36390b204301a7a18e353a9cbbcb6642e7d63861..cec821e4616a906c665500603eb8103a92f34859 100644 --- a/samples/DIOCPFileAccess/DIOCPFileBean/Tester/ufrmMain.dfm +++ b/samples/DIOCPFileAccess/DIOCPFileBean/Tester/ufrmMain.dfm @@ -47,8 +47,8 @@ object frmMain: TfrmMain OnClick = btnConnectClick end object btnUpload: TButton - Left = 16 - Top = 80 + Left = 8 + Top = 91 Width = 75 Height = 25 Caption = 'btnUpload' @@ -90,6 +90,23 @@ object frmMain: TfrmMain TabOrder = 7 OnClick = btnFileSizeClick end + object edtUploadFileName: TEdit + Left = 16 + Top = 64 + Width = 273 + Height = 21 + TabOrder = 8 + Text = 'C:\a.zip' + end + object btnUpload2: TButton + Left = 295 + Top = 62 + Width = 84 + Height = 25 + Caption = 'btnUpload2' + TabOrder = 9 + OnClick = btnUpload2Click + end object dlgOpen: TOpenDialog Left = 16 Top = 40 diff --git a/samples/DIOCPFileAccess/DIOCPFileBean/Tester/ufrmMain.pas b/samples/DIOCPFileAccess/DIOCPFileBean/Tester/ufrmMain.pas index 617124035266a5c6abc735c7a5d8b56f2627bf79..cad7c47ef05cd76b744378f98a808abb866b2c54 100644 --- a/samples/DIOCPFileAccess/DIOCPFileBean/Tester/ufrmMain.pas +++ b/samples/DIOCPFileAccess/DIOCPFileBean/Tester/ufrmMain.pas @@ -18,11 +18,14 @@ type Label1: TLabel; btnDel: TButton; btnFileSize: TButton; + edtUploadFileName: TEdit; + btnUpload2: TButton; procedure FormCreate(Sender: TObject); procedure btnConnectClick(Sender: TObject); procedure btnDelClick(Sender: TObject); procedure btnDownloadClick(Sender: TObject); procedure btnFileSizeClick(Sender: TObject); + procedure btnUpload2Click(Sender: TObject); procedure btnUploadClick(Sender: TObject); private { Private declarations } @@ -88,11 +91,31 @@ begin ))); end; + procedure TfrmMain.FormCreate(Sender: TObject); begin FDIOCPFileAccess := TMyBeanFactoryTools.getBean('diocpRemoteFile') as IRemoteFileAccess; end; +procedure TfrmMain.btnUpload2Click(Sender: TObject); +var + lvRFileID, lvLocalFile:String; +begin + lvLocalFile := edtUploadFileName.Text; + if not FileExists(lvLocalFile) then + begin + raise Exception.CreateFmt('Ö¸¶¨µÄÎļþ[%s]²»´æÔÚ', [lvLocalFile]); + end; + + lvRFileID := 'diocpBean\' + ExtractFileName(lvLocalFile); + TDIOCPFileAccessTools.UploadFile( + FDIOCPFileAccess, + lvRFileID, //Ô¶³ÌÎļþ + lvLocalFile); //±¾µØÎļþ + ShowMessage('ÉÏ´«Îļþ³É¹¦!'); + edtRFileID.Text := lvRFileID; +end; + procedure TfrmMain.btnUploadClick(Sender: TObject); var diff --git a/samples/DIOCPFileAccess/DIOCPFileBean/service/uDIOCPFileAccessImpl.pas b/samples/DIOCPFileAccess/DIOCPFileBean/service/uDIOCPFileAccessImpl.pas index 075ccd2d2479ac9bfce164d60253acf3496b196b..30cb83004c781455a7ab0f8de51f044fe5b55e22 100644 --- a/samples/DIOCPFileAccess/DIOCPFileBean/service/uDIOCPFileAccessImpl.pas +++ b/samples/DIOCPFileAccess/DIOCPFileBean/service/uDIOCPFileAccessImpl.pas @@ -9,6 +9,7 @@ uses type TDIOCPFileAccessImpl = class(TInterfacedObject , IRemoteFileAccess + , IQueryProgressInfo , IFileAccess , IFileAccessEx , IFileAccess02 @@ -45,6 +46,16 @@ type /// »ñȡԶ³ÌÎļþ´óС /// function FileSize(pvRFileName, pvType: PAnsiChar): Int64; + public + /// + /// ²éѯ×î´ó + /// + function QueryMax: Int64; stdcall; + + /// + /// ²éѯµ±Ç°½ø¶È + /// + function QueryPosition: Int64; stdcall; public @@ -97,6 +108,7 @@ end; procedure TDIOCPFileAccessImpl.Close; begin + FFileOperaObject.BreakWork := True; FFileOperaObject.close; end; @@ -147,6 +159,17 @@ procedure TDIOCPFileAccessImpl.Open; begin FFileOperaObject.close; FFileOperaObject.Open; + FFileOperaObject.BreakWork := False; +end; + +function TDIOCPFileAccessImpl.QueryMax: Int64; +begin + Result := FFileOperaObject.Max; +end; + +function TDIOCPFileAccessImpl.QueryPosition: Int64; +begin + Result := FFileOperaObject.Position; end; procedure TDIOCPFileAccessImpl.saveFile(pvRFileName, pvLocalFileName, diff --git a/samples/DIOCPFileAccess/DIOCPFileBean/service/uFileOperaObject.pas b/samples/DIOCPFileAccess/DIOCPFileBean/service/uFileOperaObject.pas index 61cb73e803242bdd59211d762fe7440e2888852d..9365fb1362c014ae5ed293d9b36654d3c8cd8ede 100644 --- a/samples/DIOCPFileAccess/DIOCPFileBean/service/uFileOperaObject.pas +++ b/samples/DIOCPFileAccess/DIOCPFileBean/service/uFileOperaObject.pas @@ -10,6 +10,11 @@ uses type TFileOperaObject = class(TObject) private + FBreakWork: Boolean; + FMax:Int64; + + FPosition:Int64; + FFileSize:Int64; FFileCheckSum:Cardinal; FCoderSocket:ICoderSocket; @@ -43,10 +48,24 @@ type class function verifyData(const buf; len:Cardinal): Cardinal; class function verifyStream(pvStream:TStream; len:Cardinal): Cardinal; + property BreakWork: Boolean read FBreakWork write FBreakWork; + property FileCheckSum: Cardinal read FFileCheckSum; property FileSize: Int64 read FFileSize; + /// + /// ²éѯÉÏ´«/ÏÂÔØÎļþµÄ×î´ó³ß´ç + /// + property Max: Int64 read FMax; + + /// + /// ²éѯÉÏ´«/ÏÂÔØÎļþµÄµ±Ç°³ß´ç + /// + property Position: Int64 read FPosition; + + + end; @@ -76,9 +95,7 @@ end; procedure TFileOperaObject.copyAFile(pvRFile, pvRDestFile, pvType: String); var - lvFileStream:TFileStream; lvRecvObj, lvSendObj:TSimpleMsgPack; - i, l, lvSize:Integer; begin checkConnect; lvSendObj := TSimpleMsgPack.Create; @@ -115,8 +132,6 @@ begin end; procedure TFileOperaObject.deleteFile(pvRFile, pvType: string); -var - i, l, lvSize:Integer; begin checkConnect; @@ -156,15 +171,13 @@ var lvRFileSize:Integer; var lvFileStream:TFileStream; - i, l, lvSize:Integer; lvFileName:String; - lvCrc, lvChecksum, lvLocalCheckSum:Cardinal; + lvChecksum, lvLocalCheckSum:Cardinal; lvBytes:TBytes; begin checkConnect; - //if FProgConsole <> nil then FProgConsole.SetHintText('ÕýÔÚ»ñȡԶ³ÌÎļþ´óС'); - readFileINfo(pvRFile, pvType); + readFileINfo(pvRFile, pvType, True); lvRFileSize := FFileSize; @@ -172,24 +185,14 @@ begin begin raise Exception.CreateFmt('Ô¶³ÌÎļþ[%s]²»´æÔÚ!', [pvRFile]); end; -// if FProgConsole <> nil then -// begin -// FProgConsole.SetMax(lvRFileSize); -// FProgConsole.SetPosition(0); -// end; + FMax := lvRFileSize; -// lvCheckSum := FFileCheckSum; -// if lvCheckSum = 0 then raise Exception.Create('·þÎñ¶ËÎļþ²»´æÔÚ!'); + lvCheckSum := FFileCheckSum; + if lvCheckSum = 0 then raise Exception.Create('·þÎñ¶ËÎļþ²»´æÔÚ!'); lvLocalCheckSum := ChecksumAFile(pvLocalFile); if lvCheckSum = lvLocalCheckSum then begin -// if FProgConsole <> nil then -// begin -// FProgConsole.SetHintText('Ãë´«Îļþ...'); -// FProgConsole.SetPosition(lvRFileSize); -// Sleep(1000); -// end; Exit; end; @@ -210,24 +213,19 @@ begin lvFileStream := TFileStream.Create(lvFileName, fmCreate or fmShareDenyWrite); try -// if FProgConsole <> nil then -// begin -// FProgConsole.SetHintText('ÏÂÔØÎļþÖÐ...'); -// end; while true do begin -// if FProgConsole <> nil then -// begin -// if FProgConsole.IsBreaked then Break; -// end; - FCMDObj.Clear(); + + if FBreakWork then Break; + pressINfo(FCMDObj, pvRFile, pvType); FCMDObj.I['cmd.index'] := 1; FCMDObj.I['start'] := lvFileStream.Position; + FCMDStream.Clear; FCMDObj.EncodeToStream(FCMDStream); @@ -251,10 +249,7 @@ begin lvBytes := FCMDObj.ForcePathObject('data').AsBytes; lvFileStream.Write(lvBytes[0], Length(lvBytes)); -// if FProgConsole <> nil then -// begin -// FProgConsole.SetPosition(lvFileStream.Position); -// end; + FPosition := lvFileStream.Position; //ÎļþÏÂÔØÍê³É if lvFileStream.Size = FCMDObj.I['fileSize'] then @@ -270,7 +265,6 @@ end; function TFileOperaObject.ChecksumAFile(pvFile:string): Cardinal; var lvFileStream:TFileStream; - lvCrc:Cardinal; begin result := 0; if FileExists(pvFile) then @@ -287,6 +281,7 @@ end; procedure TFileOperaObject.open; begin FTcpClient.Connect; + FBreakWork := False; end; procedure TFileOperaObject.pressINfo(pvSendObject: TSimpleMsgPack; pvRFile, @@ -299,9 +294,6 @@ end; procedure TFileOperaObject.readFileINfo(pvRFile, pvType: string; pvChecksum: Boolean = true); -var - lvFileStream:TFileStream; - i, l, lvSize:Integer; begin checkConnect; @@ -348,8 +340,7 @@ function TFileOperaObject.uploadFile(pvRFile:String; pvLocalFile:string; var lvFileStream:TFileStream; - lvPosition, i, l, lvSize:Int64; - lvCheckSum, lvLocalCheckSum:Cardinal; + lvPosition, lvSize:Int64; begin //½«Îļþ·Ö¶Î´«µÝ<ÿ¶Î¹Ì¶¨´óС> 4K //Ñ­»··¢ËÍ @@ -366,6 +357,7 @@ begin lvFileStream := TFileStream.Create(pvLocalFile, fmOpenRead); try + FMax := lvFileStream.Size; //readFileINfo(pvRFile, pvType); // lvCheckSum := FFileCheckSum; @@ -383,12 +375,9 @@ begin // end; while true do - begin -// if FProgConsole <> nil then -// begin -// if FProgConsole.IsBreaked then Break; -// end; -// + begin + if FBreakWork then Break; + FCMDObj.Clear(); if pvRFile = '' then begin @@ -402,17 +391,7 @@ begin lvPosition:=lvFileStream.Position; FCMDObj.I['start'] := lvPosition; -// if lvFileStream.Position = 102400 then -// begin -// FCMDObj.I['start'] := lvFileStream.Position; -// end; -// if lvFileStream.Position = 0 then -// begin -// FCMDObj.I['start'] := 0; -// end; -// FCMDObj.S['startStr'] := IntToStr(lvFileStream.Position); - lvSize := Min(SEC_SIZE, lvFileStream.Size-lvFileStream.Position); if lvSize = 0 then begin @@ -443,10 +422,7 @@ begin raise Exception.Create(FCMDObj.S['__result.msg']); end; - // if FProgConsole <> nil then - // begin - // FProgConsole.SetPosition(lvFileStream.Position); - // end; + FPosition := lvFileStream.Position; if (lvFileStream.Position = lvFileStream.Size) then begin diff --git a/samples/DIOCPFileAccess/DIOCPFileBean/service/uStreamCoderSocket.pas b/samples/DIOCPFileAccess/DIOCPFileBean/service/uStreamCoderSocket.pas index 5d071e15371d9aac3c7e884a9f5996c4fd94decb..15164f98330f480d4adc2241cbdfc644f2674049 100644 --- a/samples/DIOCPFileAccess/DIOCPFileBean/service/uStreamCoderSocket.pas +++ b/samples/DIOCPFileAccess/DIOCPFileBean/service/uStreamCoderSocket.pas @@ -40,7 +40,7 @@ implementation //PACK_FLAG + CRC_VALUE + STREAM_LEN + STREAM_DATA uses - uByteTools; + utils.byteTools; function verifyData(const buf; len: Cardinal): Cardinal; var diff --git "a/samples/HlSample/\346\250\241\345\235\227\344\271\213\351\227\264\347\233\270\344\272\222\351\200\232\344\277\241/Plug1/Plug1.dpr" "b/samples/HlSample/\346\250\241\345\235\227\344\271\213\351\227\264\347\233\270\344\272\222\351\200\232\344\277\241/Plug1/Plug1.dpr" new file mode 100644 index 0000000000000000000000000000000000000000..f3ad3fa6b1527b51e132735cb654587ca0a034a6 --- /dev/null +++ "b/samples/HlSample/\346\250\241\345\235\227\344\271\213\351\227\264\347\233\270\344\272\222\351\200\232\344\277\241/Plug1/Plug1.dpr" @@ -0,0 +1,22 @@ +library Plug1; + +{ Important note about DLL memory management: ShareMem must be the + first unit in your library's USES clause AND your project's (select + Project-View Source) USES clause if your DLL exports any procedures or + functions that pass strings as parameters or function results. This + applies to all strings passed to and from your DLL--even those that + are nested in records and classes. ShareMem is the interface unit to + the BORLNDMM.DLL shared memory manager, which must be deployed along + with your DLL. To avoid using BORLNDMM.DLL, pass string information + using PChar or ShortString parameters. } + +uses + System.SysUtils, + System.Classes, + Unit_Plug1 in 'Unit_Plug1.pas' {frmPlug1}, + UIShowAsNormal in '..\interface\UIShowAsNormal.pas'; + +{$R *.res} + +begin +end. diff --git "a/samples/HlSample/\346\250\241\345\235\227\344\271\213\351\227\264\347\233\270\344\272\222\351\200\232\344\277\241/Plug1/Unit_Plug1.dfm" "b/samples/HlSample/\346\250\241\345\235\227\344\271\213\351\227\264\347\233\270\344\272\222\351\200\232\344\277\241/Plug1/Unit_Plug1.dfm" new file mode 100644 index 0000000000000000000000000000000000000000..026b94b9b369736c1ebbe7bf3f767b9414815afd --- /dev/null +++ "b/samples/HlSample/\346\250\241\345\235\227\344\271\213\351\227\264\347\233\270\344\272\222\351\200\232\344\277\241/Plug1/Unit_Plug1.dfm" @@ -0,0 +1,72 @@ +object frmPlug1: TfrmPlug1 + Left = 0 + Top = 0 + Caption = 'frmPlug1' + ClientHeight = 202 + ClientWidth = 447 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + OldCreateOrder = False + OnCreate = FormCreate + PixelsPerInch = 96 + TextHeight = 13 + object Label1: TLabel + Left = 96 + Top = 8 + Width = 132 + Height = 33 + Caption = #36825#26159'plug1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -27 + Font.Name = 'Tahoma' + Font.Style = [fsBold] + ParentFont = False + end + object Memo1: TMemo + Left = 112 + Top = 56 + Width = 185 + Height = 89 + TabOrder = 0 + end + object Button1: TButton + Left = 15 + Top = 47 + Width = 75 + Height = 25 + Caption = 'memo1To2' + TabOrder = 1 + OnClick = Button1Click + end + object Button2: TButton + Left = 15 + Top = 169 + Width = 75 + Height = 25 + Caption = 'sendtoMain' + TabOrder = 2 + OnClick = Button2Click + end + object Edit1: TEdit + Left = 112 + Top = 173 + Width = 121 + Height = 21 + TabOrder = 3 + Text = 'Edit1' + end + object Memo2: TMemo + Left = 304 + Top = 56 + Width = 185 + Height = 89 + Lines.Strings = ( + 'Memo2') + TabOrder = 4 + end +end diff --git "a/samples/HlSample/\346\250\241\345\235\227\344\271\213\351\227\264\347\233\270\344\272\222\351\200\232\344\277\241/Plug1/Unit_Plug1.pas" "b/samples/HlSample/\346\250\241\345\235\227\344\271\213\351\227\264\347\233\270\344\272\222\351\200\232\344\277\241/Plug1/Unit_Plug1.pas" new file mode 100644 index 0000000000000000000000000000000000000000..c1e8eef2247d0a9e7114445d5782d2d7761cc19a --- /dev/null +++ "b/samples/HlSample/\346\250\241\345\235\227\344\271\213\351\227\264\347\233\270\344\272\222\351\200\232\344\277\241/Plug1/Unit_Plug1.pas" @@ -0,0 +1,103 @@ +unit Unit_Plug1; + +interface + +uses + Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, + Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls,mybean.core.beanFactory,UIShowAsNormal,mybean.tools.beanfactory; + +type + TfrmPlug1 = class(TForm,IShowForm,IMainPlugCom) + Memo1: TMemo; + Button1: TButton; + Label1: TLabel; + Button2: TButton; + Edit1: TEdit; + Memo2: TMemo; + procedure FormCreate(Sender: TObject); + procedure Button1Click(Sender: TObject); + procedure Button2Click(Sender: TObject); + private + { Private declarations } + public + procedure ShowAsNoraml;stdcall; + procedure ShowAsMdi;stdcall; + procedure Receive(msg:PChar);stdcall; + procedure Send(msg:PChar);stdcall; + procedure addtomemo(str:string); + { Public declarations } + end; + +var + frmPlug1: TfrmPlug1; + +implementation + +{$R *.dfm} + +procedure TfrmPlug1.addtomemo(str: string); +begin + Memo1.Lines.Add(str); + // ShowMessage(Memo1.Lines.Text); +end; + +procedure TfrmPlug1.Button1Click(Sender: TObject); +begin +// addtomemo(datetimetostr(now)); + Memo2.Lines.Assign(Memo1.Lines); +end; + +procedure TfrmPlug1.Button2Click(Sender: TObject); +begin + Send(PChar(edit1.Text)); +end; + +procedure TfrmPlug1.FormCreate(Sender: TObject); +begin + TMyBeanFactoryTools.SetObject('plug1',self); +end; + +procedure TfrmPlug1.Receive(msg: PChar); +var + str :string; +begin + str :=string(msg); + // Edit1.Text := str; +// addtomemo(datetimetostr(now)); + addtomemo('½ÓÊܵ½µÄÏûÏ¢:'+str);//µ¥Àýģʽ¿ÉÒÔÖ±½ÓÏÔʾ + // Application.ProcessMessages; + Show; +end; + +procedure TfrmPlug1.Send(msg: PChar); +var + com:IMainPlugCom; +begin + com := TMyBeanFactoryTools.GetObject('main') as IMainPlugCom; + if com<>nil then + begin + com.Receive(msg); + end; + //---------------- + com := TMyBeanFactoryTools.GetObject('plug2') as IMainPlugCom; + if com<>nil then + begin + com.Receive(msg); + end; +end; + +procedure TfrmPlug1.ShowAsMdi; +begin + // +end; + +procedure TfrmPlug1.ShowAsNoraml; +begin + Show; +end; + +initialization + beanFactory.RegisterBean('plug1',TfrmPlug1,true); + //beanFactory. + +end. diff --git "a/samples/HlSample/\346\250\241\345\235\227\344\271\213\351\227\264\347\233\270\344\272\222\351\200\232\344\277\241/Plug2/Plug2.dpr" "b/samples/HlSample/\346\250\241\345\235\227\344\271\213\351\227\264\347\233\270\344\272\222\351\200\232\344\277\241/Plug2/Plug2.dpr" new file mode 100644 index 0000000000000000000000000000000000000000..90de87b58d80f8391b952142f19738587151bf72 --- /dev/null +++ "b/samples/HlSample/\346\250\241\345\235\227\344\271\213\351\227\264\347\233\270\344\272\222\351\200\232\344\277\241/Plug2/Plug2.dpr" @@ -0,0 +1,22 @@ +library Plug2; + +{ Important note about DLL memory management: ShareMem must be the + first unit in your library's USES clause AND your project's (select + Project-View Source) USES clause if your DLL exports any procedures or + functions that pass strings as parameters or function results. This + applies to all strings passed to and from your DLL--even those that + are nested in records and classes. ShareMem is the interface unit to + the BORLNDMM.DLL shared memory manager, which must be deployed along + with your DLL. To avoid using BORLNDMM.DLL, pass string information + using PChar or ShortString parameters. } + +uses + System.SysUtils, + System.Classes, + Unit_plug2 in 'Unit_plug2.pas' {Form1}, + UIShowAsNormal in '..\interface\UIShowAsNormal.pas'; + +{$R *.res} + +begin +end. diff --git "a/samples/HlSample/\346\250\241\345\235\227\344\271\213\351\227\264\347\233\270\344\272\222\351\200\232\344\277\241/Plug2/Unit_plug2.dfm" "b/samples/HlSample/\346\250\241\345\235\227\344\271\213\351\227\264\347\233\270\344\272\222\351\200\232\344\277\241/Plug2/Unit_plug2.dfm" new file mode 100644 index 0000000000000000000000000000000000000000..5d3e5b7d68f9ee3a130961af0360a646e2a74dc6 --- /dev/null +++ "b/samples/HlSample/\346\250\241\345\235\227\344\271\213\351\227\264\347\233\270\344\272\222\351\200\232\344\277\241/Plug2/Unit_plug2.dfm" @@ -0,0 +1,56 @@ +object Form1: TForm1 + Left = 0 + Top = 0 + Caption = 'Form1' + ClientHeight = 202 + ClientWidth = 447 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + OldCreateOrder = False + OnCreate = FormCreate + PixelsPerInch = 96 + TextHeight = 13 + object Label1: TLabel + Left = 104 + Top = 16 + Width = 152 + Height = 33 + Caption = #36825#26159'Plug2 ' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -27 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + end + object Memo1: TMemo + Left = 104 + Top = 55 + Width = 185 + Height = 89 + Lines.Strings = ( + 'Memo1') + TabOrder = 0 + end + object Button1: TButton + Left = 23 + Top = 152 + Width = 75 + Height = 25 + Caption = 'send' + TabOrder = 1 + OnClick = Button1Click + end + object Edit1: TEdit + Left = 112 + Top = 150 + Width = 121 + Height = 21 + TabOrder = 2 + Text = 'Edit1' + end +end diff --git "a/samples/HlSample/\346\250\241\345\235\227\344\271\213\351\227\264\347\233\270\344\272\222\351\200\232\344\277\241/Plug2/Unit_plug2.pas" "b/samples/HlSample/\346\250\241\345\235\227\344\271\213\351\227\264\347\233\270\344\272\222\351\200\232\344\277\241/Plug2/Unit_plug2.pas" new file mode 100644 index 0000000000000000000000000000000000000000..b24d6d51746535c2a369a7485ba7a3a9e43b39bc --- /dev/null +++ "b/samples/HlSample/\346\250\241\345\235\227\344\271\213\351\227\264\347\233\270\344\272\222\351\200\232\344\277\241/Plug2/Unit_plug2.pas" @@ -0,0 +1,86 @@ +unit Unit_plug2; + +interface + +uses + Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, + Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls,UIShowAsNormal,mybean.core.beanfactory,mybean.Tools.beanfactory; + +type + TForm1 = class(TForm,IShowForm,IMainPlugCom) + Label1: TLabel; + Memo1: TMemo; + Button1: TButton; + Edit1: TEdit; + procedure FormCreate(Sender: TObject); + procedure Button1Click(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + procedure ShowAsNoraml;stdcall; + procedure ShowAsMdi;stdcall; + procedure Receive(msg:PChar);stdcall; + procedure Send(msg:PChar);stdcall; + end; + +var + Form1: TForm1; + +implementation + +{$R *.dfm} + + + +{ TForm1 } + +procedure TForm1.Button1Click(Sender: TObject); +begin + Send(PChar(Edit1.Text)); +end; + +procedure TForm1.FormCreate(Sender: TObject); +begin +TMyBeanFactoryTools.SetObject('plug2',Self); +end; + +procedure TForm1.Receive(msg: PChar); +var + str :string; +begin + str :=string(msg); + Memo1.Lines.Add('½ÓÊܵ½ÏûÏ¢:'+str); + show; +end; + +procedure TForm1.Send(msg: PChar); +var + com:IMainPlugCom; +begin + com := TMyBeanFactoryTools.GetObject('main') as IMainPlugCom; + if com<>nil then + begin + com.Receive(msg); + end; + //---------------- + com := TMyBeanFactoryTools.GetObject('plug1') as IMainPlugCom; + if com<>nil then + begin + com.Receive(msg); + end; +end; +procedure TForm1.ShowAsMdi; +begin +// +end; + +procedure TForm1.ShowAsNoraml; +begin + Show; +end; + +initialization + beanFactory.RegisterBean('plug2',TForm1,True); + +end. diff --git "a/samples/HlSample/\346\250\241\345\235\227\344\271\213\351\227\264\347\233\270\344\272\222\351\200\232\344\277\241/interface/UIShowAsNormal.pas" "b/samples/HlSample/\346\250\241\345\235\227\344\271\213\351\227\264\347\233\270\344\272\222\351\200\232\344\277\241/interface/UIShowAsNormal.pas" new file mode 100644 index 0000000000000000000000000000000000000000..9b2bc549be1177e261718723d3fbc8a3fb422173 --- /dev/null +++ "b/samples/HlSample/\346\250\241\345\235\227\344\271\213\351\227\264\347\233\270\344\272\222\351\200\232\344\277\241/interface/UIShowAsNormal.pas" @@ -0,0 +1,22 @@ +unit UIShowAsNormal; + +interface + +type + IShowForm = interface + ['{DC71A10B-7EC2-45D8-B2D7-17D78D193C90}'] + procedure ShowAsNoraml;stdcall; + procedure ShowAsMdi;stdcall; + end; + + IMainPlugCom =interface + ['{CE4DF363-A5A3-4013-A27C-2A3C4F15E3EB}'] + procedure Receive(msg:PChar);stdcall; + procedure Send(msg:PChar);stdcall; + end; + + + +implementation + +end. diff --git "a/samples/HlSample/\346\250\241\345\235\227\344\271\213\351\227\264\347\233\270\344\272\222\351\200\232\344\277\241/main/Main.dpr" "b/samples/HlSample/\346\250\241\345\235\227\344\271\213\351\227\264\347\233\270\344\272\222\351\200\232\344\277\241/main/Main.dpr" new file mode 100644 index 0000000000000000000000000000000000000000..e97e75c1af91bdbaa8b1daa898b5b193d6fa9533 --- /dev/null +++ "b/samples/HlSample/\346\250\241\345\235\227\344\271\213\351\227\264\347\233\270\344\272\222\351\200\232\344\277\241/main/Main.dpr" @@ -0,0 +1,17 @@ +program Main; + +uses + mybean.console, + Vcl.Forms, + Unit_Main in 'Unit_Main.pas' {Form1}, + UIShowAsNormal in '..\interface\UIShowAsNormal.pas'; + +{$R *.res} + +begin + Application.Initialize; + ApplicationContextInitialize; + Application.MainFormOnTaskbar := True; + Application.CreateForm(TForm1, Form1); + Application.Run; +end. diff --git "a/samples/HlSample/\346\250\241\345\235\227\344\271\213\351\227\264\347\233\270\344\272\222\351\200\232\344\277\241/main/Unit_Main.dfm" "b/samples/HlSample/\346\250\241\345\235\227\344\271\213\351\227\264\347\233\270\344\272\222\351\200\232\344\277\241/main/Unit_Main.dfm" new file mode 100644 index 0000000000000000000000000000000000000000..a07d275fc72778a81f8d9ae98dade95658cfb89e --- /dev/null +++ "b/samples/HlSample/\346\250\241\345\235\227\344\271\213\351\227\264\347\233\270\344\272\222\351\200\232\344\277\241/main/Unit_Main.dfm" @@ -0,0 +1,61 @@ +object Form1: TForm1 + Left = 0 + Top = 0 + Caption = 'Form1' + ClientHeight = 256 + ClientWidth = 529 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + OldCreateOrder = False + OnCreate = FormCreate + PixelsPerInch = 96 + TextHeight = 13 + object Button1: TButton + Left = 24 + Top = 24 + Width = 75 + Height = 25 + Caption = #26174#31034#27169#22359'1' + TabOrder = 0 + OnClick = Button1Click + end + object Button2: TButton + Left = 24 + Top = 64 + Width = 75 + Height = 25 + Caption = #26174#31034#27169#22359'2' + TabOrder = 1 + OnClick = Button2Click + end + object Memo1: TMemo + Left = 288 + Top = 8 + Width = 217 + Height = 153 + Lines.Strings = ( + 'Memo1') + TabOrder = 2 + end + object Button3: TButton + Left = 24 + Top = 200 + Width = 75 + Height = 25 + Caption = 'send' + TabOrder = 3 + OnClick = Button3Click + end + object Edit1: TEdit + Left = 120 + Top = 202 + Width = 121 + Height = 21 + TabOrder = 4 + Text = 'Edit1' + end +end diff --git "a/samples/HlSample/\346\250\241\345\235\227\344\271\213\351\227\264\347\233\270\344\272\222\351\200\232\344\277\241/main/Unit_Main.pas" "b/samples/HlSample/\346\250\241\345\235\227\344\271\213\351\227\264\347\233\270\344\272\222\351\200\232\344\277\241/main/Unit_Main.pas" new file mode 100644 index 0000000000000000000000000000000000000000..5e61e2705ef2c82df01e34174aae4295ce9d35c4 --- /dev/null +++ "b/samples/HlSample/\346\250\241\345\235\227\344\271\213\351\227\264\347\233\270\344\272\222\351\200\232\344\277\241/main/Unit_Main.pas" @@ -0,0 +1,86 @@ +unit Unit_Main; + +interface + +uses + Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, + Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls,mybean.tools.beanFactory,UIShowAsNormal; + +type + TForm1 = class(TForm,IMainPlugCom) + Button1: TButton; + Button2: TButton; + Memo1: TMemo; + Button3: TButton; + Edit1: TEdit; + procedure Button1Click(Sender: TObject); + procedure Button2Click(Sender: TObject); + procedure Button3Click(Sender: TObject); + procedure FormCreate(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + procedure Receive(msg:PChar);stdcall; + procedure Send(msg:PChar);stdcall; + end; + +var + Form1: TForm1; + +implementation + +{$R *.dfm} + + +procedure TForm1.Button1Click(Sender: TObject); +var + show1:IShowForm; +begin + show1 := TMyBeanFactoryTools.GetBean('plug1') as IShowForm; + show1.ShowAsNoraml; +end; + +procedure TForm1.Button2Click(Sender: TObject); +var + show2:IShowForm; +begin + show2 := TMyBeanFactoryTools.GetBean('plug2') as IShowForm; + show2.ShowAsNoraml; +end; + +procedure TForm1.Button3Click(Sender: TObject); +var + msg:pchar; +begin + msg := PChar(Edit1.Text); + send(msg); +end; + +procedure TForm1.FormCreate(Sender: TObject); +begin + TMyBeanFactoryTools.SetObject('main',Self); //ÉèÖÃÈ«¾Ö±äÁ¿ +end; + +procedure TForm1.Receive(msg: PChar); +var + str:string; +begin + str := string(msg); + Memo1.Lines.Add('½ÓÊܵ½ÏûÏ¢:'+str); + +end; + +procedure TForm1.Send(msg: PChar); +var + com:IMainPlugCom; +begin + // ºÍplug1 ͨÐÅ + com := TMyBeanFactoryTools.GetBean('Plug1') as IMainPlugCom; + com.Receive(msg); + //--- ºÍplug2 ͨÐÅ + com := TMyBeanFactoryTools.GetBean('Plug2') as IMainPlugCom; + com.Receive(msg); +end; + +end. diff --git "a/samples/HlSample/\346\250\241\345\235\227\344\271\213\351\227\264\347\233\270\344\272\222\351\200\232\344\277\241/\347\226\221\351\227\256\345\217\212\350\257\264\346\230\216.txt" "b/samples/HlSample/\346\250\241\345\235\227\344\271\213\351\227\264\347\233\270\344\272\222\351\200\232\344\277\241/\347\226\221\351\227\256\345\217\212\350\257\264\346\230\216.txt" new file mode 100644 index 0000000000000000000000000000000000000000..db14982a2fae5451a589a26f61b2775c6dd9d458 --- /dev/null +++ "b/samples/HlSample/\346\250\241\345\235\227\344\271\213\351\227\264\347\233\270\344\272\222\351\200\232\344\277\241/\347\226\221\351\227\256\345\217\212\350\257\264\346\230\216.txt" @@ -0,0 +1,12 @@ +¿ª·¢»·¾³:xe7 + mybean_20150610 +----------------- +ÎÊÌâ1 +ʵÏÖ½Ó¿ÚÏ໥´«µÝ²ÎÊýµÄÏÔʾµ½memoµÄ¹ý³ÌÖÐ,·¢ÏÖ±ØÐëÊǵ¥ÀýģʽÏÂ,²ÅÄÜÕý³£°ÑÊý¾Ý +ÏÔʾµ½memoÖÐ +×¢²áʱºò±ØÐë´øÉÏ ºóÃæµÄ true ²ÎÊý +beanFactory.RegisterBean('plug1',TfrmPlug1,true); +-------------------- +ÎÊÌâ2 + TMyBeanFactoryTools.SetObject('main',Self); +Õâ¾ä´úÂëÎÒûÓиãÃ÷°×ÊÇÔõô»ØÊÂ,Ö»ÖªµÀÊǸù¾ÝÃû×ÖÄÜÈ¡µ½½Ó¿Ú. +Ï£Íû ÌìµØÐþ ´óÏÀÓлú»á´«ÊÚ diff --git "a/samples/HlSample/\347\244\272\344\276\213\350\257\264\346\230\216.txt" "b/samples/HlSample/\347\244\272\344\276\213\350\257\264\346\230\216.txt" new file mode 100644 index 0000000000000000000000000000000000000000..7a523702ab6e1939893911c2df4f4cc319674e99 --- /dev/null +++ "b/samples/HlSample/\347\244\272\344\276\213\350\257\264\346\230\216.txt" @@ -0,0 +1,10 @@ +±¾ÈË×î½üÔÚѧϰmybean¿ò¼Ü,ÔÚѧϰ¹ý³ÌÖÐ×Ô¼ºÁªÏµÁËһЩʹÓ÷½·¨,¸ø´ó¼ÒÒ»Æð·ÖÏí. +Ï£Íû´ó¼ÒÒ»Æðѧϰ½ø²½. + +ÌØ±ð¸Ðл ÌìµØÐþ ÄÜÌṩÕâôÓÅÐãµÄ¿ò¼Ü¹©´ó¼ÒÑо¿Ñ§Ï°Ê¹ÓÃ. + +ʾÀý»·¾³:xe7 + mybean20150610 + + +ÁªÏµ·½Ê½ +QQ:602190388(ºÎ) diff --git "a/samples/HlSample/\350\257\273\345\217\226\351\205\215\347\275\256\345\212\240\350\275\275\346\250\241\345\235\227/Plug1/Plug1.dpr" "b/samples/HlSample/\350\257\273\345\217\226\351\205\215\347\275\256\345\212\240\350\275\275\346\250\241\345\235\227/Plug1/Plug1.dpr" new file mode 100644 index 0000000000000000000000000000000000000000..f3ad3fa6b1527b51e132735cb654587ca0a034a6 --- /dev/null +++ "b/samples/HlSample/\350\257\273\345\217\226\351\205\215\347\275\256\345\212\240\350\275\275\346\250\241\345\235\227/Plug1/Plug1.dpr" @@ -0,0 +1,22 @@ +library Plug1; + +{ Important note about DLL memory management: ShareMem must be the + first unit in your library's USES clause AND your project's (select + Project-View Source) USES clause if your DLL exports any procedures or + functions that pass strings as parameters or function results. This + applies to all strings passed to and from your DLL--even those that + are nested in records and classes. ShareMem is the interface unit to + the BORLNDMM.DLL shared memory manager, which must be deployed along + with your DLL. To avoid using BORLNDMM.DLL, pass string information + using PChar or ShortString parameters. } + +uses + System.SysUtils, + System.Classes, + Unit_Plug1 in 'Unit_Plug1.pas' {frmPlug1}, + UIShowAsNormal in '..\interface\UIShowAsNormal.pas'; + +{$R *.res} + +begin +end. diff --git "a/samples/HlSample/\350\257\273\345\217\226\351\205\215\347\275\256\345\212\240\350\275\275\346\250\241\345\235\227/Plug1/Unit_Plug1.dfm" "b/samples/HlSample/\350\257\273\345\217\226\351\205\215\347\275\256\345\212\240\350\275\275\346\250\241\345\235\227/Plug1/Unit_Plug1.dfm" new file mode 100644 index 0000000000000000000000000000000000000000..026b94b9b369736c1ebbe7bf3f767b9414815afd --- /dev/null +++ "b/samples/HlSample/\350\257\273\345\217\226\351\205\215\347\275\256\345\212\240\350\275\275\346\250\241\345\235\227/Plug1/Unit_Plug1.dfm" @@ -0,0 +1,72 @@ +object frmPlug1: TfrmPlug1 + Left = 0 + Top = 0 + Caption = 'frmPlug1' + ClientHeight = 202 + ClientWidth = 447 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + OldCreateOrder = False + OnCreate = FormCreate + PixelsPerInch = 96 + TextHeight = 13 + object Label1: TLabel + Left = 96 + Top = 8 + Width = 132 + Height = 33 + Caption = #36825#26159'plug1' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -27 + Font.Name = 'Tahoma' + Font.Style = [fsBold] + ParentFont = False + end + object Memo1: TMemo + Left = 112 + Top = 56 + Width = 185 + Height = 89 + TabOrder = 0 + end + object Button1: TButton + Left = 15 + Top = 47 + Width = 75 + Height = 25 + Caption = 'memo1To2' + TabOrder = 1 + OnClick = Button1Click + end + object Button2: TButton + Left = 15 + Top = 169 + Width = 75 + Height = 25 + Caption = 'sendtoMain' + TabOrder = 2 + OnClick = Button2Click + end + object Edit1: TEdit + Left = 112 + Top = 173 + Width = 121 + Height = 21 + TabOrder = 3 + Text = 'Edit1' + end + object Memo2: TMemo + Left = 304 + Top = 56 + Width = 185 + Height = 89 + Lines.Strings = ( + 'Memo2') + TabOrder = 4 + end +end diff --git "a/samples/HlSample/\350\257\273\345\217\226\351\205\215\347\275\256\345\212\240\350\275\275\346\250\241\345\235\227/Plug1/Unit_Plug1.pas" "b/samples/HlSample/\350\257\273\345\217\226\351\205\215\347\275\256\345\212\240\350\275\275\346\250\241\345\235\227/Plug1/Unit_Plug1.pas" new file mode 100644 index 0000000000000000000000000000000000000000..c1e8eef2247d0a9e7114445d5782d2d7761cc19a --- /dev/null +++ "b/samples/HlSample/\350\257\273\345\217\226\351\205\215\347\275\256\345\212\240\350\275\275\346\250\241\345\235\227/Plug1/Unit_Plug1.pas" @@ -0,0 +1,103 @@ +unit Unit_Plug1; + +interface + +uses + Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, + Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls,mybean.core.beanFactory,UIShowAsNormal,mybean.tools.beanfactory; + +type + TfrmPlug1 = class(TForm,IShowForm,IMainPlugCom) + Memo1: TMemo; + Button1: TButton; + Label1: TLabel; + Button2: TButton; + Edit1: TEdit; + Memo2: TMemo; + procedure FormCreate(Sender: TObject); + procedure Button1Click(Sender: TObject); + procedure Button2Click(Sender: TObject); + private + { Private declarations } + public + procedure ShowAsNoraml;stdcall; + procedure ShowAsMdi;stdcall; + procedure Receive(msg:PChar);stdcall; + procedure Send(msg:PChar);stdcall; + procedure addtomemo(str:string); + { Public declarations } + end; + +var + frmPlug1: TfrmPlug1; + +implementation + +{$R *.dfm} + +procedure TfrmPlug1.addtomemo(str: string); +begin + Memo1.Lines.Add(str); + // ShowMessage(Memo1.Lines.Text); +end; + +procedure TfrmPlug1.Button1Click(Sender: TObject); +begin +// addtomemo(datetimetostr(now)); + Memo2.Lines.Assign(Memo1.Lines); +end; + +procedure TfrmPlug1.Button2Click(Sender: TObject); +begin + Send(PChar(edit1.Text)); +end; + +procedure TfrmPlug1.FormCreate(Sender: TObject); +begin + TMyBeanFactoryTools.SetObject('plug1',self); +end; + +procedure TfrmPlug1.Receive(msg: PChar); +var + str :string; +begin + str :=string(msg); + // Edit1.Text := str; +// addtomemo(datetimetostr(now)); + addtomemo('½ÓÊܵ½µÄÏûÏ¢:'+str);//µ¥Àýģʽ¿ÉÒÔÖ±½ÓÏÔʾ + // Application.ProcessMessages; + Show; +end; + +procedure TfrmPlug1.Send(msg: PChar); +var + com:IMainPlugCom; +begin + com := TMyBeanFactoryTools.GetObject('main') as IMainPlugCom; + if com<>nil then + begin + com.Receive(msg); + end; + //---------------- + com := TMyBeanFactoryTools.GetObject('plug2') as IMainPlugCom; + if com<>nil then + begin + com.Receive(msg); + end; +end; + +procedure TfrmPlug1.ShowAsMdi; +begin + // +end; + +procedure TfrmPlug1.ShowAsNoraml; +begin + Show; +end; + +initialization + beanFactory.RegisterBean('plug1',TfrmPlug1,true); + //beanFactory. + +end. diff --git "a/samples/HlSample/\350\257\273\345\217\226\351\205\215\347\275\256\345\212\240\350\275\275\346\250\241\345\235\227/Plug2/Plug2.dpr" "b/samples/HlSample/\350\257\273\345\217\226\351\205\215\347\275\256\345\212\240\350\275\275\346\250\241\345\235\227/Plug2/Plug2.dpr" new file mode 100644 index 0000000000000000000000000000000000000000..90de87b58d80f8391b952142f19738587151bf72 --- /dev/null +++ "b/samples/HlSample/\350\257\273\345\217\226\351\205\215\347\275\256\345\212\240\350\275\275\346\250\241\345\235\227/Plug2/Plug2.dpr" @@ -0,0 +1,22 @@ +library Plug2; + +{ Important note about DLL memory management: ShareMem must be the + first unit in your library's USES clause AND your project's (select + Project-View Source) USES clause if your DLL exports any procedures or + functions that pass strings as parameters or function results. This + applies to all strings passed to and from your DLL--even those that + are nested in records and classes. ShareMem is the interface unit to + the BORLNDMM.DLL shared memory manager, which must be deployed along + with your DLL. To avoid using BORLNDMM.DLL, pass string information + using PChar or ShortString parameters. } + +uses + System.SysUtils, + System.Classes, + Unit_plug2 in 'Unit_plug2.pas' {Form1}, + UIShowAsNormal in '..\interface\UIShowAsNormal.pas'; + +{$R *.res} + +begin +end. diff --git "a/samples/HlSample/\350\257\273\345\217\226\351\205\215\347\275\256\345\212\240\350\275\275\346\250\241\345\235\227/Plug2/Unit_plug2.dfm" "b/samples/HlSample/\350\257\273\345\217\226\351\205\215\347\275\256\345\212\240\350\275\275\346\250\241\345\235\227/Plug2/Unit_plug2.dfm" new file mode 100644 index 0000000000000000000000000000000000000000..5d3e5b7d68f9ee3a130961af0360a646e2a74dc6 --- /dev/null +++ "b/samples/HlSample/\350\257\273\345\217\226\351\205\215\347\275\256\345\212\240\350\275\275\346\250\241\345\235\227/Plug2/Unit_plug2.dfm" @@ -0,0 +1,56 @@ +object Form1: TForm1 + Left = 0 + Top = 0 + Caption = 'Form1' + ClientHeight = 202 + ClientWidth = 447 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + OldCreateOrder = False + OnCreate = FormCreate + PixelsPerInch = 96 + TextHeight = 13 + object Label1: TLabel + Left = 104 + Top = 16 + Width = 152 + Height = 33 + Caption = #36825#26159'Plug2 ' + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -27 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + end + object Memo1: TMemo + Left = 104 + Top = 55 + Width = 185 + Height = 89 + Lines.Strings = ( + 'Memo1') + TabOrder = 0 + end + object Button1: TButton + Left = 23 + Top = 152 + Width = 75 + Height = 25 + Caption = 'send' + TabOrder = 1 + OnClick = Button1Click + end + object Edit1: TEdit + Left = 112 + Top = 150 + Width = 121 + Height = 21 + TabOrder = 2 + Text = 'Edit1' + end +end diff --git "a/samples/HlSample/\350\257\273\345\217\226\351\205\215\347\275\256\345\212\240\350\275\275\346\250\241\345\235\227/Plug2/Unit_plug2.pas" "b/samples/HlSample/\350\257\273\345\217\226\351\205\215\347\275\256\345\212\240\350\275\275\346\250\241\345\235\227/Plug2/Unit_plug2.pas" new file mode 100644 index 0000000000000000000000000000000000000000..b24d6d51746535c2a369a7485ba7a3a9e43b39bc --- /dev/null +++ "b/samples/HlSample/\350\257\273\345\217\226\351\205\215\347\275\256\345\212\240\350\275\275\346\250\241\345\235\227/Plug2/Unit_plug2.pas" @@ -0,0 +1,86 @@ +unit Unit_plug2; + +interface + +uses + Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, + Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls,UIShowAsNormal,mybean.core.beanfactory,mybean.Tools.beanfactory; + +type + TForm1 = class(TForm,IShowForm,IMainPlugCom) + Label1: TLabel; + Memo1: TMemo; + Button1: TButton; + Edit1: TEdit; + procedure FormCreate(Sender: TObject); + procedure Button1Click(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + procedure ShowAsNoraml;stdcall; + procedure ShowAsMdi;stdcall; + procedure Receive(msg:PChar);stdcall; + procedure Send(msg:PChar);stdcall; + end; + +var + Form1: TForm1; + +implementation + +{$R *.dfm} + + + +{ TForm1 } + +procedure TForm1.Button1Click(Sender: TObject); +begin + Send(PChar(Edit1.Text)); +end; + +procedure TForm1.FormCreate(Sender: TObject); +begin +TMyBeanFactoryTools.SetObject('plug2',Self); +end; + +procedure TForm1.Receive(msg: PChar); +var + str :string; +begin + str :=string(msg); + Memo1.Lines.Add('½ÓÊܵ½ÏûÏ¢:'+str); + show; +end; + +procedure TForm1.Send(msg: PChar); +var + com:IMainPlugCom; +begin + com := TMyBeanFactoryTools.GetObject('main') as IMainPlugCom; + if com<>nil then + begin + com.Receive(msg); + end; + //---------------- + com := TMyBeanFactoryTools.GetObject('plug1') as IMainPlugCom; + if com<>nil then + begin + com.Receive(msg); + end; +end; +procedure TForm1.ShowAsMdi; +begin +// +end; + +procedure TForm1.ShowAsNoraml; +begin + Show; +end; + +initialization + beanFactory.RegisterBean('plug2',TForm1,True); + +end. diff --git "a/samples/HlSample/\350\257\273\345\217\226\351\205\215\347\275\256\345\212\240\350\275\275\346\250\241\345\235\227/bin/plugs.plug-ins" "b/samples/HlSample/\350\257\273\345\217\226\351\205\215\347\275\256\345\212\240\350\275\275\346\250\241\345\235\227/bin/plugs.plug-ins" new file mode 100644 index 0000000000000000000000000000000000000000..6c98c7bc29e9c51bcdf155fa4efbdf6efb6796a7 --- /dev/null +++ "b/samples/HlSample/\350\257\273\345\217\226\351\205\215\347\275\256\345\212\240\350\275\275\346\250\241\345\235\227/bin/plugs.plug-ins" @@ -0,0 +1,13 @@ +{ +list: +[ + { + "lib": "plugs\\Plug1.dll", + "id": "plug1" + }, + { + "lib": "plugs\\Plug2.dll", + "id": "plug2" + } +] +} \ No newline at end of file diff --git "a/samples/HlSample/\350\257\273\345\217\226\351\205\215\347\275\256\345\212\240\350\275\275\346\250\241\345\235\227/interface/UIShowAsNormal.pas" "b/samples/HlSample/\350\257\273\345\217\226\351\205\215\347\275\256\345\212\240\350\275\275\346\250\241\345\235\227/interface/UIShowAsNormal.pas" new file mode 100644 index 0000000000000000000000000000000000000000..9b2bc549be1177e261718723d3fbc8a3fb422173 --- /dev/null +++ "b/samples/HlSample/\350\257\273\345\217\226\351\205\215\347\275\256\345\212\240\350\275\275\346\250\241\345\235\227/interface/UIShowAsNormal.pas" @@ -0,0 +1,22 @@ +unit UIShowAsNormal; + +interface + +type + IShowForm = interface + ['{DC71A10B-7EC2-45D8-B2D7-17D78D193C90}'] + procedure ShowAsNoraml;stdcall; + procedure ShowAsMdi;stdcall; + end; + + IMainPlugCom =interface + ['{CE4DF363-A5A3-4013-A27C-2A3C4F15E3EB}'] + procedure Receive(msg:PChar);stdcall; + procedure Send(msg:PChar);stdcall; + end; + + + +implementation + +end. diff --git "a/samples/HlSample/\350\257\273\345\217\226\351\205\215\347\275\256\345\212\240\350\275\275\346\250\241\345\235\227/main/Main.dpr" "b/samples/HlSample/\350\257\273\345\217\226\351\205\215\347\275\256\345\212\240\350\275\275\346\250\241\345\235\227/main/Main.dpr" new file mode 100644 index 0000000000000000000000000000000000000000..d7e2c9d7c21b61b528b379b9e19871b9d4d11548 --- /dev/null +++ "b/samples/HlSample/\350\257\273\345\217\226\351\205\215\347\275\256\345\212\240\350\275\275\346\250\241\345\235\227/main/Main.dpr" @@ -0,0 +1,17 @@ +program Main; + +uses + Vcl.Forms, + mybean.console, + Unit_Main in 'Unit_Main.pas' {Form1}, + UIShowAsNormal in '..\interface\UIShowAsNormal.pas'; + +{$R *.res} + +begin + Application.Initialize; + ApplicationContextInitialize; + Application.MainFormOnTaskbar := True; + Application.CreateForm(TForm1, Form1); + Application.Run; +end. diff --git "a/samples/HlSample/\350\257\273\345\217\226\351\205\215\347\275\256\345\212\240\350\275\275\346\250\241\345\235\227/main/Unit_Main.dfm" "b/samples/HlSample/\350\257\273\345\217\226\351\205\215\347\275\256\345\212\240\350\275\275\346\250\241\345\235\227/main/Unit_Main.dfm" new file mode 100644 index 0000000000000000000000000000000000000000..e249a34d22c41264dfcc91db3e8178c2d326fe55 --- /dev/null +++ "b/samples/HlSample/\350\257\273\345\217\226\351\205\215\347\275\256\345\212\240\350\275\275\346\250\241\345\235\227/main/Unit_Main.dfm" @@ -0,0 +1,61 @@ +object Form1: TForm1 + Left = 0 + Top = 0 + Caption = 'Form1' + ClientHeight = 292 + ClientWidth = 608 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + OldCreateOrder = False + PixelsPerInch = 96 + TextHeight = 13 + object Button1: TButton + Left = 8 + Top = 56 + Width = 241 + Height = 25 + Caption = #26681#25454#37197#32622#25991#20214#21152#36733#27169#22359 + TabOrder = 0 + OnClick = Button1Click + end + object Button2: TButton + Left = 8 + Top = 8 + Width = 241 + Height = 25 + Caption = #21152#36733#30340#27169#22359#20449#24687 + TabOrder = 1 + OnClick = Button2Click + end + object Memo1: TMemo + Left = 264 + Top = 8 + Width = 337 + Height = 273 + Lines.Strings = ( + 'Memo1') + TabOrder = 2 + end + object Button3: TButton + Left = 8 + Top = 96 + Width = 75 + Height = 25 + Caption = #26174#31034'plug1' + TabOrder = 3 + OnClick = Button3Click + end + object Button4: TButton + Left = 8 + Top = 127 + Width = 75 + Height = 25 + Caption = #26174#31034'plug2' + TabOrder = 4 + OnClick = Button4Click + end +end diff --git "a/samples/HlSample/\350\257\273\345\217\226\351\205\215\347\275\256\345\212\240\350\275\275\346\250\241\345\235\227/main/Unit_Main.pas" "b/samples/HlSample/\350\257\273\345\217\226\351\205\215\347\275\256\345\212\240\350\275\275\346\250\241\345\235\227/main/Unit_Main.pas" new file mode 100644 index 0000000000000000000000000000000000000000..eddbb7e39518e88909501c571227b3cf7da57096 --- /dev/null +++ "b/samples/HlSample/\350\257\273\345\217\226\351\205\215\347\275\256\345\212\240\350\275\275\346\250\241\345\235\227/main/Unit_Main.pas" @@ -0,0 +1,85 @@ +unit Unit_Main; + +interface + +uses + Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, + Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls,mybean.tools.beanfactory,UIShowAsNormal,mybean.core.intf; + +type + TForm1 = class(TForm,IMainPlugCom) + Button1: TButton; + Button2: TButton; + Memo1: TMemo; + Button3: TButton; + Button4: TButton; + procedure Button2Click(Sender: TObject); + procedure Button3Click(Sender: TObject); + procedure Button4Click(Sender: TObject); + procedure Button1Click(Sender: TObject); + private + { Private declarations } + public + procedure Receive(msg:PChar);stdcall; + procedure Send(msg:PChar);stdcall; + { Public declarations } + end; + +var + Form1: TForm1; + +implementation + +{$R *.dfm} + +procedure TForm1.Button1Click(Sender: TObject); +var + a01: IApplicationContextEx01; +begin + a01 := (TMyBeanFactoryTools.applicationContext as IApplicationContextEx01); + // a01.CheckLoadLibraryFile('plugs\\plug1.dll'); //Ö±½Ó¼ÓÔØ ¿âÎļþ + a01.CheckLoadBeanConfigFile('plugs.plug-ins'); +end; + +procedure TForm1.Button2Click(Sender: TObject); +var + lvBuf: array[1..4096] of AnsiChar; + s :String; + l:Integer; +begin + FillChar(lvBuf[1], 4096, 0); + l := (TMyBeanFactoryTools.applicationContext as IApplicationContextEx3).GetBeanInfos(PAnsiChar(@lvBuf[1]), 4096); + s := UTF8Decode(StrPas(PAnsiChar(@lvBuf[1]))); + + Memo1.Clear; + Memo1.Lines.Add(s); + +end; + +procedure TForm1.Button3Click(Sender: TObject); +var + showf:IShowForm; +begin + showf := TMyBeanFactoryTools.GetBean('plug1') as IShowForm; + showf.ShowAsNoraml; +end; + +procedure TForm1.Button4Click(Sender: TObject); +var + showf:IShowForm; +begin + showf := TMyBeanFactoryTools.GetBean('plug2') as IShowForm; + showf.ShowAsNoraml; +end; + +procedure TForm1.Receive(msg: PChar); +begin + /// +end; + +procedure TForm1.Send(msg: PChar); +begin + // +end; + +end. diff --git "a/samples/HlSample/\350\257\273\345\217\226\351\205\215\347\275\256\345\212\240\350\275\275\346\250\241\345\235\227/\351\227\256\351\242\230\344\270\216\350\257\264\346\230\216.txt" "b/samples/HlSample/\350\257\273\345\217\226\351\205\215\347\275\256\345\212\240\350\275\275\346\250\241\345\235\227/\351\227\256\351\242\230\344\270\216\350\257\264\346\230\216.txt" new file mode 100644 index 0000000000000000000000000000000000000000..a7fd9550b7fee8b06d957f7926f93aee9ce24fc7 --- /dev/null +++ "b/samples/HlSample/\350\257\273\345\217\226\351\205\215\347\275\256\345\212\240\350\275\275\346\250\241\345\235\227/\351\227\256\351\242\230\344\270\216\350\257\264\346\230\216.txt" @@ -0,0 +1,6 @@ +¿ª·¢»·¾³:xe7 + mybean_20150610 +ÎÊÌâ1 +¸ù¾ÝÌìµØÐþµÄÎĵµ°Ñ²å¼þ·Åµ½Ö¸¶¨µÄλÖÃ,Ö÷³ÌÐò»á×Ô¶¯¼ÓÔØ²å¼þ, +ÊÇ·ñ´æÔÚ¿ª¹Ø¿ÉÒÔÉ趨ÊÇ·ñÐèÒª×Ô¶¯¼ÓÔØ? +---------- +±¾Àý×Ó ¿ÉÒÔ¸ù¾ÝÅäÖÃÎļþ¼ÓÔØÅäÖÃÎļþÖÐÖ¸¶¨Î»ÖõIJå¼þ \ No newline at end of file diff --git a/samples/MDIConsole/BIN/MDIConsole.history.ini b/samples/MDIConsole/BIN/MDIConsole.history.ini index 774016a7afb5f5b13da931529206d1f6488fc8f7..35b8810707541eb1b2a14ac682b756fe23132694 100644 --- a/samples/MDIConsole/BIN/MDIConsole.history.ini +++ b/samples/MDIConsole/BIN/MDIConsole.history.ini @@ -1,2 +1,2 @@ [main] -lastPluginID=mybeanMethodForm +lastPluginID=demoPluginForm diff --git a/samples/MDIConsole/MDIConsole.dpr b/samples/MDIConsole/MDIConsole.dpr index 88bc78982963c386268a37d8bcf34aec261bd1aa..8ed359bd6123fffbd68db519d4f5333e78b6949d 100644 --- a/samples/MDIConsole/MDIConsole.dpr +++ b/samples/MDIConsole/MDIConsole.dpr @@ -19,7 +19,6 @@ uses {R *.res} begin - Application.Initialize; // mybean³õʼ»¯ applicationContextInitialize; diff --git a/samples/MDIConsole/dllplugin_XE7/plugin01.dpr b/samples/MDIConsole/dllplugin_XE7/plugin01.dpr new file mode 100644 index 0000000000000000000000000000000000000000..1579c3abf65ee009ecb239b2d21a709ac4602957 --- /dev/null +++ b/samples/MDIConsole/dllplugin_XE7/plugin01.dpr @@ -0,0 +1,33 @@ +library plugin01; + +{ Important note about DLL memory management: ShareMem must be the + first unit in your library's USES clause AND your project's (select + Project-View Source) USES clause if your DLL exports any procedures or + functions that pass strings as parameters or function results. This + applies to all strings passed to and from your DLL--even those that + are nested in records and classes. ShareMem is the interface unit to + the BORLNDMM.DLL shared memory manager, which must be deployed along + with your DLL. To avoid using BORLNDMM.DLL, pass string information + using PChar or ShortString parameters. } + +uses + System.SysUtils, + System.Classes, + mybean.core.beanFactory, + ufrmMyBeanPlugin in '..\plug-ins-form-demo\Forms\ufrmMyBeanPlugin.pas' {frmMyBeanPlugin}, + ufrmAbout in '..\plug-ins-form-demo\Forms\ufrmAbout.pas' {frmAbout}, + uBasePluginForm in '..\plug-ins-form-demo\Service\uBasePluginForm.pas', + mBeanMainFormTools in '..\Interface\mBeanMainFormTools.pas', + uICaption in '..\Interface\uICaption.pas', + uIFormShow in '..\Interface\uIFormShow.pas', + uIMainForm in '..\Interface\uIMainForm.pas', + uIPluginForm in '..\Interface\uIPluginForm.pas', + ufrmPluginForm in '..\plug-ins-form-demo\Forms\ufrmPluginForm.pas' {frmPluginForm}; + +{$R *.res} + +begin + beanFactory.RegisterBean('aboutForm', TfrmAbout); + beanFactory.RegisterBean('demoPluginForm', TfrmPluginForm); + beanFactory.RegisterBean('mybeanForm', TfrmMyBeanPlugin, true); +end. diff --git a/samples/MDIConsole/dllplugin_XE7/plugin01.dproj b/samples/MDIConsole/dllplugin_XE7/plugin01.dproj new file mode 100644 index 0000000000000000000000000000000000000000..33b8d88f57713f36d290363e49c3fc1e17ca5d0f --- /dev/null +++ b/samples/MDIConsole/dllplugin_XE7/plugin01.dproj @@ -0,0 +1,506 @@ + + + {90BAF867-5A4A-49EC-BD77-DBC474C6A621} + 16.1 + VCL + plugin01.dpr + True + Debug + Win32 + 1 + Library + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_1 + true + true + + + true + Base + true + + + System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace) + true + plugin01 + .\$(Platform)\$(Config) + .\$(Platform)\$(Config) + false + false + false + false + false + + + FireDACPgDriver;DBXInterBaseDriver;DataSnapServer;DataSnapCommon;DbxCommonDriver;dbxcds;CustomIPTransport;dsnap;IndyIPServer;IndyCore;CloudService;FmxTeeUI;FireDACIBDriver;dsnapxml;bindcompfmx;FireDACODBCDriver;RESTBackendComponents;dbrtl;FireDACCommon;bindcomp;inetdb;xmlrtl;ibxpress;FireDACCommonDriver;bindengine;FMXTee;soaprtl;FireDACMSSQLDriver;DBXInformixDriver;DataSnapServerMidas;DBXFirebirdDriver;inet;FireDACMySQLDriver;soapmidas;DBXSybaseASADriver;RESTComponents;dbexpress;IndyIPClient;FireDACSqliteDriver;FireDACDSDriver;DBXSqliteDriver;fmx;IndySystem;tethering;DataSnapClient;DataSnapProviderClient;fmxFireDAC;DBXOracleDriver;fmxase;IndyIPCommon;DataSnapFireDAC;FireDACDBXDriver;soapserver;inetdbxpress;FireDACASADriver;emsclientfiredac;rtl;DbxClientDriver;DataSnapNativeClient;IndyProtocols;DBXMySQLDriver;bindcompdbx;emsclient;FireDAC;fmxobj;FireDACOracleDriver;fmxdae;DataSnapIndy10ServerTransport;$(DCC_UsePackage) + + + dxPScxSchedulerLnkRS21;cxSchedulerRibbonStyleEventEditorRS21;cxSchedulerRS21;FireDACPgDriver;dxSkinOffice2007BlueRS21;cxTreeListdxBarPopupMenuRS21;dxSkinHighContrastRS21;cxPivotGridRS21;dxSkinSevenRS21;DBXInterBaseDriver;DataSnapServer;DataSnapCommon;dxGaugeControlRS21;cxEditorsRS21;DbxCommonDriver;vclimg;cxPivotGridOLAPRS21;dxPsPrVwAdvRS21;dbxcds;dxSkinSilverRS21;DatasnapConnectorsFreePascal;dxTileControlRS21;dxPSdxGaugeControlLnkRS21;dxSkinMoneyTwinsRS21;vcldb;cxTreeListRS21;dxdborRS21;cxSpreadSheetRS21;dxBarExtItemsRS21;dxWizardControlRS21;dxSkinBlueprintRS21;CustomIPTransport;dsnap;IndyIPServer;dxSkinOffice2010BlackRS21;IndyCore;dxSkinsdxBarPainterRS21;dxSkinValentineRS21;CloudService;dxSkinDevExpressStyleRS21;FmxTeeUI;FireDACIBDriver;dxSkinCaramelRS21;dxPScxPCProdRS21;dxSkinOffice2013DarkGrayRS21;dxDockingRS21;dxLayoutControlRS21;dsnapxml;FireDACDb2Driver;dxSkinscxSchedulerPainterRS21;dxPSLnksRS21;dxPSdxDBOCLnkRS21;dxSkinVS2010RS21;cxLibraryRS21;bindcompfmx;dxComnRS21;cxDataRS21;FireDACODBCDriver;RESTBackendComponents;dxSkinBlackRS21;dxSkinDarkSideRS21;dbrtl;FireDACCommon;bindcomp;inetdb;dxPScxTLLnkRS21;DBXOdbcDriver;vclFireDAC;xmlrtl;ibxpress;cxExportRS21;FireDACCommonDriver;dxSkinOffice2007PinkRS21;dxFlowChartRS21;bindengine;vclactnband;FMXTee;soaprtl;bindcompvcl;cxPageControlRS21;dxCoreRS21;vclie;dxSkinOffice2007BlackRS21;dxPSCoreRS21;dxPSdxDBTVLnkRS21;dxPScxCommonRS21;dxADOServerModeRS21;FireDACMSSQLDriver;DBXInformixDriver;dxSkinLilianRS21;Intraweb;dxPSTeeChartRS21;DataSnapServerMidas;dxSkinWhiteprintRS21;DBXFirebirdDriver;dsnapcon;dxNavBarRS21;inet;dxRibbonRS21;dxSkinsdxNavBarPainterRS21;FireDACMySQLDriver;soapmidas;vclx;dxSkinOffice2013WhiteRS21;cxBarEditItemRS21;dxSkinsCoreRS21;DBXSybaseASADriver;dxFireDACServerModeRS21;dxSkinSharpPlusRS21;RESTComponents;dbexpress;dxSkinSevenClassicRS21;IndyIPClient;dxThemeRS21;FireDACSqliteDriver;dxSkinBlueRS21;FireDACDSDriver;dxDBXServerModeRS21;DBXSqliteDriver;dxSkinsdxDLPainterRS21;dxRichEditControlRS21;fmx;dxSkinMetropolisRS21;cxVerticalGridRS21;IndySystem;dxSkinMetropolisDarkRS21;TeeDB;tethering;dxSpreadSheetRS21;dxSkinGlassOceansRS21;vclib;dxSkinSummer2008RS21;DataSnapClient;dxPScxPivotGridLnkRS21;DataSnapProviderClient;dxPSPrVwRibbonRS21;DBXSybaseASEDriver;cxGridRS21;MetropolisUILiveTile;vcldsnap;dxSpellCheckerRS21;dxSkinLondonLiquidSkyRS21;dxSkinMcSkinRS21;dxSkinOffice2010SilverRS21;dxSkinOffice2007GreenRS21;fmxFireDAC;DBXDb2Driver;dxSkinFoggyRS21;DBXOracleDriver;vclribbon;dxtrmdRS21;fmxase;vcl;dxBarExtDBItemsRS21;dxGDIPlusRS21;DBXMSSQLDriver;IndyIPCommon;dxPSDBTeeChartRS21;dxSkinOffice2007SilverRS21;DataSnapFireDAC;FireDACDBXDriver;dxSkinStardustRS21;dxPSdxSpreadSheetLnkRS21;soapserver;dxdbtrRS21;inetdbxpress;FireDACInfxDriver;dxSkinCoffeeRS21;dxPSdxFCLnkRS21;adortl;FireDACASADriver;dxTabbedMDIRS21;emsclientfiredac;rtl;dxPScxSSLnkRS21;DbxClientDriver;dxorgcRS21;dxPScxExtCommonRS21;dxPSdxOCLnkRS21;dxSkinDarkRoomRS21;Tee;dxPSdxLCLnkRS21;dxMapControlRS21;DataSnapNativeClient;svnui;dxSkinSpringTimeRS21;IndyProtocols;DBXMySQLDriver;cxPivotGridChartRS21;dxSkinOffice2013LightGrayRS21;dxSkinPumpkinRS21;bindcompdbx;TeeUI;cxSchedulerTreeBrowserRS21;dxmdsRS21;dxSkinDevExpressDarkStyleRS21;dxSkinSharpRS21;FireDACADSDriver;vcltouch;dxSkinscxPCPainterRS21;dxServerModeRS21;emsclient;dxSkinsdxRibbonPainterRS21;VCLRESTComponents;FireDAC;VclSmp;dxBarDBNavRS21;dxSkinTheAsphaltWorldRS21;dxSkinXmas2008BlueRS21;DataSnapConnectors;dxSkinLiquidSkyRS21;cxSchedulerGridRS21;fmxobj;dxPScxVGridLnkRS21;svn;dxBarRS21;FireDACOracleDriver;fmxdae;dxSkinOffice2010BlueRS21;FireDACMSAccDriver;DataSnapIndy10ServerTransport;dxSkiniMaginaryRS21;$(DCC_UsePackage) + true + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + 1033 + + + dxPScxSchedulerLnkRS21;cxSchedulerRibbonStyleEventEditorRS21;cxSchedulerRS21;FireDACPgDriver;dxSkinOffice2007BlueRS21;cxTreeListdxBarPopupMenuRS21;dxSkinHighContrastRS21;cxPivotGridRS21;dxSkinSevenRS21;DBXInterBaseDriver;DataSnapServer;DataSnapCommon;dxGaugeControlRS21;cxEditorsRS21;DbxCommonDriver;vclimg;cxPivotGridOLAPRS21;dxPsPrVwAdvRS21;dbxcds;dxSkinSilverRS21;DatasnapConnectorsFreePascal;dxTileControlRS21;dxPSdxGaugeControlLnkRS21;dxSkinMoneyTwinsRS21;vcldb;cxTreeListRS21;dxdborRS21;cxSpreadSheetRS21;dxBarExtItemsRS21;dxWizardControlRS21;dxSkinBlueprintRS21;CustomIPTransport;dsnap;IndyIPServer;dxSkinOffice2010BlackRS21;IndyCore;dxSkinsdxBarPainterRS21;dxSkinValentineRS21;CloudService;dxSkinDevExpressStyleRS21;FmxTeeUI;FireDACIBDriver;dxSkinCaramelRS21;dxPScxPCProdRS21;dxSkinOffice2013DarkGrayRS21;dxDockingRS21;dxLayoutControlRS21;dsnapxml;FireDACDb2Driver;dxSkinscxSchedulerPainterRS21;dxPSLnksRS21;dxPSdxDBOCLnkRS21;dxSkinVS2010RS21;cxLibraryRS21;bindcompfmx;dxComnRS21;cxDataRS21;FireDACODBCDriver;RESTBackendComponents;dxSkinBlackRS21;dxSkinDarkSideRS21;dbrtl;FireDACCommon;bindcomp;inetdb;dxPScxTLLnkRS21;DBXOdbcDriver;vclFireDAC;xmlrtl;ibxpress;cxExportRS21;FireDACCommonDriver;dxSkinOffice2007PinkRS21;dxFlowChartRS21;bindengine;vclactnband;FMXTee;soaprtl;bindcompvcl;cxPageControlRS21;dxCoreRS21;vclie;dxSkinOffice2007BlackRS21;dxPSCoreRS21;dxPSdxDBTVLnkRS21;dxPScxCommonRS21;dxADOServerModeRS21;FireDACMSSQLDriver;DBXInformixDriver;dxSkinLilianRS21;Intraweb;dxPSTeeChartRS21;DataSnapServerMidas;dxSkinWhiteprintRS21;DBXFirebirdDriver;dsnapcon;dxNavBarRS21;inet;dxRibbonRS21;dxSkinsdxNavBarPainterRS21;FireDACMySQLDriver;soapmidas;vclx;dxSkinOffice2013WhiteRS21;cxBarEditItemRS21;dxSkinsCoreRS21;DBXSybaseASADriver;dxFireDACServerModeRS21;dxSkinSharpPlusRS21;RESTComponents;dbexpress;dxSkinSevenClassicRS21;IndyIPClient;dxThemeRS21;FireDACSqliteDriver;dxSkinBlueRS21;FireDACDSDriver;dxDBXServerModeRS21;DBXSqliteDriver;dxSkinsdxDLPainterRS21;dxRichEditControlRS21;fmx;dxSkinMetropolisRS21;cxVerticalGridRS21;IndySystem;dxSkinMetropolisDarkRS21;TeeDB;tethering;dxSpreadSheetRS21;dxSkinGlassOceansRS21;vclib;dxSkinSummer2008RS21;DataSnapClient;dxPScxPivotGridLnkRS21;DataSnapProviderClient;dxPSPrVwRibbonRS21;DBXSybaseASEDriver;cxGridRS21;MetropolisUILiveTile;vcldsnap;dxSpellCheckerRS21;dxSkinLondonLiquidSkyRS21;dxSkinMcSkinRS21;dxSkinOffice2010SilverRS21;dxSkinOffice2007GreenRS21;fmxFireDAC;DBXDb2Driver;dxSkinFoggyRS21;DBXOracleDriver;vclribbon;dxtrmdRS21;fmxase;vcl;dxBarExtDBItemsRS21;dxGDIPlusRS21;DBXMSSQLDriver;IndyIPCommon;dxPSDBTeeChartRS21;dxSkinOffice2007SilverRS21;DataSnapFireDAC;FireDACDBXDriver;dxSkinStardustRS21;dxPSdxSpreadSheetLnkRS21;soapserver;dxdbtrRS21;inetdbxpress;FireDACInfxDriver;dxSkinCoffeeRS21;dxPSdxFCLnkRS21;adortl;FireDACASADriver;dxTabbedMDIRS21;emsclientfiredac;rtl;dxPScxSSLnkRS21;DbxClientDriver;dxorgcRS21;dxPScxExtCommonRS21;dxPSdxOCLnkRS21;dxSkinDarkRoomRS21;Tee;dxPSdxLCLnkRS21;dxMapControlRS21;DataSnapNativeClient;dxSkinSpringTimeRS21;IndyProtocols;DBXMySQLDriver;cxPivotGridChartRS21;dxSkinOffice2013LightGrayRS21;dxSkinPumpkinRS21;bindcompdbx;TeeUI;cxSchedulerTreeBrowserRS21;dxmdsRS21;dxSkinDevExpressDarkStyleRS21;dxSkinSharpRS21;FireDACADSDriver;vcltouch;dxSkinscxPCPainterRS21;dxServerModeRS21;emsclient;dxSkinsdxRibbonPainterRS21;VCLRESTComponents;FireDAC;VclSmp;dxBarDBNavRS21;dxSkinTheAsphaltWorldRS21;dxSkinXmas2008BlueRS21;DataSnapConnectors;dxSkinLiquidSkyRS21;cxSchedulerGridRS21;fmxobj;dxPScxVGridLnkRS21;dxBarRS21;FireDACOracleDriver;fmxdae;dxSkinOffice2010BlueRS21;FireDACMSAccDriver;DataSnapIndy10ServerTransport;dxSkiniMaginaryRS21;$(DCC_UsePackage) + + + DEBUG;$(DCC_Define) + true + false + true + true + true + + + ..\BIN + true + None + ..\BIN\MDIConsole.exe + 1033 + false + + + false + RELEASE;$(DCC_Define) + 0 + 0 + + + + MainSource + + +
frmMyBeanPlugin
+ dfm +
+ +
frmAbout
+ dfm +
+ + + + + + + +
frmPluginForm
+ dfm +
+ + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + +
+ + Delphi.Personality.12 + Application + + + + plugin01.dpr + + + Microsoft Office 2000 Sample Automation Server Wrapper Components + Microsoft Office XP Sample Automation Server Wrapper Components + File e:\workspace\delphi\vcl\devexpress14.2.2\library\rs21\win32\bpl\dcldxpscxgridlnkrs21.bpl not found + File e:\workspace\delphi\vcl\devexpress14.2.2\library\rs21\win32\bpl\dclcxgridwizardrs21.bpl not found + + + + + + plugin01.dll + true + + + + + true + + + true + + + + + plugin01.dll + true + + + + + 1 + .dylib + + + 0 + .bpl + + + Contents\MacOS + 1 + .dylib + + + 1 + .dylib + + + + + 1 + .dylib + + + 0 + .dll;.bpl + + + Contents\MacOS + 1 + .dylib + + + 1 + .dylib + + + + + 1 + + + 1 + + + + + Contents + 1 + + + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + + + res\drawable-normal + 1 + + + + + library\lib\x86 + 1 + + + + + 1 + + + 1 + + + + + ../ + 1 + + + + + library\lib\armeabi-v7a + 1 + + + + + 1 + + + 1 + + + + + res\drawable-xlarge + 1 + + + + + res\drawable-xhdpi + 1 + + + + + 1 + + + 1 + + + + + res\drawable-xxhdpi + 1 + + + + + library\lib\mips + 1 + + + + + res\drawable + 1 + + + + + Contents\MacOS + 1 + + + 1 + + + 0 + + + + + Contents\MacOS + 1 + .framework + + + 0 + + + + + res\drawable-small + 1 + + + + + ../ + 1 + + + + + Contents\MacOS + 1 + + + 1 + + + Contents\MacOS + 0 + + + + + classes + 1 + + + + + 1 + + + 1 + + + + + 1 + + + 1 + + + + + res\drawable + 1 + + + + + Contents\Resources + 1 + + + + + 1 + + + + + 1 + + + 1 + + + + + 1 + + + library\lib\armeabi-v7a + 1 + + + 0 + + + Contents\MacOS + 1 + + + 1 + + + + + library\lib\armeabi + 1 + + + + + res\drawable-large + 1 + + + + + 0 + + + 0 + + + 0 + + + Contents\MacOS + 0 + + + 0 + + + + + 1 + + + 1 + + + + + res\drawable-ldpi + 1 + + + + + res\values + 1 + + + + + 1 + + + 1 + + + + + res\drawable-mdpi + 1 + + + + + res\drawable-hdpi + 1 + + + + + 1 + + + + + + + + + + + False + True + False + + + 12 + + + + +
diff --git a/samples/MDIConsole/dllplugin_XE7/plugin01.dproj.local b/samples/MDIConsole/dllplugin_XE7/plugin01.dproj.local new file mode 100644 index 0000000000000000000000000000000000000000..6f477061b6b12db179d093a7793ec8e3af109666 --- /dev/null +++ b/samples/MDIConsole/dllplugin_XE7/plugin01.dproj.local @@ -0,0 +1,20 @@ + + + + 2015/03/05 13:18:08.000.305,=C:\Users\ymofen\Documents\Embarcadero\Studio\Projects\Unit1.pas + 2015/05/26 10:27:30.000.329,=C:\Users\ymofen\Documents\Embarcadero\Studio\Projects\Unit1.pas + 2015/05/27 16:58:18.000.670,E:\workspace\delphi\delphi-framework-MyBean\samples\MDIConsole\plugin01.dproj=C:\Users\ymofen\Documents\Embarcadero\Studio\Projects\Project1.dproj + 2015/05/27 16:58:43.000.819,E:\workspace\delphi\delphi-framework-MyBean\samples\MDIConsole\dllplugin_1\plugin01.dproj=E:\workspace\delphi\delphi-framework-MyBean\samples\MDIConsole\plugin01.dproj + 2015/05/27 17:00:06.000.666,=E:\workspace\delphi\delphi-framework-MyBean\samples\MDIConsole\plug-ins-form-demo\Forms\ufrmMyBeanPlugin.pas + 2015/05/27 17:02:42.000.150,=E:\workspace\delphi\delphi-framework-MyBean\samples\MDIConsole\plug-ins-form-demo\Forms\ufrmAbout.pas + 2015/05/27 17:02:55.000.182,=E:\workspace\delphi\delphi-framework-MyBean\samples\MDIConsole\plug-ins-form-demo\Service\uBasePluginForm.pas + 2015/05/27 17:03:18.000.112,=E:\workspace\delphi\delphi-framework-MyBean\samples\MDIConsole\Interface\uIFormShow.pas + 2015/05/27 17:03:18.000.121,=E:\workspace\delphi\delphi-framework-MyBean\samples\MDIConsole\Interface\uIMainForm.pas + 2015/05/27 17:03:18.000.102,=E:\workspace\delphi\delphi-framework-MyBean\samples\MDIConsole\Interface\uICaption.pas + 2015/05/27 17:03:18.000.078,=E:\workspace\delphi\delphi-framework-MyBean\samples\MDIConsole\Interface\mBeanMainFormTools.pas + 2015/05/27 17:03:18.000.131,=E:\workspace\delphi\delphi-framework-MyBean\samples\MDIConsole\Interface\uIPluginForm.pas + 2015/05/27 17:03:54.000.155,=E:\workspace\delphi\delphi-framework-MyBean\samples\MDIConsole\plug-ins-form-demo\Forms\ufrmPluginForm.pas + 2015/05/27 17:03:54.000.187,=E:\workspace\delphi\delphi-framework-MyBean\samples\MDIConsole\plug-ins-form-demo\Forms\ufrmShowModalTester.pas + 2015/05/27 17:04:26.687,E:\workspace\delphi\delphi-framework-MyBean\samples\MDIConsole\plug-ins-form-demo\Forms\ufrmShowModalTester.pas= + + diff --git a/samples/MDIConsole/dllplugin_XE7/plugin01.identcache b/samples/MDIConsole/dllplugin_XE7/plugin01.identcache new file mode 100644 index 0000000000000000000000000000000000000000..970f96edd167ff162ba418207baeabd1d351f559 Binary files /dev/null and b/samples/MDIConsole/dllplugin_XE7/plugin01.identcache differ diff --git a/samples/MDIConsole/dllplugin_XE7/plugin01.res b/samples/MDIConsole/dllplugin_XE7/plugin01.res new file mode 100644 index 0000000000000000000000000000000000000000..a64cea33b7bbf9c30d10d7750693ab849f870abc Binary files /dev/null and b/samples/MDIConsole/dllplugin_XE7/plugin01.res differ diff --git a/samples/MDIConsole/mainForm/ufrmMain.dfm b/samples/MDIConsole/mainForm/ufrmMain.dfm index 386d45143829279690123c4cee5afdb33f0609e3..62f464e30ec253deaffa984dcb608ad70c795751 100644 --- a/samples/MDIConsole/mainForm/ufrmMain.dfm +++ b/samples/MDIConsole/mainForm/ufrmMain.dfm @@ -50,22 +50,22 @@ object frmMain: TfrmMain TabOrder = 2 end object Button1: TButton - Left = 352 + Left = 336 Top = 1 - Width = 75 + Width = 91 Height = 25 - Caption = 'Button1' + Caption = #21333#23454#20363#31383#20307#28436#31034 TabOrder = 3 OnClick = Button1Click end - object Button2: TButton - Left = 464 - Top = 0 - Width = 75 + object btnShowAsNormal: TButton + Left = 433 + Top = 1 + Width = 94 Height = 25 - Caption = 'Button2' + Caption = 'btnShowAsNormal' TabOrder = 4 - OnClick = Button2Click + OnClick = btnShowAsNormalClick end end object mmMain: TMainMenu diff --git a/samples/MDIConsole/mainForm/ufrmMain.pas b/samples/MDIConsole/mainForm/ufrmMain.pas index 259f24154c88aac769d1c41f231545a3961e94dd..4f9bbfb3c2b5786fbac714bfeee4cca4692a5409 100644 --- a/samples/MDIConsole/mainForm/ufrmMain.pas +++ b/samples/MDIConsole/mainForm/ufrmMain.pas @@ -23,13 +23,13 @@ type btnCreateAsMDI: TButton; actCreatePluginAsMDI: TAction; Button1: TButton; - Button2: TButton; + btnShowAsNormal: TButton; procedure actAboutExecute(Sender: TObject); procedure actCreateDemoFormExecute(Sender: TObject); procedure actCreatePluginAsMDIExecute(Sender: TObject); procedure actCreateReporterDEMOExecute(Sender: TObject); + procedure btnShowAsNormalClick(Sender: TObject); procedure Button1Click(Sender: TObject); - procedure Button2Click(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormShow(Sender: TObject); private @@ -110,17 +110,23 @@ begin self.showPluginAsMDI(lvPlugin); end; -procedure TfrmMain.Button1Click(Sender: TObject); +procedure TfrmMain.btnShowAsNormalClick(Sender: TObject); var - FTempIntf:IInterface; + lvPlugInf:IInterface; begin - FTempIntf := TMyBeanFactoryTools.getBean(edtPluginID.Text); - self.showPluginAsMDI(FTempIntf); + lvPlugInf := TMyBeanFactoryTools.getBean(edtPluginID.Text); + (lvPlugInf as IShowAsNormal).showAsNormal(); end; -procedure TfrmMain.Button2Click(Sender: TObject); +procedure TfrmMain.Button1Click(Sender: TObject); +var + lvPlugInf:IInterface; begin - FTempIntf := nil; + ShowMessage('Çë×¢Òâ: ÑÝʾµ÷Óõ¥ÊµÀý´°Ìå²å¼þ[mybeanForm]' + sLineBreak + + 'ÒªÇómybeanForm×¢²á·½Ê½Îªµ¥ÊµÀý,µ¥ÊµÀý²å¼þ²»ÄÜ×Ô¼ºµ÷ÓÃFree,»òÕßÔÚ´°ÌåÖÐAction:=caFree'); + lvPlugInf := TMyBeanFactoryTools.getBean('mybeanForm'); + (lvPlugInf as IShowAsNormal).showAsNormal(); + end; procedure TfrmMain.closePluginQuery(const pvForm: IInterface; vCanClose: diff --git a/samples/MDIConsole/plug-ins-form-demo/Forms/ufrmMyBeanPlugin.dfm b/samples/MDIConsole/plug-ins-form-demo/Forms/ufrmMyBeanPlugin.dfm index 209603995d64ae966928ad490bd4dab2e7e6112c..5f335744ca3b1a62c96e9375531d220e99c5d6b8 100644 --- a/samples/MDIConsole/plug-ins-form-demo/Forms/ufrmMyBeanPlugin.dfm +++ b/samples/MDIConsole/plug-ins-form-demo/Forms/ufrmMyBeanPlugin.dfm @@ -13,4 +13,14 @@ object frmMyBeanPlugin: TfrmMyBeanPlugin OldCreateOrder = False PixelsPerInch = 96 TextHeight = 13 + object Memo1: TMemo + Left = 8 + Top = 8 + Width = 425 + Height = 209 + Lines.Strings = ( + #22914#26524#35813#31383#20307#26159#21333#23454#20363#65292 + #20320#21487#20197#22312#35813'MEMO'#20013#20570#19968#20123#20462#25913#65292#19979#27425#26174#31034#26102#65292#36824#20250#20986#29616#22312#36825#37324) + TabOrder = 0 + end end diff --git a/samples/MDIConsole/plug-ins-form-demo/Forms/ufrmMyBeanPlugin.pas b/samples/MDIConsole/plug-ins-form-demo/Forms/ufrmMyBeanPlugin.pas index c82b783104f665fac512f0055e3254751486ccd7..92e09ae72dfab16af7f1ab19c0b9445763e9aea7 100644 --- a/samples/MDIConsole/plug-ins-form-demo/Forms/ufrmMyBeanPlugin.pas +++ b/samples/MDIConsole/plug-ins-form-demo/Forms/ufrmMyBeanPlugin.pas @@ -4,10 +4,11 @@ interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, mybean.vcl.BaseForm, mybean.core.beanFactory; + Dialogs, mybean.vcl.BaseForm, mybean.core.beanFactory, StdCtrls; type TfrmMyBeanPlugin = class(TMyBeanBaseForm) + Memo1: TMemo; private { Private declarations } public diff --git a/samples/MDIConsole/plug-ins-form-demo/plugin_form_demo.dpr b/samples/MDIConsole/plug-ins-form-demo/plugin_form_demo.dpr index 90077ca9fcc95aa8665b43d740c270020e0da160..841ba5e29f850f9dc7cd3d08f540bd0cd5709eab 100644 --- a/samples/MDIConsole/plug-ins-form-demo/plugin_form_demo.dpr +++ b/samples/MDIConsole/plug-ins-form-demo/plugin_form_demo.dpr @@ -30,5 +30,5 @@ uses begin beanFactory.RegisterBean('aboutForm', TfrmAbout); beanFactory.RegisterBean('demoPluginForm', TfrmPluginForm); - beanFactory.RegisterBean('mybeanForm', TfrmMyBeanPlugin); + beanFactory.RegisterBean('mybeanForm', TfrmMyBeanPlugin, true); end. diff --git "a/samples/MDIConsole/\350\257\264\346\230\216.txt" "b/samples/MDIConsole/\350\257\264\346\230\216.txt" index 165b3fae7b84e56ba6e28f5b4a7e70ad3f981239..2da7fa805882ceed4b58c486d1103e519159efe4 100644 --- "a/samples/MDIConsole/\350\257\264\346\230\216.txt" +++ "b/samples/MDIConsole/\350\257\264\346\230\216.txt" @@ -1,3 +1,16 @@ 1.ΪMDIÑÝʾ£¬DLLºÍEXE¶¼±ØÐë´ø°ü±àÒë¡£Èç¹ûûÓÐÈý·½¿Ø¼þ¶¼±ØÐë´øÉÏvcl;rtlÁ½¸ö°ü 2.Èç¹ûʹÓÃÁËÈý·½¿Ø¼þ£¬ÐèÒª´øÈý·½¿Ø¼þµÄ°ü¡£ -3.ʵ¼ÊÏîĿӦÓÃÖУ¬¿ÉÒÔ½øÐаüµÄºÏ²¢£¬¿ÉÒ԰ٶȰüºÏ²¢¡£ \ No newline at end of file +3.ʵ¼ÊÏîĿӦÓÃÖУ¬¿ÉÒÔ½øÐаüµÄºÏ²¢£¬¿ÉÒ԰ٶȰüºÏ²¢¡£ + + +¹¤³ÌÉèÖà +·¾¶ÉèÖà +..\BIN + +´ø°ü +vcl;rtl; + + +DLLµ÷ÊÔ +ÔËÐвÎÊý: +..\BIN\MDIConsole.exe \ No newline at end of file diff --git a/samples/ObjectMap/plug-Map/plugMap.dpr b/samples/ObjectMap/plug-Map/plugMap.dpr index d44bdf72bd3ed61d1e487540ae6f7edc3a7df2fd..f6fe34c14fa92b55428548a368ff871bfe298542 100644 --- a/samples/ObjectMap/plug-Map/plugMap.dpr +++ b/samples/ObjectMap/plug-Map/plugMap.dpr @@ -13,7 +13,7 @@ library plugMap; uses SysUtils, Classes, - mybean.core.beanFactoryForNoVcl, + mybean.core.beanFactory, uMapObjectImpl in 'Service\uMapObjectImpl.pas', uIMapObject in 'interface\uIMapObject.pas', ufrmPluginForm in 'Forms\ufrmPluginForm.pas' {frmPluginForm}, diff --git a/samples/simpleConsole/simpleConsole.dpr b/samples/simpleConsole/simpleConsole.dpr index c1b0ff4c1df3dc0d11d25f261dc62e0def7e2f7a..526fa89e9c61313d893f42ddcdfbfd039f7b0291 100644 --- a/samples/simpleConsole/simpleConsole.dpr +++ b/samples/simpleConsole/simpleConsole.dpr @@ -12,6 +12,10 @@ uses begin Application.Initialize; try + // Ö±½Ó¼ÓÔØplug-insĿ¼ÏµÄDLL²å¼þ + ExecuteLoadLibFiles('CorePlugins\*.dll'); + ExecuteLoadLibFiles('CorePlugins\*.bpl'); + // Ö±½Ó¼ÓÔØplug-insĿ¼ÏµÄDLL²å¼þ ExecuteLoadLibFiles('demoPlugins\*.dll'); @@ -19,11 +23,14 @@ begin ExecuteLoadLibFiles('demoPlugins\*.bpl'); // Ö±½Ó¼ÓÔØEXEµ±Ç°Ä¿Â¼ÏµÄDLL²å¼þ + // ÍÆ¼ö½«²å¼þ·Åµ½Í³Ò»Ä¿Â¼ÏÂÃæ½øÐмÓÔØ£¬±ÜÃâ¼ÓÔØµ½ÆäËû·ÇmybeanµÄ²å¼þ ExecuteLoadLibFiles('*.dll'); // ¼ÓÔØconfigPluginsĿ¼ÏµIJå¼þÅäÖÃÎļþ(°´Ðè¼ÓÔØ) ExecuteLoadBeanFromConfigFiles('configPlugins\*.plug-ins'); - + + StartLibraryService; + Application.MainFormOnTaskbar := True; Application.CreateForm(TfrmMain, frmMain); Application.Run; diff --git a/samples/singleDEMO/singleDEMO.dpr b/samples/singleDEMO/singleDEMO.dpr index a999c8e585bf32fe54ad766542404b77199c95e8..093a8228cbd941ad6e059ac401b173cffaf99190 100644 --- a/samples/singleDEMO/singleDEMO.dpr +++ b/samples/singleDEMO/singleDEMO.dpr @@ -9,7 +9,8 @@ uses uIUIForm in 'Interface\uIUIForm.pas', ufrmSingleton in 'Child\ufrmSingleton.pas' {frmSingleton}, uIShow in 'Interface\uIShow.pas', - uIFormShow in 'Interface\uIFormShow.pas'; + uIFormShow in 'Interface\uIFormShow.pas', + mybean.tools.beanFactory; {R *.res} @@ -19,8 +20,12 @@ begin beanFactory.RegisterMainFormBean('main', TfrmMain); registerFactoryObject(beanFactory, 'default'); Application.MainFormOnTaskbar := True; - //Application.CreateForm(TfrmMain, frmMain); - appPluginContext.getBean('main'); - Application.Run; + TMyBeanFactoryTools.GetBean('main'); + try + Application.Run; + finally + Application.MainForm.Free; + ApplicationContextFinalize; + end; end. diff --git "a/samples/\346\240\207\345\207\206DLL\346\265\213\350\257\225/DllForm.dpr" "b/samples/\346\240\207\345\207\206DLL\346\265\213\350\257\225/DllForm.dpr" new file mode 100644 index 0000000000000000000000000000000000000000..dc90465c2ef6370c1b4a54689dbbd1a487915cc3 --- /dev/null +++ "b/samples/\346\240\207\345\207\206DLL\346\265\213\350\257\225/DllForm.dpr" @@ -0,0 +1,36 @@ +library DllForm; + +{ Important note about DLL memory management: ShareMem must be the + first unit in your library's USES clause AND your project's (select + Project-View Source) USES clause if your DLL exports any procedures or + functions that pass strings as parameters or function results. This + applies to all strings passed to and from your DLL--even those that + are nested in records and classes. ShareMem is the interface unit to + the BORLNDMM.DLL shared memory manager, which must be deployed along + with your DLL. To avoid using BORLNDMM.DLL, pass string information + using PChar or ShortString parameters. } + +uses + SysUtils, + Classes, + forms, + Unit2 in 'Unit2.pas' {Form2}, + fAbout in 'fAbout.pas' {frmAbout}, + uBasePluginForm in 'uBasePluginForm.pas'; + +{$R *.res} +procedure Load_frmTest(App: THandle);stdcall; +begin + frmAbout := TfrmAbout.Create(nil); + try + frmAbout.ShowModal; + finally + frmAbout.Free; + end; +end; + +exports + Load_frmTest; + +begin +end. diff --git "a/samples/\346\240\207\345\207\206DLL\346\265\213\350\257\225/Project1.dpr" "b/samples/\346\240\207\345\207\206DLL\346\265\213\350\257\225/Project1.dpr" new file mode 100644 index 0000000000000000000000000000000000000000..513a1dd5e8bee721ea5ed146fd3f334ce9d8c34d --- /dev/null +++ "b/samples/\346\240\207\345\207\206DLL\346\265\213\350\257\225/Project1.dpr" @@ -0,0 +1,13 @@ +program Project1; + +uses + Forms, + Unit1 in 'Unit1.pas' {Form1}; + +{$R *.res} + +begin + Application.Initialize; + Application.CreateForm(TForm1, Form1); + Application.Run; +end. diff --git "a/samples/\346\240\207\345\207\206DLL\346\265\213\350\257\225/Unit1.dfm" "b/samples/\346\240\207\345\207\206DLL\346\265\213\350\257\225/Unit1.dfm" new file mode 100644 index 0000000000000000000000000000000000000000..4929728c5b5db130dad8cabd7c656409721e5b28 --- /dev/null +++ "b/samples/\346\240\207\345\207\206DLL\346\265\213\350\257\225/Unit1.dfm" @@ -0,0 +1,34 @@ +object Form1: TForm1 + Left = 190 + Top = 183 + Caption = 'Form1' + ClientHeight = 525 + ClientWidth = 963 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + OldCreateOrder = False + PixelsPerInch = 96 + TextHeight = 13 + object Panel1: TPanel + Left = 0 + Top = 0 + Width = 963 + Height = 41 + Align = alTop + Caption = 'Panel1' + TabOrder = 0 + object btnInVoke: TButton + Left = 22 + Top = 9 + Width = 163 + Height = 25 + Caption = 'btnInVoke_Load_frmTest' + TabOrder = 0 + OnClick = btnInVokeClick + end + end +end diff --git "a/samples/\346\240\207\345\207\206DLL\346\265\213\350\257\225/Unit1.pas" "b/samples/\346\240\207\345\207\206DLL\346\265\213\350\257\225/Unit1.pas" new file mode 100644 index 0000000000000000000000000000000000000000..48dbd62bf872b544447b8be10bf1107654b04296 --- /dev/null +++ "b/samples/\346\240\207\345\207\206DLL\346\265\213\350\257\225/Unit1.pas" @@ -0,0 +1,33 @@ +unit Unit1; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, ExtCtrls; + +type + TForm1 = class(TForm) + Panel1: TPanel; + btnInVoke: TButton; + procedure btnInVokeClick(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + end; + + procedure Load_frmTest(App: THandle);stdcall ;External 'DllForm.dll'; +var + Form1: TForm1; + +implementation + +{$R *.dfm} + +procedure TForm1.btnInVokeClick(Sender: TObject); +begin + Load_frmTest(Application.Handle) ; +end; + +end. diff --git "a/samples/\346\240\207\345\207\206DLL\346\265\213\350\257\225/Unit2.dfm" "b/samples/\346\240\207\345\207\206DLL\346\265\213\350\257\225/Unit2.dfm" new file mode 100644 index 0000000000000000000000000000000000000000..ca5723a79e6d4bf2edad8b387cd7746ddeec6739 --- /dev/null +++ "b/samples/\346\240\207\345\207\206DLL\346\265\213\350\257\225/Unit2.dfm" @@ -0,0 +1,25 @@ +object Form2: TForm2 + Left = 194 + Top = 314 + Caption = 'Form2' + ClientHeight = 525 + ClientWidth = 963 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + OldCreateOrder = False + PixelsPerInch = 96 + TextHeight = 13 + object BitBtn1: TBitBtn + Left = 784 + Top = 104 + Width = 75 + Height = 25 + Caption = 'BitBtn1' + TabOrder = 0 + OnClick = BitBtn1Click + end +end diff --git "a/samples/\346\240\207\345\207\206DLL\346\265\213\350\257\225/Unit2.pas" "b/samples/\346\240\207\345\207\206DLL\346\265\213\350\257\225/Unit2.pas" new file mode 100644 index 0000000000000000000000000000000000000000..7dbe63b3519d6cf261f86bd939369b932e3b7eb0 --- /dev/null +++ "b/samples/\346\240\207\345\207\206DLL\346\265\213\350\257\225/Unit2.pas" @@ -0,0 +1,35 @@ +unit Unit2; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, ActiveX, VclTee.TeeGDIPlus, VCLTee.TeEngine, Vcl.ExtCtrls, + VCLTee.TeeProcs, VCLTee.Chart, Vcl.StdCtrls, Vcl.Buttons; + +type + TForm2 = class(TForm) + BitBtn1: TBitBtn; + procedure BitBtn1Click(Sender: TObject); + + private + { Private declarations } + public + { Public declarations } + end; + +var + Form2: TForm2; + + +implementation + +{$R *.dfm} + +procedure TForm2.BitBtn1Click(Sender: TObject); +begin + TChart.Create(nil); +end; + + +end. diff --git "a/samples/\346\240\207\345\207\206DLL\346\265\213\350\257\225/fAbout.dfm" "b/samples/\346\240\207\345\207\206DLL\346\265\213\350\257\225/fAbout.dfm" new file mode 100644 index 0000000000000000000000000000000000000000..b030165c0393d10d590c92604e9fa15e25a5a79d --- /dev/null +++ "b/samples/\346\240\207\345\207\206DLL\346\265\213\350\257\225/fAbout.dfm" @@ -0,0 +1,27 @@ +object frmAbout: TfrmAbout + Left = 0 + Top = 0 + Caption = 'frmAbout' + ClientHeight = 337 + ClientWidth = 530 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + OldCreateOrder = False + PixelsPerInch = 96 + TextHeight = 13 + object cht1: TChart + Left = 60 + Top = 8 + Width = 400 + Height = 250 + Title.Text.Strings = ( + 'TChart') + TabOrder = 0 + DefaultCanvas = 'TGDIPlusCanvas' + ColorPaletteIndex = 13 + end +end diff --git "a/samples/\346\240\207\345\207\206DLL\346\265\213\350\257\225/fAbout.pas" "b/samples/\346\240\207\345\207\206DLL\346\265\213\350\257\225/fAbout.pas" new file mode 100644 index 0000000000000000000000000000000000000000..e2bb757f4dbe6ed87742deec28a5c30fd13f7bc6 --- /dev/null +++ "b/samples/\346\240\207\345\207\206DLL\346\265\213\350\257\225/fAbout.pas" @@ -0,0 +1,27 @@ +unit fAbout; + +interface + +uses + Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, + Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, + mybean.core.intf, uBasePluginForm, VclTee.TeeGDIPlus, VCLTee.TeEngine, + Vcl.ExtCtrls, VCLTee.TeeProcs, VCLTee.Chart; + +type + TfrmAbout = class(TBasePluginForm) + cht1: TChart; + private + { Private declarations } + public + { Public declarations } + end; + +var + frmAbout: TfrmAbout; + +implementation + +{$R *.dfm} + +end. diff --git "a/samples/\346\240\207\345\207\206DLL\346\265\213\350\257\225/uBasePluginForm.pas" "b/samples/\346\240\207\345\207\206DLL\346\265\213\350\257\225/uBasePluginForm.pas" new file mode 100644 index 0000000000000000000000000000000000000000..919dba25494a2bda64988288096c42f1b21d5f28 --- /dev/null +++ "b/samples/\346\240\207\345\207\206DLL\346\265\213\350\257\225/uBasePluginForm.pas" @@ -0,0 +1,113 @@ +unit uBasePluginForm; + +interface + +uses + Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, + Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls, + ComObj, + mybean.core.intf, mybean.tools.beanFactory; + +type + TBasePluginForm = class(TForm, + IFreeObject, + IBeanConfigSetter) + private + FInstanceID: string; + protected + __pass:AnsiString; + FBeanConfigStr:string; + procedure DoClose(var Action: TCloseAction); override; + protected + /// + /// ÉèÖÃÅäÖÃÖеÄConfig + /// + /// + /// ÅäÖÃÎļþÖÐJSon¸ñʽµÄ×Ö·û´® + /// + procedure setBeanConfig(pvBeanConfig: PAnsiChar); virtual; stdcall; + protected + //»ñȡʵÀýHandle + function getInstanceID: string; stdcall; + //»ñÈ¡´°Ìå¶ÔÏó + function getObject: TObject; stdcall; + procedure ShowAsChild(Parent: TWinControl); stdcall; + function showAsModal: Integer; stdcall; + procedure showAsNormal(); stdcall; + //¹Ø±ÕºÍÊÍ·Å´°Ìå + procedure closeForm; stdcall; + protected + procedure FreeObject; stdcall; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + end; + +implementation + + +constructor TBasePluginForm.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FInstanceID := CreateClassID; +end; + +destructor TBasePluginForm.Destroy; +begin + //Èç¹û¹²Ïí±äÁ¿ÖдæÔڸĽӿÚÔò½øÐÐÒÆ³ý(¿ÉÒÔÌáÔçÒÆ³ý) + TMyBeanFactoryTools.removeObject(AnsiString(FInstanceID)); + + inherited Destroy; +end; + +procedure TBasePluginForm.DoClose(var Action: TCloseAction); +begin + if not (fsModal in self.FFormState) then action := caFree; + inherited DoClose(Action); +end; + +function TBasePluginForm.getInstanceID: string; +begin + Result := FInstanceID; +end; + +function TBasePluginForm.getObject: TObject; +begin + Result := Self; +end; + +procedure TBasePluginForm.FreeObject; +begin + Self.Free; +end; + +procedure TBasePluginForm.setBeanConfig(pvBeanConfig: PAnsiChar); +begin + FBeanConfigStr :=String(AnsiString(pvBeanConfig)); +end; + +procedure TBasePluginForm.ShowAsChild(Parent: TWinControl); +begin + Self.BorderStyle := bsNone; + Self.Parent := Parent; + Self.Align := alClient; + self.Show; +end; + +function TBasePluginForm.showAsModal: Integer; +begin + Result := ShowModal(); +end; + +procedure TBasePluginForm.showAsNormal; +begin + Self.Show; +end; + +{ TBasePluginForm } +procedure TBasePluginForm.closeForm; +begin + Self.Close; +end; + +end. diff --git "a/samples/\346\240\207\345\207\206DLL\346\265\213\350\257\225/\350\257\264\346\230\216.txt" "b/samples/\346\240\207\345\207\206DLL\346\265\213\350\257\225/\350\257\264\346\230\216.txt" new file mode 100644 index 0000000000000000000000000000000000000000..dddbc02d527e3c7cdb4ab770b262c4e57afdf8f7 --- /dev/null +++ "b/samples/\346\240\207\345\207\206DLL\346\265\213\350\257\225/\350\257\264\346\230\216.txt" @@ -0,0 +1,4 @@ +±¾¹¤³ÌΪÁ˲âÊÔ Ò»Ð©¿Ø¼þÊÇ·ñÔÚDLLÓгåÍ» + +1. ¿ÉÒÔÔÚDLLForm.dprÖеĴ°ÌåÉÏ·ÅÖÃһЩ»³ÒɵĿؼþ£¬È»ºóµ¼³öÓñê×¼DLLµÄ·½·¨, +2. ÔÚEXE½øÐе÷Ó㬿´ÊÇ·ñÓÐÒì³£¡£ diff --git "a/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/BIN/CorePlugins/MyBeanSubscribe.dll" "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/BIN/CorePlugins/MyBeanSubscribe.dll" new file mode 100644 index 0000000000000000000000000000000000000000..7658d767add67163a8f6f501cb47f7299879927c Binary files /dev/null and "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/BIN/CorePlugins/MyBeanSubscribe.dll" differ diff --git "a/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/BIN/DebugPlugins/DEMOSubscriber.dll" "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/BIN/DebugPlugins/DEMOSubscriber.dll" new file mode 100644 index 0000000000000000000000000000000000000000..aada5e6d85415fedd1f28fe20a5d9d2f6cff1b08 Binary files /dev/null and "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/BIN/DebugPlugins/DEMOSubscriber.dll" differ diff --git "a/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/BIN/simpleConsole.exe" "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/BIN/simpleConsole.exe" new file mode 100644 index 0000000000000000000000000000000000000000..b39b242cffd1c272d308c256e75d0b538c136ae5 Binary files /dev/null and "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/BIN/simpleConsole.exe" differ diff --git "a/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/BIN/simpleConsole.history.ini" "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/BIN/simpleConsole.history.ini" new file mode 100644 index 0000000000000000000000000000000000000000..9995607133e893e218fdba059c4470ea1d821aa1 --- /dev/null +++ "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/BIN/simpleConsole.history.ini" @@ -0,0 +1,2 @@ +[main] +lastPluginID= diff --git "a/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/pgDesignMode.bdsgroup" "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/pgDesignMode.bdsgroup" new file mode 100644 index 0000000000000000000000000000000000000000..4c0c7883dadf8b48fa574bb00c39cc7cb551921f --- /dev/null +++ "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/pgDesignMode.bdsgroup" @@ -0,0 +1,19 @@ + + + + + + + + + + + plug-ins\Subscribe\MyBeanSubscribe.bdsproj + plug-ins\SimpleConsole\simpleConsole.bdsproj + plug-ins\SubscriberDEMOPlugins\DEMOSubscriber.bdsproj + MyBeanSubscribe.dll simpleConsole.exe DEMOSubscriber.dll + + + + diff --git "a/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/SimpleConsole/simpleConsole.bdsproj" "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/SimpleConsole/simpleConsole.bdsproj" new file mode 100644 index 0000000000000000000000000000000000000000..b9de3879cc4c3b9be9414eeec4a8b655d37a25e3 --- /dev/null +++ "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/SimpleConsole/simpleConsole.bdsproj" @@ -0,0 +1,278 @@ + + + + + + + + + + + + simpleConsole.dpr + + + 7.0 + + + 8 + 0 + 1 + 1 + 0 + 0 + 1 + 1 + 1 + 0 + 0 + 1 + 0 + 1 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 1 + 1 + 1 + True + True + WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; + + False + + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + False + False + False + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + + + + 0 + 0 + False + 1 + False + False + False + 16384 + 1048576 + 4194304 + + + + ..\..\BIN + + + + + + + + False + + + + + + False + + + True + False + + + False + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 2052 + 936 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + VCL for the Web 9.0 Design Package for CodeGear RAD Studio + Microsoft Office 2000 Sample Automation Server Wrapper Components + Microsoft Office XP Sample Automation Server Wrapper Components + File e:\workspace\delphi\vcl\dev14.2.2\devexpressvcl_14.2.2\library\rs11\bpl\dcldxpsteechartrs11.bpl not found + File e:\workspace\delphi\vcl\dev14.2.2\devexpressvcl_14.2.2\library\rs11\bpl\dcldxpsdbteechartrs11.bpl not found + ExpressLayout Control by Developer Express Inc. + ExpressMemData by Developer Express Inc. + ExpressNavBar by Developer Express Inc. + ExpressPrinting System by Developer Express Inc. + ExpressPrinting System Cross Platform Library by Developer Express Inc. + ExpressPrinting System Extended Cross Platform Library by Developer Express Inc. + ExpressPrinting System ReportLink for ExpressQuantumGrid by Developer Express Inc. + ExpressPrinting System ReportLink for ExpressLayoutControl by Developer Express Inc. + ExpressPrinting System ReportLink for ExpressPivotGrid by Developer Express Inc. + ExpressPrinting System ReportLink for ExpressScheduler by Developer Express Inc. + ExpressPrinting System ReportLink for ExpressSpreadSheet by Developer Express Inc. + ExpressPrinting System ReportLink for ExpressQuantumTreeList by Developer Express Inc. + ExpressPrinting System ReportLink for ExpressVerticalGrid by Developer Express Inc. + ExpressPrinting System ReportLinks for ExpressDBOrgChart by Developer Express Inc. + ExpressPrinting System ReportLink for ExpressDBTree by Developer Express Inc. + ExpressPrinting System ReportLinks for ExpressFlowChart by Developer Express Inc. + ExpressPrinting System ReportLinks for ExpressOrgChart by Developer Express Inc. + ExpressPrinting System ReportLinks (Standard) by Developer Express Inc. + ExpressPrinting System Advanced Preview Window by Developer Express Inc. + ExpressPrinting System Ribbon Preview Window by Developer Express Inc. + ExpressBars Ribbon controls by Developer Express Inc. + ExpressSkins Library by Developer Express Inc. + ExpressSkins Library Uses Clause Auto Fill Helper for ExpressEditors by Developer Express Inc. + ExpressSkins Library Uses Clause Auto Fill Helper by Developer Express Inc. + ExpressSkins Library Uses Clause Auto Fill Helper for PageControl Painter by Developer Express Inc. + ExpressSkins Library Painter for PageControl by Developer Express Inc. + ExpressSkins Library Uses Clause Auto Fill Helper for Scheduler Painter by Developer Express Inc. + ExpressSkins Library Painter for Scheduler by Developer Express Inc. + ExpressSkins Library Uses Clause Auto Fill Helper for Bars Painters by Developer Express Inc. + ExpressSkins Library Painter for Docking Library by Developer Express Inc. + ExpressSkins Library Painter for Bars by Developer Express Inc. + ExpressSkins Library Uses Clause Auto Fill Helper for NavBar Painter by Developer Express Inc. + ExpressSkins Library Painter for NavBar by Developer Express Inc. + ExpressSkins Library Uses Clause Auto Fill Helper for Ribbon Painters by Developer Express Inc. + ExpressSkins Library Painter for Ribbon by Developer Express Inc. + ExpressBars Tabbed MDI by Developer Express Inc. + ExpressPrinting System ContainerProducer for ExpressPageControl by Developer Express Inc. + ExpressSkins - Black Skin by Developer Express Inc. + ExpressSkins - Blueprint Skin by Developer Express Inc. + ExpressSkins - Blue Skin by Developer Express Inc. + ExpressSkins - Caramel Skin by Developer Express Inc. + ExpressSkins - Coffee Skin by Developer Express Inc. + ExpressSkins - Darkroom Skin by Developer Express Inc. + ExpressSkins - DarkSide Skin by Developer Express Inc. + ExpressSkins - DevExpressDarkStyle Skin by Developer Express Inc. + ExpressSkins - DevExpressStyle Skin by Developer Express Inc. + ExpressSkins - Foggy Skin by Developer Express Inc. + ExpressSkins - GlassOceans Skin by Developer Express Inc. + ExpressSkins - HighContrast Skin by Developer Express Inc. + ExpressSkins - iMaginary Skin by Developer Express Inc. + ExpressSkins - Lilian Skin by Developer Express Inc. + ExpressSkins - LiquidSky Skin by Developer Express Inc. + ExpressSkins - LondonLiquidSky Skin by Developer Express Inc. + ExpressSkins - McSkin Skin by Developer Express Inc. + ExpressSkins - MoneyTwins Skin by Developer Express Inc. + ExpressSkins - Office2007Black Skin by Developer Express Inc. + ExpressSkins - Office2007Blue Skin by Developer Express Inc. + ExpressSkins - Office2007Green Skin by Developer Express Inc. + ExpressSkins - Office2007Pink Skin by Developer Express Inc. + ExpressSkins - Office2007Silver Skin by Developer Express Inc. + ExpressSkins - Office2010Black Skin by Developer Express Inc. + ExpressSkins - Office2010Blue Skin by Developer Express Inc. + ExpressSkins - Office2010Silver Skin by Developer Express Inc. + ExpressSkins - Office2013White Skin by Developer Express Inc. + ExpressSkins - Pumpkin Skin by Developer Express Inc. + ExpressSkins - SevenClassic Skin by Developer Express Inc. + ExpressSkins - Seven Skin by Developer Express Inc. + ExpressSkins - SharpPlus Skin by Developer Express Inc. + ExpressSkins - Sharp Skin by Developer Express Inc. + ExpressSkins - Silver Skin by Developer Express Inc. + ExpressSkins - Springtime Skin by Developer Express Inc. + ExpressSkins - Stardust Skin by Developer Express Inc. + ExpressSkins - Summer2008 Skin by Developer Express Inc. + ExpressSkins - TheAsphaltWorld Skin by Developer Express Inc. + ExpressSkins - Valentine Skin by Developer Express Inc. + ExpressSkins - VS2010 Skin by Developer Express Inc. + ExpressSkins - Whiteprint Skin by Developer Express Inc. + ExpressSkins - Xmas2008Blue Skin by Developer Express Inc. + ExpressSkins - Metropolis Skin by Developer Express Inc. + ExpressSkins - MetropolisDark Skin by Developer Express Inc. + ExpressSkins - Office2013DarkGray Skin by Developer Express Inc. + ExpressSkins - Office2013LightGray Skin by Developer Express Inc. + ExpressQuantumGrid Wizard by Developer Express Inc. + ExpressScheduler Ribbon Event Window by Developer Express Inc. + Express Cross Platform Library Icon Library by Developer Express Inc. + ExpressWizardControl by Developer Express Inc. + ExpressQuantumGrid by Developer Express Inc. + ExpressBars Ribbon Customization Form by Developer Express Inc. + + + + diff --git "a/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/SimpleConsole/simpleConsole.cfg" "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/SimpleConsole/simpleConsole.cfg" new file mode 100644 index 0000000000000000000000000000000000000000..4a96ca714cb44ac105eff6350022f09ddf2285f0 --- /dev/null +++ "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/SimpleConsole/simpleConsole.cfg" @@ -0,0 +1,36 @@ +-$A8 +-$B- +-$C+ +-$D+ +-$E- +-$F- +-$G+ +-$H+ +-$I+ +-$J- +-$K- +-$L+ +-$M- +-$N+ +-$O+ +-$P+ +-$Q- +-$R- +-$S- +-$T- +-$U- +-$V+ +-$W- +-$X+ +-$YD +-$Z1 +-cg +-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; +-H+ +-W+ +-M +-$M16384,1048576 +-K$00400000 +-E"..\..\BIN" +-LE"C:\Users\Public\Documents\RAD Studio\5.0\Bpl" +-LN"C:\Users\Public\Documents\RAD Studio\5.0\Dcp" diff --git "a/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/SimpleConsole/simpleConsole.dpr" "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/SimpleConsole/simpleConsole.dpr" new file mode 100644 index 0000000000000000000000000000000000000000..1a76b2e08fe8a1d14ec3622c808d305e76e6b2ab --- /dev/null +++ "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/SimpleConsole/simpleConsole.dpr" @@ -0,0 +1,53 @@ +program simpleConsole; + +uses + FastMM4, + FastMM4Messages, + mybean.console, + Forms, + ufrmMain in 'ufrmMain.pas' {frmMain}, + uIDEMO in '..\common\uIDEMO.pas'; + +{$R *.res} + +begin + Application.Initialize; + try + // Ö±½Ó¼ÓÔØplug-insĿ¼ÏµÄDLL²å¼þ + ExecuteLoadLibFiles('CorePlugins\*.dll'); + ExecuteLoadLibFiles('CorePlugins\*.bpl'); + + // Ö±½Ó¼ÓÔØplug-insĿ¼ÏµÄDLL²å¼þ + ExecuteLoadLibFiles('demoPlugins\*.dll'); + + // Ö±½Ó¼ÓÔØplug-insĿ¼ÏµÄBPL²å¼þ + ExecuteLoadLibFiles('demoPlugins\*.bpl'); + + // Ö±½Ó¼ÓÔØplug-insĿ¼ÏµÄDLL²å¼þ + ExecuteLoadLibFiles('DebugPlugins\*.dll'); + + // Ö±½Ó¼ÓÔØplug-insĿ¼ÏµÄBPL²å¼þ + ExecuteLoadLibFiles('DebugPlugins\*.bpl'); + + + + // Ö±½Ó¼ÓÔØEXEµ±Ç°Ä¿Â¼ÏµÄDLL²å¼þ + // ÍÆ¼ö½«²å¼þ·Åµ½Í³Ò»Ä¿Â¼ÏÂÃæ½øÐмÓÔØ£¬±ÜÃâ¼ÓÔØµ½ÆäËû·ÇmybeanµÄ²å¼þ + ExecuteLoadLibFiles('*.dll'); + + // ¼ÓÔØconfigPluginsĿ¼ÏµIJå¼þÅäÖÃÎļþ(°´Ðè¼ÓÔØ) + ExecuteLoadBeanFromConfigFiles('configPlugins\*.plug-ins'); + + StartLibraryService; + + Application.MainFormOnTaskbar := True; + Application.CreateForm(TfrmMain, frmMain); + Application.Run; + finally + // ÊÍ·ÅÖ÷´°Ìå + Application.MainForm.Free; + + // ÇåÀíÊý¾Ý¹²ÏíÖÐÐĶÔÏó, ÊͷŲå¼þ, Ð¶ÔØDLL/BPl + ApplicationContextFinalize; + end; +end. diff --git "a/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/SimpleConsole/simpleConsole.history.ini" "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/SimpleConsole/simpleConsole.history.ini" new file mode 100644 index 0000000000000000000000000000000000000000..9995607133e893e218fdba059c4470ea1d821aa1 --- /dev/null +++ "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/SimpleConsole/simpleConsole.history.ini" @@ -0,0 +1,2 @@ +[main] +lastPluginID= diff --git "a/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/SimpleConsole/ufrmMain.dfm" "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/SimpleConsole/ufrmMain.dfm" new file mode 100644 index 0000000000000000000000000000000000000000..cd59dfd6a7ef7fca1b943c136e33a78face75bee --- /dev/null +++ "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/SimpleConsole/ufrmMain.dfm" @@ -0,0 +1,73 @@ +object frmMain: TfrmMain + Left = 0 + Top = 0 + BorderIcons = [biSystemMenu] + Caption = 'frmMain' + ClientHeight = 376 + ClientWidth = 901 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + OldCreateOrder = False + OnCreate = FormCreate + DesignSize = ( + 901 + 376) + PixelsPerInch = 96 + TextHeight = 13 + object Memo1: TMemo + Left = 8 + Top = 88 + Width = 885 + Height = 280 + Anchors = [akLeft, akTop, akRight, akBottom] + Lines.Strings = ( + #20027#31243#24207#38656#35201#22312#21152#36733#23436#25152#26377'DLL'#21518', '#25191#34892'StartLibraryService('#19968#33324'DLL'#21487#20197#22312#27492#22788#36827#34892#35746#38405')' + '' + + #26412#31383#20307#23454#29616#20102'ISubscribeListener'#25509#21475', '#20390#21548#20102'[tester]'#30340#35746#38405#28040#24687#65292#22914#26524#26377#23545'[tester]'#36827#34892#35746#38405#21644#21462#28040 + + #35746#38405#12290#35813#31383#20307#37117#20250#25910#21040#28040#24687 + #21487#20197#23545'[tester]'#30340#25152#26377#35746#38405#32773#21457#24067#28040#24687#12290) + TabOrder = 0 + ExplicitWidth = 640 + ExplicitHeight = 213 + end + object edtMsg: TEdit + Left = 8 + Top = 8 + Width = 169 + Height = 21 + TabOrder = 1 + Text = #20998#21457#28040#24687 + end + object btnDispatchMsg: TButton + Left = 200 + Top = 6 + Width = 113 + Height = 25 + Caption = 'btnDispatchMsg' + TabOrder = 2 + OnClick = btnDispatchMsgClick + end + object btnSubscribe: TButton + Left = 592 + Top = 8 + Width = 145 + Height = 25 + Caption = #26412#31383#20307#21521#35746#38405#32773#35746#38405 + TabOrder = 3 + OnClick = btnSubscribeClick + end + object btnRemoveSubscribe: TButton + Left = 592 + Top = 57 + Width = 145 + Height = 25 + Caption = #21462#28040#26412#31383#20307#30340#35746#38405 + TabOrder = 4 + OnClick = btnRemoveSubscribeClick + end +end diff --git "a/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/SimpleConsole/ufrmMain.pas" "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/SimpleConsole/ufrmMain.pas" new file mode 100644 index 0000000000000000000000000000000000000000..d6f5b02346a63cb5aaf86689e9d9568f86c0c8fe --- /dev/null +++ "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/SimpleConsole/ufrmMain.pas" @@ -0,0 +1,125 @@ +unit ufrmMain; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, mybean.tools.beanFactory, + mybean.core.intf, IniFiles, mybean.ex.designmode.intf, uIDEMO; + +type + TfrmMain = class(TForm, ISubscribeListener, IMessageDispatch) + Memo1: TMemo; + edtMsg: TEdit; + btnDispatchMsg: TButton; + btnSubscribe: TButton; + btnRemoveSubscribe: TButton; + procedure btnDispatchMsgClick(Sender: TObject); + procedure btnRemoveSubscribeClick(Sender: TObject); + procedure btnSubscribeClick(Sender: TObject); + procedure FormCreate(Sender: TObject); + private + { Private declarations } + FSubscriberID:Integer; + public + destructor Destroy; override; + + /// + /// Ìí¼ÓÁËÒ»¸ö¶©ÔÄÕß + /// + /// ¶©ÔÄÕßID + /// ¶©ÔÄÕß + procedure OnAddSubscriber(pvSubscriberID: Integer; const pvSubscriber: + IInterface); stdcall; + + /// + /// ÒÆ³ýÁËÒ»¸ö¶©ÔÄÕß + /// + /// ¶©ÔÄÕßID + procedure OnRemoveSubscriber(pvSubscriberID: Integer); stdcall; + + public + /// + /// ÊÕµ½·¢²¼Õß·¢²¼µÄÐÅÏ¢ + /// + procedure DispatchMsg(pvMsg:PAnsiChar); stdcall; + end; + +var + frmMain: TfrmMain; + +implementation + +uses + mybean.ex.designmode.utils; + +{$R *.dfm} + +procedure TfrmMain.FormCreate(Sender: TObject); +begin + + // Ïñtester¶©ÔÄÕߣ¬Ìí¼Ó¶©ÔÄÕìÌýÕß(ÓÃÓÚÕìÌý¶©ÔÄ/È¡Ïû¶©Ô͝×÷) + GetPublisher('tester').AddSubscribeListener(Self); + + +end; + +procedure TfrmMain.OnAddSubscriber(pvSubscriberID: Integer; + const pvSubscriber: IInterface); +begin + Memo1.Lines.Add(Format('Ôö¼ÓÁËÒ»¸ö¶©ÔÄÕß[%d]', [pvSubscriberID])); +end; + +procedure TfrmMain.OnRemoveSubscriber(pvSubscriberID: Integer); +begin + Memo1.Lines.Add(Format('ÒÆ³ýÁ˶©ÔÄÕß[%d]', [pvSubscriberID])); +end; + +destructor TfrmMain.Destroy; +begin + GetPublisher('tester').RemoveSubscribeListener(Self); + inherited; +end; + +procedure TfrmMain.DispatchMsg(pvMsg: PAnsiChar); +begin + Memo1.Lines.Add('½ÓÊܵ½·¢²¼Õß·¢²¼µÄÐÅÏ¢:' + pvMsg); +end; + +procedure TfrmMain.btnDispatchMsgClick(Sender: TObject); +var + lvPublisher:IPublisher; + lvIntf:IInterface; + lvDispatcher:IMessageDispatch; + i:Integer; + s:AnsiString; +begin + s := edtMsg.Text; + lvPublisher := GetPublisher('tester'); + for i := 0 to lvPublisher.GetSubscriberCount - 1 do + begin + lvPublisher.GetSubscriber(i, lvIntf); + if lvIntf.QueryInterface(IMessageDispatch, lvDispatcher) = S_OK then + begin + lvDispatcher.DispatchMsg(PAnsiChar(s)); + end; + end; + + s := ''; + + +end; + +procedure TfrmMain.btnRemoveSubscribeClick(Sender: TObject); +begin + GetPublisher('tester').RemoveSubscriber(FSubscriberID); + FSubscriberID := 0; +end; + +procedure TfrmMain.btnSubscribeClick(Sender: TObject); +begin + if FSubscriberID <> 0 then raise Exception.Create('ÒѾ­¶©ÔÄ'); + FSubscriberID := GetPublisher('tester').AddSubscriber(Self); +end; + +end. diff --git "a/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/Subscribe/MyBeanSubscribe.bdsproj" "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/Subscribe/MyBeanSubscribe.bdsproj" new file mode 100644 index 0000000000000000000000000000000000000000..cca8cff2c4ea237e947b8a2e08e6934dc5512751 --- /dev/null +++ "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/Subscribe/MyBeanSubscribe.bdsproj" @@ -0,0 +1,206 @@ + + + + + + + + + + + + MyBeanSubscribe.dpr + + + 7.0 + + + 8 + 0 + 1 + 1 + 0 + 0 + 1 + 1 + 1 + 0 + 0 + 1 + 0 + 1 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 1 + 1 + 1 + True + True + WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; + + False + + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + False + False + False + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + + + + 0 + 0 + False + 1 + False + False + False + 16384 + 1048576 + 4194304 + + + + E:\workspace\dcworkspace\GPSNet\plugins + + + + + vcl;rtl;vclx;vclactnband;dbrtl;vcldb;vcldbx;bdertl;dsnap;dsnapcon;teeUI;teedb;tee;adortl;vclib;ibxpress;dbxcds;dbexpress;DbxCommonDriver;IndyCore;IndySystem;IndyProtocols;xmlrtl;inet;IntrawebDB_90_100;Intraweb_90_100;VclSmp;vclie;websnap;webdsnap;inetdbbde;inetdbxpress;soaprtl;Python_d7;SPCommVCL;dxCoreRS11;cxLibraryRS11;dxGDIPlusRS11;dxThemeRS11;cxBarEditItemRS11;dxBarRS11;dxComnRS11;cxEditorsRS11;cxDataRS11;cxPivotGridRS11;cxExportRS11;dxmdsRS11;cxPivotGridChartRS11;cxGridRS11;cxPageControlRS11;cxSchedulerGridRS11;cxSchedulerRS11;cxSpreadSheetRS11;cxVerticalGridRS11;dxADOServerModeRS11;dxServerModeRS11;dxBarDBNavRS11;dxBarExtDBItemsRS11;dxBarExtItemsRS11;dxorgcRS11;dxdborRS11;dxdbtrRS11;dxDBXServerModeRS11;dxDockingRS11;dxFlowChartRS11;dxPSCoreRS11;dxPScxPivotGridLnkRS11;dxPScxCommonRS11;dxPSLnksRS11;dxPScxSchedulerLnkRS11;dxPScxSSLnkRS11;dxPScxTLLnkRS11;cxTreeListRS11;dxPScxVGridLnkRS11;dxPSdxDBTVLnkRS11;dxPSdxFCLnkRS11;dxPSdxOCLnkRS11;dxPsPrVwAdvRS11;dxPSPrVwRibbonRS11;dxRibbonRS11;dxSkinsCoreRS11;dxSkinscxPCPainterRS11;dxSkinscxSchedulerPainterRS11;dxSkinsdxDLPainterRS11;dxSkinsdxBarPainterRS11;dxSkinsdxNavBarPainterRS11;dxNavBarRS11;dxSkinsdxRibbonPainterRS11;dxSpellCheckerRS11;dxTabbedMDIRS11;dxtrmdRS11;dxPScxPCProdRS11;dxSkinBlackRS11;dxSkinBlueprintRS11;dxSkinBlueRS11;dxSkinCaramelRS11;dxSkinCoffeeRS11;dxSkinDarkRoomRS11;dxSkinDarkSideRS11;dxSkinDevExpressDarkStyleRS11;dxSkinDevExpressStyleRS11;dxSkinFoggyRS11;dxSkinGlassOceansRS11;dxSkinHighContrastRS11;dxSkiniMaginaryRS11;dxSkinLilianRS11;dxSkinLiquidSkyRS11;dxSkinLondonLiquidSkyRS11;dxSkinMcSkinRS11;dxSkinMoneyTwinsRS11;dxSkinOffice2007BlackRS11;dxSkinOffice2007BlueRS11;dxSkinOffice2007GreenRS11;dxSkinOffice2007PinkRS11;dxSkinOffice2007SilverRS11;dxSkinOffice2010BlackRS11;dxSkinOffice2010BlueRS11;dxSkinOffice2010SilverRS11;dxSkinOffice2013WhiteRS11;dxSkinPumpkinRS11;dxSkinSevenClassicRS11;dxSkinSevenRS11;dxSkinSharpRS11;dxSkinSilverRS11;dxSkinSpringTimeRS11;dxSkinStardustRS11;dxSkinSummer2008RS11;dxSkinTheAsphaltWorldRS11;dxSkinValentineRS11;dxSkinVS2010RS11;dxSkinWhiteprintRS11;dxSkinXmas2008BlueRS11;dxSkinMetropolisRS11;dxSkinMetropolisDarkRS11;dxSkinOffice2013DarkGrayRS11;dxSkinOffice2013LightGrayRS11;dxWizardControlRS11;cxSchedulerRibbonStyleEventEditorRS11;dxTileControlRS11;dxLayoutControlRS11 + DEBUG + + False + + + + E:\workspace\dcworkspace\GPSNet\GPSNet.exe + + False + + + True + False + + + False + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 2052 + 936 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + ExpressScheduler by Developer Express Inc. + Microsoft Office 2000 Sample Automation Server Wrapper Components + Microsoft Office XP Sample Automation Server Wrapper Components + ExpressEditors FieldLink by Developer Express Inc. + ExpressPageControl by Developer Express Inc. + ExpressPageControl dxBar Popup Menu by Developer Express Inc. + ExpressPivotGrid OLAP by Developer Express Inc. + ExpressScheduler tree browser by Developer Express Inc. + ExpressQuantumTreeList dxBar Built-In Menu by Developer Express Inc. + ExpressQuantumTreeList by Developer Express Inc. + File e:\workspace\delphi\vcl\dev14.2.2\devexpressvcl_14.2.2\library\rs11\bpl\dcldxpsteechartrs11.bpl not found + File e:\workspace\delphi\vcl\dev14.2.2\devexpressvcl_14.2.2\library\rs11\bpl\dcldxpsdbteechartrs11.bpl not found + ExpressLayout Control by Developer Express Inc. + ExpressMemData by Developer Express Inc. + ExpressNavBar by Developer Express Inc. + ExpressPrinting System Cross Platform Library by Developer Express Inc. + ExpressPrinting System Extended Cross Platform Library by Developer Express Inc. + ExpressPrinting System ReportLink for ExpressQuantumGrid by Developer Express Inc. + ExpressPrinting System ReportLink for ExpressLayoutControl by Developer Express Inc. + ExpressPrinting System ReportLinks for ExpressDBOrgChart by Developer Express Inc. + ExpressSkins - SharpPlus Skin by Developer Express Inc. + + + + diff --git "a/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/Subscribe/MyBeanSubscribe.cfg" "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/Subscribe/MyBeanSubscribe.cfg" new file mode 100644 index 0000000000000000000000000000000000000000..429e4184b8a128003479f67792d807224462fea0 --- /dev/null +++ "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/Subscribe/MyBeanSubscribe.cfg" @@ -0,0 +1,37 @@ +-$A8 +-$B- +-$C+ +-$D+ +-$E- +-$F- +-$G+ +-$H+ +-$I+ +-$J- +-$K- +-$L+ +-$M- +-$N+ +-$O+ +-$P+ +-$Q- +-$R- +-$S- +-$T- +-$U- +-$V+ +-$W- +-$X+ +-$YD +-$Z1 +-cg +-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; +-H+ +-W+ +-M +-$M16384,1048576 +-K$00400000 +-E"E:\workspace\dcworkspace\GPSNet\plugins" +-LE"C:\Users\Public\Documents\RAD Studio\5.0\Bpl" +-LN"C:\Users\Public\Documents\RAD Studio\5.0\Dcp" +-DDEBUG diff --git "a/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/Subscribe/MyBeanSubscribe.dpr" "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/Subscribe/MyBeanSubscribe.dpr" new file mode 100644 index 0000000000000000000000000000000000000000..efde4164c8fbca0f6d0d726562ffba8644a9ce2a --- /dev/null +++ "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/Subscribe/MyBeanSubscribe.dpr" @@ -0,0 +1,25 @@ +library MyBeanSubscribe; + +{ Important note about DLL memory management: ShareMem must be the + first unit in your library's USES clause AND your project's (select + Project-View Source) USES clause if your DLL exports any procedures or + functions that pass strings as parameters or function results. This + applies to all strings passed to and from your DLL--even those that + are nested in records and classes. ShareMem is the interface unit to + the BORLNDMM.DLL shared memory manager, which must be deployed along + with your DLL. To avoid using BORLNDMM.DLL, pass string information + using PChar or ShortString parameters. } + +uses + SysUtils, + Classes, + mybean.core.beanFactory, + dllmain in 'dllmain.pas', + MyBeanSubscribeImpl in 'MyBeanSubscribeImpl.pas', + PublisherImpl in 'PublisherImpl.pas'; + +{$R *.res} + +begin + beanFactory.RegisterBean('MyBeanSubscribeCenter', TMyBeanSubscribeImpl, True); +end. diff --git "a/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/Subscribe/MyBeanSubscribeImpl.pas" "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/Subscribe/MyBeanSubscribeImpl.pas" new file mode 100644 index 0000000000000000000000000000000000000000..ec437109996152bd9866be3eea96a0a1f70cc952 --- /dev/null +++ "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/Subscribe/MyBeanSubscribeImpl.pas" @@ -0,0 +1,90 @@ +unit MyBeanSubscribeImpl; + +interface + +uses + mybean.ex.designmode.intf, mybean.core.intf, utils.hashs, mybean.core.objects, PublisherImpl; + +type + TPublisherObject = class(TObject) + private + FID:MyBeanString; + FPublisher: IPublisher; + public + constructor Create(); + destructor Destroy; override; + end; + + TMyBeanSubscribeImpl = class(TMyBeanInterfacedObject, ISubscribeCenter) + private + FPublisherList:TDHashTableSafe; + public + constructor Create(); override; + destructor Destroy; override; + /// + /// ͨ¹ýID»ñȡһ¸ö·¢²¼Õß½Ó¿ÚʵÀý, Èç¹û¸ÃʵÀý²»´æÔÚÔò½øÐд´½¨¡£·ñÔòÖ±½Ó·µ»Ø + /// Ḭ̈߳²È«°æ±¾( + /// + /// + /// S_OK£º»ñÈ¡³É¹¦ + /// S_FALSE: »ñȡʧ°Ü + /// + /// ͬһ¸öID»ñÈ¡µÄ·¢²¼ÕßʵÀýÊÇÏàͬµÄ + /// ·µ»ØµÄ½Ó¿ÚʵÀý + function GetPublisher(pvID: PMyBeanChar; out vPubInstance: IPublisher): + HRESULT; stdcall; + end; + +implementation + +constructor TMyBeanSubscribeImpl.Create; +begin + inherited; + FPublisherList := TDHashTableSafe.Create(); + {$IFDEF DEBUG} + __DebugInstanceID := 'MyBeanSubscribe'; + {$ENDIF} +end; + +destructor TMyBeanSubscribeImpl.Destroy; +begin + FPublisherList.FreeAllDataAsObject; + FPublisherList.Free; + inherited; +end; + +function TMyBeanSubscribeImpl.GetPublisher(pvID: PMyBeanChar; out vPubInstance: + IPublisher): HRESULT; +var + lvObj:TPublisherObject; +begin + FPublisherList.Lock; + lvObj := TPublisherObject(FPublisherList.ValueMap[pvID]); + if lvObj = nil then + begin + lvObj := TPublisherObject.Create; + FPublisherList.ValueMap[pvID] := lvObj; + end; + vPubInstance := lvObj.FPublisher; + FPublisherList.unLock; + Result := S_OK; +end; + +{ TPublisherObject } + +constructor TPublisherObject.Create; +begin + inherited Create; + FPublisher := TPublisherImpl.Create; +end; + +destructor TPublisherObject.Destroy; +begin + try + FPublisher := nil; + except + end; + inherited; +end; + +end. diff --git "a/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/Subscribe/PublisherImpl.pas" "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/Subscribe/PublisherImpl.pas" new file mode 100644 index 0000000000000000000000000000000000000000..451ee182a913413e0ac30e538357c34917fb4afa --- /dev/null +++ "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/Subscribe/PublisherImpl.pas" @@ -0,0 +1,285 @@ +unit PublisherImpl; + + +interface + +uses + mybean.ex.designmode.intf, mybean.core.objects, Classes, SyncObjs; + +type + TPublisherImpl = class(TMyBeanInterfacedObject, IPublisher) + private + { Private declarations } + FSubscribers: TList; + FListeners:IInterfaceList; + FSubscriberDNA: Integer; + FLocker: TCriticalSection; + procedure Clear; + function FindSubscriber(pvSubscriberID: Integer): Integer; + public + constructor Create; override; + + destructor Destroy; override; + + + + + /// + /// ×¢²áÒ»¸öÕìÌýÕßµ½·¢²¼ÕßʵÀýÖÐ + /// + /// + /// ·µ»ØÒ»¸öID,ÒÆ³ýʱͨ¹ý¸ÃID½øÐÐÒÆ³ý, ×¢²áʧ°Ü·µ»Ø-1 + /// + /// (IInterface) + function AddSubscriber(const pvSubscriber: IInterface): Integer; stdcall; + + /// + /// ´Ó·¢²¼ÕßÖÐÒÆ³ýµôÒ»¸öÕìÌýÕß + /// + /// + /// ³É¹¦·µ»ØTrue, ʧ°Ü·µ»Ø:False + /// + /// ¶©ÔÄÕßID(Ìí¼Óʱ·µ»ØµÄID) + function RemoveSubscriber(pvSubscriberID: Integer): HRESULT; stdcall; + + + /// + /// »ñÈ¡¶©ÔÄÕßÊýÁ¿ + /// + /// + /// ¸öÊý + /// + function GetSubscriberCount: Integer; stdcall; + + + /// + /// »ñÈ¡ÆäÖеÄÒ»¸ö¶©ÔÄÕß + /// + /// + /// S_OK,»ñÈ¡³É¹¦ + /// + /// ÐòºÅ + /// ·µ»ØµÄ¶©ÔÄÕß + function GetSubscriber(pvIndex: Integer; out vSubscribeInstance: IInterface): + HRESULT; stdcall; + + + /// + /// Ìí¼ÓÁËÒ»¸ö¶©ÔÄÕìÌýÕß + /// Ìí¼Ó»òÕßÒÆ³ý¶©ÔÄÕßʱ½øÐÐ֪ͨ + /// + /// + /// S_OK: ³É¹¦ + /// + /// ¶©ÔÄÕìÌýÕß + function AddSubscribeListener(const pvInstance: ISubscribeListener): HRESULT; + stdcall; + + /// + /// ÒÆ³ýÒ»¸ö¶©ÔÄÕìÌýÕß + /// + /// S_OK: ³É¹¦ + /// + /// (ISubscribeListener) + function RemoveSubscribeListener(const pvInstance: ISubscribeListener): + HRESULT; stdcall; + + end; + +implementation + + +type + TInterfaceItem = class(TObject) + private + FInstance:IInterface; + FID:Integer; + public + destructor Destroy; override; + end; + + +function TPublisherImpl.AddSubscribeListener( + const pvInstance: ISubscribeListener): HRESULT; +var + i:Integer; + lvObj:TInterfaceItem; +begin + FLocker.Enter; + try + FListeners.Add(pvInstance); + Result := S_OK; + + try + for i := 0 to FSubscribers.Count - 1 do + begin + lvObj := TInterfaceItem(FSubscribers[i]); + pvInstance.OnAddSubscriber(lvObj.FID, lvObj.FInstance); + end; + except + end; + finally + FLocker.Leave; + end; + +end; + +function TPublisherImpl.AddSubscriber(const pvSubscriber: IInterface): Integer; +var + lvObj:TInterfaceItem; + i: Integer; + lvListener:ISubscribeListener; +begin + FLocker.Enter; + try + FSubscriberDNA := FSubscriberDNA + 1; + Result := FSubscriberDNA; + lvObj := TInterfaceItem.Create; + lvObj.FInstance := pvSubscriber; + lvObj.FID := Result; + FSubscribers.Add(lvObj); + for i := 0 to FListeners.Count - 1 do + begin + if FListeners[i].QueryInterface(ISubscribeListener, lvListener) = S_OK then + begin + lvListener.OnAddSubscriber(Result, pvSubscriber); + end; + end; + finally + FLocker.Leave; + end; + +end; + +procedure TPublisherImpl.Clear; +var + I: Integer; +begin + for I := 0 to FSubscribers.Count - 1 do + begin + try + TObject(FSubscribers[i]).Free; + except + end; + end; + FSubscribers.Clear; + + FListeners.Clear; +end; + +constructor TPublisherImpl.Create; +begin + inherited; + FSubscribers:= TList.Create; + FListeners := TInterfaceList.Create; + FSubscriberDNA := 0; + FLocker := TCriticalSection.Create; + + {$IFDEF DEBUG} + __DebugInstanceID := 'Publisher'; + {$ENDIF} +end; + +destructor TPublisherImpl.Destroy; +begin + Clear(); + FSubscribers.Free; + FListeners := nil; + FLocker.Free; + inherited; +end; + +function TPublisherImpl.FindSubscriber(pvSubscriberID: Integer): Integer; +var + I: Integer; + lvObj:TInterfaceItem; +begin + Result := -1; + for I := 0 to FSubscribers.Count - 1 do + begin + lvObj := TInterfaceItem(FSubscribers[i]); + if lvObj.FID = pvSubScriberID then + begin + Result := i; + Break; + end; + end; +end; + +function TPublisherImpl.GetSubscriber(pvIndex: Integer; + out vSubscribeInstance: IInterface): HRESULT; +begin + FLocker.Enter; + try + if (pvIndex <=0) and (pvIndex >= FSubscribers.Count) then + begin + Result := S_FALSE; + Exit; + end; + vSubscribeInstance := TInterfaceItem(FSubscribers[pvIndex]).FInstance; + Result := S_OK; + finally + FLocker.Leave; + end; +end; + +function TPublisherImpl.GetSubscriberCount: Integer; +begin + FLocker.Enter; + Result := FSubscribers.Count; + FLocker.Leave; +end; + +function TPublisherImpl.RemoveSubscribeListener( + const pvInstance: ISubscribeListener): HRESULT; +begin + FLocker.Enter; + FListeners.Remove(pvInstance); + Result := S_OK; + FLocker.Leave; +end; + +function TPublisherImpl.RemoveSubscriber(pvSubscriberID: Integer): HRESULT; +var + lvIndex:Integer; + i:Integer; + lvListener:ISubscribeListener; +begin + FLocker.Enter; + try + lvIndex := FindSubscriber(pvSubscriberID); + if lvIndex <> -1 then + begin + TObject(FSubscribers[lvIndex]).Free; + FSubscribers.Delete(lvIndex); + + for i := 0 to FListeners.Count - 1 do + begin + if FListeners[i].QueryInterface(ISubscribeListener, lvListener) = S_OK then + begin + lvListener.OnRemoveSubscriber(pvSubscriberID); + end; + end; + Result := S_OK; + end else + begin + Result := S_FALSE; + end; + finally + FLocker.Leave; + end; + +end; + +{ TInterfaceItem } + +destructor TInterfaceItem.Destroy; +begin + try + FInstance := nil; + except + end; + inherited; +end; + +end. diff --git "a/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/Subscribe/dllmain.pas" "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/Subscribe/dllmain.pas" new file mode 100644 index 0000000000000000000000000000000000000000..4c5eb786371f622d44915a3553e770a6a8295238 --- /dev/null +++ "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/Subscribe/dllmain.pas" @@ -0,0 +1,26 @@ +unit dllmain; + +interface + +type + PInterface = ^IInterface; + TGetInterfaceFunctionForStdcall = function(pvIntf:PInterface):HRESULT; stdcall; + +/// +/// ·¢ÉúÔÚDLLÒѾ­È«²¿¼ÓÔØÍê³É, ×¼±¸Æô¶¯Ó¦ÓóÌÐòµÄʱºò, ÐèÒªÔÚEXEÖÐÖ´ÐÐmybean.consoleµ¥ÔªÖеÄStartLibraryServiceº¯Êý +/// +procedure StartLibraryService; stdcall; + +implementation + +procedure StartLibraryService; stdcall; +begin + +end; + +exports + StartLibraryService; + + + +end. diff --git "a/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/SubscriberDEMOPlugins/DEMOSubscriber.bdsproj" "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/SubscriberDEMOPlugins/DEMOSubscriber.bdsproj" new file mode 100644 index 0000000000000000000000000000000000000000..e0af42dae00a43bea895f832a2332ec371e0a4f2 --- /dev/null +++ "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/SubscriberDEMOPlugins/DEMOSubscriber.bdsproj" @@ -0,0 +1,278 @@ + + + + + + + + + + + + DEMOSubscriber.dpr + + + 7.0 + + + 8 + 0 + 1 + 1 + 0 + 0 + 1 + 1 + 1 + 0 + 0 + 1 + 0 + 1 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 1 + 1 + 1 + True + True + WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; + + False + + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + False + False + False + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + + + + 0 + 0 + False + 1 + False + False + False + 16384 + 1048576 + 4194304 + + + + ..\..\BIN\DebugPlugins + + + + + + + + False + + + + ..\..\BIN\simpleConsole.exe + + False + + + True + False + + + False + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 2052 + 936 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + VCL for the Web 9.0 Design Package for CodeGear RAD Studio + Microsoft Office 2000 Sample Automation Server Wrapper Components + Microsoft Office XP Sample Automation Server Wrapper Components + File e:\workspace\delphi\vcl\dev14.2.2\devexpressvcl_14.2.2\library\rs11\bpl\dcldxpsteechartrs11.bpl not found + File e:\workspace\delphi\vcl\dev14.2.2\devexpressvcl_14.2.2\library\rs11\bpl\dcldxpsdbteechartrs11.bpl not found + ExpressLayout Control by Developer Express Inc. + ExpressMemData by Developer Express Inc. + ExpressNavBar by Developer Express Inc. + ExpressPrinting System by Developer Express Inc. + ExpressPrinting System Cross Platform Library by Developer Express Inc. + ExpressPrinting System Extended Cross Platform Library by Developer Express Inc. + ExpressPrinting System ReportLink for ExpressQuantumGrid by Developer Express Inc. + ExpressPrinting System ReportLink for ExpressLayoutControl by Developer Express Inc. + ExpressPrinting System ReportLink for ExpressPivotGrid by Developer Express Inc. + ExpressPrinting System ReportLink for ExpressScheduler by Developer Express Inc. + ExpressPrinting System ReportLink for ExpressSpreadSheet by Developer Express Inc. + ExpressPrinting System ReportLink for ExpressQuantumTreeList by Developer Express Inc. + ExpressPrinting System ReportLink for ExpressVerticalGrid by Developer Express Inc. + ExpressPrinting System ReportLinks for ExpressDBOrgChart by Developer Express Inc. + ExpressPrinting System ReportLink for ExpressDBTree by Developer Express Inc. + ExpressPrinting System ReportLinks for ExpressFlowChart by Developer Express Inc. + ExpressPrinting System ReportLinks for ExpressOrgChart by Developer Express Inc. + ExpressPrinting System ReportLinks (Standard) by Developer Express Inc. + ExpressPrinting System Advanced Preview Window by Developer Express Inc. + ExpressPrinting System Ribbon Preview Window by Developer Express Inc. + ExpressBars Ribbon controls by Developer Express Inc. + ExpressSkins Library by Developer Express Inc. + ExpressSkins Library Uses Clause Auto Fill Helper for ExpressEditors by Developer Express Inc. + ExpressSkins Library Uses Clause Auto Fill Helper by Developer Express Inc. + ExpressSkins Library Uses Clause Auto Fill Helper for PageControl Painter by Developer Express Inc. + ExpressSkins Library Painter for PageControl by Developer Express Inc. + ExpressSkins Library Uses Clause Auto Fill Helper for Scheduler Painter by Developer Express Inc. + ExpressSkins Library Painter for Scheduler by Developer Express Inc. + ExpressSkins Library Uses Clause Auto Fill Helper for Bars Painters by Developer Express Inc. + ExpressSkins Library Painter for Docking Library by Developer Express Inc. + ExpressSkins Library Painter for Bars by Developer Express Inc. + ExpressSkins Library Uses Clause Auto Fill Helper for NavBar Painter by Developer Express Inc. + ExpressSkins Library Painter for NavBar by Developer Express Inc. + ExpressSkins Library Uses Clause Auto Fill Helper for Ribbon Painters by Developer Express Inc. + ExpressSkins Library Painter for Ribbon by Developer Express Inc. + ExpressBars Tabbed MDI by Developer Express Inc. + ExpressPrinting System ContainerProducer for ExpressPageControl by Developer Express Inc. + ExpressSkins - Black Skin by Developer Express Inc. + ExpressSkins - Blueprint Skin by Developer Express Inc. + ExpressSkins - Blue Skin by Developer Express Inc. + ExpressSkins - Caramel Skin by Developer Express Inc. + ExpressSkins - Coffee Skin by Developer Express Inc. + ExpressSkins - Darkroom Skin by Developer Express Inc. + ExpressSkins - DarkSide Skin by Developer Express Inc. + ExpressSkins - DevExpressDarkStyle Skin by Developer Express Inc. + ExpressSkins - DevExpressStyle Skin by Developer Express Inc. + ExpressSkins - Foggy Skin by Developer Express Inc. + ExpressSkins - GlassOceans Skin by Developer Express Inc. + ExpressSkins - HighContrast Skin by Developer Express Inc. + ExpressSkins - iMaginary Skin by Developer Express Inc. + ExpressSkins - Lilian Skin by Developer Express Inc. + ExpressSkins - LiquidSky Skin by Developer Express Inc. + ExpressSkins - LondonLiquidSky Skin by Developer Express Inc. + ExpressSkins - McSkin Skin by Developer Express Inc. + ExpressSkins - MoneyTwins Skin by Developer Express Inc. + ExpressSkins - Office2007Black Skin by Developer Express Inc. + ExpressSkins - Office2007Blue Skin by Developer Express Inc. + ExpressSkins - Office2007Green Skin by Developer Express Inc. + ExpressSkins - Office2007Pink Skin by Developer Express Inc. + ExpressSkins - Office2007Silver Skin by Developer Express Inc. + ExpressSkins - Office2010Black Skin by Developer Express Inc. + ExpressSkins - Office2010Blue Skin by Developer Express Inc. + ExpressSkins - Office2010Silver Skin by Developer Express Inc. + ExpressSkins - Office2013White Skin by Developer Express Inc. + ExpressSkins - Pumpkin Skin by Developer Express Inc. + ExpressSkins - SevenClassic Skin by Developer Express Inc. + ExpressSkins - Seven Skin by Developer Express Inc. + ExpressSkins - SharpPlus Skin by Developer Express Inc. + ExpressSkins - Sharp Skin by Developer Express Inc. + ExpressSkins - Silver Skin by Developer Express Inc. + ExpressSkins - Springtime Skin by Developer Express Inc. + ExpressSkins - Stardust Skin by Developer Express Inc. + ExpressSkins - Summer2008 Skin by Developer Express Inc. + ExpressSkins - TheAsphaltWorld Skin by Developer Express Inc. + ExpressSkins - Valentine Skin by Developer Express Inc. + ExpressSkins - VS2010 Skin by Developer Express Inc. + ExpressSkins - Whiteprint Skin by Developer Express Inc. + ExpressSkins - Xmas2008Blue Skin by Developer Express Inc. + ExpressSkins - Metropolis Skin by Developer Express Inc. + ExpressSkins - MetropolisDark Skin by Developer Express Inc. + ExpressSkins - Office2013DarkGray Skin by Developer Express Inc. + ExpressSkins - Office2013LightGray Skin by Developer Express Inc. + ExpressQuantumGrid Wizard by Developer Express Inc. + ExpressScheduler Ribbon Event Window by Developer Express Inc. + Express Cross Platform Library Icon Library by Developer Express Inc. + ExpressWizardControl by Developer Express Inc. + ExpressQuantumGrid by Developer Express Inc. + ExpressBars Ribbon Customization Form by Developer Express Inc. + + + + diff --git "a/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/SubscriberDEMOPlugins/DEMOSubscriber.cfg" "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/SubscriberDEMOPlugins/DEMOSubscriber.cfg" new file mode 100644 index 0000000000000000000000000000000000000000..08e8f0fb700525f53e6cdc494b746d1ec5bbf36e --- /dev/null +++ "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/SubscriberDEMOPlugins/DEMOSubscriber.cfg" @@ -0,0 +1,36 @@ +-$A8 +-$B- +-$C+ +-$D+ +-$E- +-$F- +-$G+ +-$H+ +-$I+ +-$J- +-$K- +-$L+ +-$M- +-$N+ +-$O+ +-$P+ +-$Q- +-$R- +-$S- +-$T- +-$U- +-$V+ +-$W- +-$X+ +-$YD +-$Z1 +-cg +-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; +-H+ +-W+ +-M +-$M16384,1048576 +-K$00400000 +-E"..\..\BIN\DebugPlugins" +-LE"C:\Users\Public\Documents\RAD Studio\5.0\Bpl" +-LN"C:\Users\Public\Documents\RAD Studio\5.0\Dcp" diff --git "a/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/SubscriberDEMOPlugins/DEMOSubscriber.dpr" "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/SubscriberDEMOPlugins/DEMOSubscriber.dpr" new file mode 100644 index 0000000000000000000000000000000000000000..581ab73308992dca68a4035717da6c7999f8af1a --- /dev/null +++ "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/SubscriberDEMOPlugins/DEMOSubscriber.dpr" @@ -0,0 +1,24 @@ +library DEMOSubscriber; + +{ Important note about DLL memory management: ShareMem must be the + first unit in your library's USES clause AND your project's (select + Project-View Source) USES clause if your DLL exports any procedures or + functions that pass strings as parameters or function results. This + applies to all strings passed to and from your DLL--even those that + are nested in records and classes. ShareMem is the interface unit to + the BORLNDMM.DLL shared memory manager, which must be deployed along + with your DLL. To avoid using BORLNDMM.DLL, pass string information + using PChar or ShortString parameters. } + +uses + SysUtils, + Classes, + mybean.core.beanFactory, + dllmain in 'dllmain.pas', + uDEMOImpl in 'uDEMOImpl.pas', + uIDEMO in '..\common\uIDEMO.pas'; + +{$R *.res} + +begin +end. diff --git "a/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/SubscriberDEMOPlugins/dllmain.pas" "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/SubscriberDEMOPlugins/dllmain.pas" new file mode 100644 index 0000000000000000000000000000000000000000..c57b99d983baf5445191f78e6e748632f9338935 --- /dev/null +++ "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/SubscriberDEMOPlugins/dllmain.pas" @@ -0,0 +1,34 @@ +unit dllmain; + +interface + +uses + mybean.ex.designmode.utils; + +type + PInterface = ^IInterface; + TGetInterfaceFunctionForStdcall = function(pvIntf:PInterface):HRESULT; stdcall; + +/// +/// ·¢ÉúÔÚDLLÒѾ­È«²¿¼ÓÔØÍê³É, ×¼±¸Æô¶¯Ó¦ÓóÌÐòµÄʱºò, +/// ÐèÒªÔÚEXEÖÐÖ´ÐÐmybean.consoleµ¥ÔªÖеÄStartLibraryServiceº¯Êý +/// +procedure StartLibraryService; stdcall; + +implementation + +uses + uDEMOImpl; + +procedure StartLibraryService; stdcall; +begin + // ¶ÔtesterʵÐж©ÔÄ + GetPublisher('tester').AddSubscriber(TDEMOSubscriber.Create); +end; + +exports + StartLibraryService; + + + +end. diff --git "a/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/SubscriberDEMOPlugins/uDEMOImpl.pas" "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/SubscriberDEMOPlugins/uDEMOImpl.pas" new file mode 100644 index 0000000000000000000000000000000000000000..97504ca1b930b8397a55d3ce5edac195f163004a --- /dev/null +++ "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/SubscriberDEMOPlugins/uDEMOImpl.pas" @@ -0,0 +1,26 @@ +unit uDEMOImpl; + +interface + +uses + mybean.core.objects, uIDEMO; + +type + TDEMOSubscriber = class(TMyBeanInterfacedObject, IMessageDispatch) + public + procedure DispatchMsg(pvMsg:PAnsiChar); stdcall; + end; + +implementation + +uses + Dialogs; + +{ TDEMOSubscriber } + +procedure TDEMOSubscriber.DispatchMsg(pvMsg: PAnsiChar); +begin + ShowMessage('TDEMOSubscriberÊÕµ½Ò»¸öÐÅÏ¢:' + pvMsg); +end; + +end. diff --git "a/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/common/uIDEMO.pas" "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/common/uIDEMO.pas" new file mode 100644 index 0000000000000000000000000000000000000000..20c5b9d9ed4e59ee46f6d540d5d34298b612986c --- /dev/null +++ "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/plug-ins/common/uIDEMO.pas" @@ -0,0 +1,15 @@ +unit uIDEMO; + +interface + + + +type + IMessageDispatch = interface(IInterface) + ['{9CB41C8C-8362-40A5-8509-0B8D38D8D20A}'] + procedure DispatchMsg(pvMsg:PAnsiChar); stdcall; + end; + +implementation + +end. diff --git "a/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/readme.txt" "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/readme.txt" new file mode 100644 index 0000000000000000000000000000000000000000..6ded61ddc31d0f4fd2f717ebd3f8a207b582f7f2 --- /dev/null +++ "b/samples/\350\256\276\350\256\241\346\250\241\345\274\217\346\217\222\344\273\266/readme.txt" @@ -0,0 +1,12 @@ +˵Ã÷±¾DEMOÓÉD2007±àÒ룬ÆäËûIDE£¬ÇëÊʵ±½øÐе÷Õû(¿ÉÒÔɾ³ýdprÒÔÍâµÄÆäËû¹¤³ÌÎļþ£¬È»ºóÖØÐÂÅäÖÃ) + + +·¾¶ÉèÖà + +Êä³ö·¾¶: + ..\..\BIN\CorePlugins + ..\..\BIN\DebugPlugins + + ++ ¶©ÔÄÕßģʽ + diff --git "a/\350\265\236\345\212\251\345\220\215\345\215\225.txt" "b/\350\265\236\345\212\251\345\220\215\345\215\225.txt" index 380de5b75da98a70559c3765fb34c2a040c65dc1..ec2115a1a6c17bc4e6f2c8e4810f6ccce867c6ea 100644 --- "a/\350\265\236\345\212\251\345\220\215\345\215\225.txt" +++ "b/\350\265\236\345\212\251\345\220\215\345\215\225.txt" @@ -1,2 +1,6 @@ ¸Ðл [Ö麣]-â¹û(1939331207) ¶ÔMyBeanµÄÔÞÖú 2015-01-26 19:49:31 -¸Ðл [ÄÏÄþ]ÎʵÀXE 215761292 ¶Ô mybeanµÄÔÞÖú 2015-02-02 13:36:30 \ No newline at end of file +¸Ðл [ÄÏÄþ]ÎʵÀXE 215761292 ¶Ô mybeanµÄÔÞÖú 2015-02-02 13:36:30 +¸Ðл ºÀ½ÜµÄ°Ö°Ö 12919184 ¶Ô mybeanµÄÔÞÖú 2015-04-14 +¸Ðл [ÏæÎ÷]-ÍÁ·Ë 18207559071 ¶Ô mybeanµÄÔÞÖú 2015-05-27 +¸Ðл [¶«Ý¸]Hi 82611904 ¶Ô mybeanµÄÔÞÖú 2015-05-28 +¸Ðл ÀÏÅ£ 124754480 ¶Ô mybeanµÄÔÞÖú 2015-06-08 \ No newline at end of file