亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? ole.html

?? windows系統(tǒng)編程 一本很好的書(shū)!值得看哦!
?? HTML
字號(hào):
<html>
<head>
<title> OLE </title>
<meta  name="description" content="OLE in C++">
<meta name="keywords" content="ole, interfaces, reliable, software, cplusplus, source code, example, windows, tutorial, object oriented, programming">
</head>

<body background="../images/grid.gif" bgcolor="white" text="black">
<script language="JAVASCRIPT">
<!--
if (navigator.onLine){
document.write("<!-- Spidersoft WebZIP Ad Banner Insert -->");
document.write("<TABLE width=100% border=0 cellpadding=0 cellspacing=0>");
document.write("<TR>");
document.write("<TD>");
document.write("<ILAYER id=ad1 visibility=hidden height=60></ILAYER>");
document.write("<NOLAYER>");
document.write("<IFRAME SRC='http://www.spidersoft.com/ads/bwz468_60.htm' width=100% height=60 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no></IFRAME>");
document.write("</NOLAYER>");
document.write("</TD>");
document.write("</TR>");
document.write("</TABLE>");
document.write("<!-- End of Spidersoft WebZIP Ad Banner Insert-->");
}
 //-->
</script>

<!--Home button and Title-->
<table cellpadding=10 width="100%">
	<tr>
	<td width=100 align=center valign=middle>
	<a href="../index.htm">
	<img src="../images/rsbullet.gif" alt="RS" border=0 width=39 height=39>
	<br>Home</a>
	<td>
	<font face="arial" color="#009966">
		<center><i>
		<b><font size="+3">Rationalizing OLE</font></b>

			<p align=center><font size="+1">Building <b>smart</b> OLE on top of, you know, the <b>other</b> OLE.</font>
		</i></center>
	</font>
</table>

<table width="100%"><!-- main table -->
<tr>
   <td width=10> <!-- Left margin -->
   <td> <!-- Middle column, there is also the right margin at the end -->

   <table cellpadding=10 cellspacing=0 width="100%">
   <tr>
   <td bgcolor=white>
<hr><!--Text-->
<font size="+1"><b>First of all, you have to tell the world</b></font> that you're going to use OLE. Here's a little class that will do it for you. Just embed an object of this class in some high-level object that's constructed before you do anything with OLE and destroyed after you're done with OLE. In a Windows program, the Controller is a perfect host for <i>UseOle</i>.

<hr><!--End Text-->
         <!--Yellow background-->
        <table cellpadding=10 cellspacing=0 width="100%">
                <tr>
                      <td width=20>
            	      <td bgcolor="#e0e080">
<pre><font face="courier"><!--Code-->class <font color="#cc0066"><b>UseOle</b></font>
{
public:
    UseOle () { OleInitialize (0); }
    ~UseOle () { OleUninitialize (); }
};

class <font color="#cc0066"><b>Controller</b></font>
{
public:
    Controller(HWND hwnd, CREATESTRUCT * pCreate);
    ~Controller() { PostQuitMessage(0); }
    void Paint (HWND hwnd);
private:
    <b>UseOle</b> useOle;
};</font></pre><!--End Code-->
                       <td width=20>
        </table>
        <!--End of yellow background-->
<hr><!--Text-->
Next, you need to create an <i><b>OLE object</b></i> that is the provider of interfaces. The abstract base class <i>CoObject</i> declares the method <i>AcquireInterface</i>. The actual class <i>SObject</i> (smart object) provides one particular implementation of <i>CoObject</i> that uses, internally, OLE's infamous <i>IUnknown</i>.
<hr><!--End Text-->

         <!--Yellow background-->
        <table cellpadding=10 cellspacing=0 width="100%">
                <tr>
                      <td width=20>
            	      <td bgcolor="#e0e080">
<pre><font face="courier"><!--Code-->class <font color="#cc0066"><b>CoObject</b></font>
{
public:
    virtual void * AcquireInterface (IID const &amp; iid) = 0;
};

class <font color="#cc0066"><b>SObject</b></font>: public <font color="#cc0066"><b>CoObject</b></font>
{
public:
    SObject (CLSID const &amp; classId, bool running = false);
    ~SObject ()
    {
        if (_iUnk)
            _iUnk-&gt;<font color="#000099"><b>Release</b></font> ();
    }
    void * AcquireInterface (IID const &amp; iid);

private:
    <font color="#009966">IUnknown</font> * _iUnk;
};</font></pre><!--End Code-->
                       <td width=20>
        </table>
        <!--End of yellow background-->
<hr><!--Text-->
Let's have a look at the implementation of the constructor and the <i>AcquireInterface</i> method.
<p>The constructor gets hold of the object by calling the API <i>GetActiveObject</i> and/or <i>CoCreateInstance</i>. The difference between the two is that <i>GetActiveObject</i> will try to get hold of an <b>already running</b> object, whereas <i>CoCreateInstance</i> will try the same, but if it fails, it'll start whatever <i>exe</i> is necessary for this object to run. Some objects actually specify a preference: they want a new server to be started every time <i>CoCreateInstance</i> is called. <i>GetActiveObject</i> lets you bypass that.
<p>Notice that this is just one example how you get hold of an OLE object. You may want to play with some of the parameters--for instance, I am passing <i>CLSCTX_SERVER</i> as an argument to <i>CoCreateInstance</i>. That will make sure that the object will live in a separate process from the client. In many cases you'd rather have the object as an inproc server--a DLL that is loaded into the client's address space. For more details, look up <i>CoCreateInstance</i> in your friendly <i>help</i>.
<hr><!--End Text-->
         <!--Yellow background-->
        <table cellpadding=10 cellspacing=0 width="100%">
                <tr>
                      <td width=20>
            	      <td bgcolor="#e0e080">
<pre><font face="courier"><!--Code--><font color="#cc0066"><b>SObject::SObject</b></font> (<font color="#009966">CLSID</font> const &amp; classId, bool running)
    :_iUnk (0)
{
    <font color="#009966">HRESULT</font> hr = <font color="#009966">S_OK</font>;
    if (running)
    {
        ::<font color="#000099"><b>GetActiveObject</b></font> (classId, 0, &amp; _iUnk);
    }
    if (_iUnk == 0)
    {
        hr = ::<font color="#000099"><b>CoCreateInstance</b></font> (
                   classId,
                   0,
                   <font color="#009966">CLSCTX_SERVER</font>,
                   <font color="#009966">IID_IUnknown</font>,
                   (void**)&amp; _iUnk);
    }
    if (FAILED (hr))
        throw HEx (hr, "Couldn't create instance");
}</font></pre><!--End Code-->
                       <td width=20>
        </table>
        <!--End of yellow background-->
<hr><!--Text-->
I will explain the strange exception type, <i>HEx</i>, in a moment.
<p>Here's our implementation of <i>AcquireInterface</i> that simply calls the <i>QueryInterface</i> method of <i>IUnknown</i> (or, should I say, the <i>unfortunate</i> <i>QueryInterface</i> of the <i>unfortunate</i> <i>IUnknown</i>).
<hr><!--End Text-->
         <!--Yellow background-->
        <table cellpadding=10 cellspacing=0 width="100%">
                <tr>
                      <td width=20>
            	      <td bgcolor="#e0e080">
<pre><font face="courier"><!--Code-->
void * <font color="#cc0066"><b>SObject::AcquireInterface</b></font> (IID const &amp; iid)
{
    void * p = 0;
    HRESULT hr = _iUnk-&gt;<font color="#000099"><b>QueryInterface</b></font> (iid, &amp; p);
    if (FAILED (hr))
    {
        if (hr == <font color="#009966">E_NOINTERFACE</font>)
            throw "No such interface";
        else
            throw HEx (hr, "Couldn't acquire interface");
    }
    return p;
}

</font></pre><!--End Code-->
                       <td width=20>
        </table>
        <!--End of yellow background-->
<hr><!--Text-->
The method <i>AcquireInterface</i> is one of these exceptional <b><i>Acquire</i></b> methods of <a href="../resource/index.htm">Resource Management</a> that release raw resources. We wan't call it other than inside of the constructor of a smart interface pointer. (By the way, the template parameter is an IID <i>pointer</i> because the compiler won't accept references as template arguments. I'm not sure why.)
<p>So here it is, the template for a smart interface pointer.
<hr><!--End Text-->
         <!--Yellow background-->
        <table cellpadding=10 cellspacing=0 width="100%">
                <tr>
                      <td width=20>
            	      <td bgcolor="#e0e080">
<pre><font face="courier"><!--Code-->
template&lt;class I, IID const * iid&gt;class <font color="#cc0066"><b>SFace</b></font>
{
public:
    ~SFace ()
    {
        if (_i)
            _i-&gt;<font color="#000099"><b>Release</b></font> ();
    }
    I * operator-&gt; () { return _i; }
protected:
    SFace () : _i (0) {}
    SFace (void * i)
    {
        _i = static_cast&lt;I*&gt; (i);
    }
protected:
    I * _i;
};</font></pre><!--End Code-->
                       <td width=20>
        </table>
        <!--End of yellow background-->
<hr><!--Text-->
As you can see, this particular template can't be instantiated. That's because all its constructors are protected. But don't worry, we'll create other classes that will provide their own specialized constructors.
<p>Here's one that uses our CoObject (or any other object derived from it) as an interface source.
<hr><!--End Text-->
         <!--Yellow background-->
        <table cellpadding=10 cellspacing=0 width="100%">
                <tr>
                      <td width=20>
            	      <td bgcolor="#e0e080">
<pre><font face="courier"><!--Code-->
template&lt;class I, IID const * iid&gt;class <font color="#cc0066"><b>SObjFace</b></font>: public <font color="#cc0066"><b>SFace</b></font>&lt;I, iid&gt;
{
public:
    SObjFace (CoObject &amp; obj)
        : SFace&lt;I, iid&gt; (obj.AcquireInterface (*iid))
    {}
};</font></pre><!--End Code-->
                       <td width=20>
        </table>
        <!--End of yellow background-->
<hr><!--Text-->
Finally, let me introduce the <i>HEx</i> class (<i>HRESULT</i> Exception). It is an exception class that is capable of displaying meaningful error messages. For my limited purposes, I chose to simply display the messages directly on the canvas of the main screen. Feel free to implement your own <i>Display</i> method to pop up a message box or something.
<hr><!--End Text-->
         <!--Yellow background-->
        <table cellpadding=10 cellspacing=0 width="100%">
                <tr>
                      <td width=20>
            	      <td bgcolor="#e0e080">
<pre><font face="courier"><!--Code-->
class <font color="#cc0066"><b>HEx</b></font>
{
public:
    HEx (<font color="#009966">HRESULT</font> hr, char const * str = 0)
        : _hr (hr), _str (str)
    {}
    void Display (int x, int y, Canvas &amp; canvas)
    {
        if (_str != 0)
        {
            canvas.Text (x, y, _str);
            y += 20;
        }
        if (<font color="#009966">FAILED</font> (_hr))
        {
            char * msg;
            ::<font color="#000099"><b>FormatMessage</b></font> (
                <font color="#009966">FORMAT_MESSAGE_ALLOCATE_BUFFER</font> | <font color="#009966">FORMAT_MESSAGE_FROM_SYSTEM</font>,
                0,
                _hr,
                <font color="#000099"><b>MAKELANGID</b></font> (<font color="#009966">LANG_NEUTRAL</font>, <font color="#009966">SUBLANG_DEFAULT</font>),
                reinterpret_cast&lt;char *&gt; (&amp; msg),
                0,
                0);
            canvas.Text (x, y, msg);
            ::<font color="#000099"><b>LocalFree</b></font> (msg);
        }
    }
private:
    <font color="#009966">HRESULT</font> _hr;
    char const * _str;
};

</font></pre><!--End Code-->
                       <td width=20>
        </table>
        <!--End of yellow background-->
<hr><!--Text-->
There <i>will</i> be sample code for downloading. I just need to explain what <a href="auto.html">Automation</a> is.
<hr><!--End Text-->
   <!-- end main box -->
   </table>

   <td width=10><!-- Right margin -->
</table> <!-- End main table -->



<layer src="http://www.spidersoft.com/ads/bwz468_60.htm" visibility=hidden id=a1 width=600 onload="moveToAbsolute(ad1.pageX,ad1.pageY); a1.clip.height=60;visibility='show';"></layer>
</body>
</html>

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久草热8精品视频在线观看| 成人午夜大片免费观看| 国产日韩三级在线| 欧美日韩亚洲国产综合| www.av亚洲| 久久99精品久久只有精品| 亚洲一区二区在线免费观看视频| 亚洲国产一区二区三区| 亚洲国产精品高清| 精品国产91九色蝌蚪| 欧美亚洲高清一区| 99精品视频在线播放观看| 日本视频在线一区| 亚洲电影一级片| 亚洲激情中文1区| 国产精品卡一卡二| 久久女同精品一区二区| 日韩三级视频在线观看| 欧美日韩一区小说| 欧美在线观看视频一区二区| 不卡的看片网站| 国产成人午夜片在线观看高清观看| 日本一区二区三区在线观看| 精品第一国产综合精品aⅴ| 欧美日韩国产首页| 色狠狠色狠狠综合| 色诱视频网站一区| 91影院在线免费观看| 99久久免费精品高清特色大片| 亚洲在线一区二区三区| 亚洲日本中文字幕区| 国产精品久久久久久一区二区三区| 91久久精品一区二区| 91麻豆高清视频| 99在线精品视频| 不卡av在线网| 91丨porny丨在线| www.日本不卡| 色久综合一二码| 欧美色图激情小说| 91精选在线观看| 日韩视频在线观看一区二区| 欧美一级高清片在线观看| 欧美成人在线直播| 欧美精品一区二区三区高清aⅴ| 色美美综合视频| 91电影在线观看| 欧美日本一区二区在线观看| 欧美日韩一级视频| 6080国产精品一区二区| 日韩一区二区精品在线观看| 精品久久一区二区| 欧美激情在线一区二区| 中文字幕一区二区三区在线播放| 欧美一区二区日韩一区二区| 欧美电影免费提供在线观看| 精品三级在线看| 国产精品入口麻豆原神| 亚洲特级片在线| 日韩精品电影在线观看| 久久99精品网久久| 处破女av一区二区| 欧美色手机在线观看| 日韩欧美国产一区二区在线播放 | 国产一区二区在线观看视频| 黑人巨大精品欧美一区| 99在线精品一区二区三区| 欧美在线高清视频| 欧美精品一区二区三区很污很色的| 欧美色图片你懂的| 欧美一区二区久久久| 国产日韩欧美制服另类| 中文字幕一区日韩精品欧美| 日韩有码一区二区三区| 国产69精品一区二区亚洲孕妇| 免费观看一级特黄欧美大片| 国产一区二区三区四| 99视频在线精品| 日韩一区二区麻豆国产| 亚洲三级视频在线观看| 六月丁香综合在线视频| 日本电影欧美片| 欧美mv日韩mv国产| 亚洲综合视频在线| 国产一区二区网址| 欧美亚洲高清一区二区三区不卡| 欧美综合一区二区| 欧美变态tickle挠乳网站| 中文字幕亚洲在| 美脚の诱脚舐め脚责91| 91精品福利在线| 亚洲国产高清aⅴ视频| 丝袜脚交一区二区| 色综合天天视频在线观看| 久久综合九色综合97婷婷女人| 亚洲精品一区在线观看| 亚洲一区二区三区四区的| 国产一区二区三区免费播放| 欧美精选一区二区| 亚洲精品美国一| 成人久久久精品乱码一区二区三区| av电影在线观看完整版一区二区 | 欧美欧美欧美欧美| 国产亚洲一二三区| 美日韩一区二区| 欧美色视频一区| 亚洲欧美在线视频| 国产成人精品免费视频网站| 欧美一区二区福利视频| 亚洲国产综合在线| 色综合天天综合网天天看片| 国产欧美一区二区精品久导航| 国产精品久久久久久久久图文区| 日韩美女视频一区二区| 国产福利一区二区| 日韩欧美国产小视频| 亚洲chinese男男1069| 色婷婷激情久久| 中文字幕在线观看一区| 国产精品99久| 精品国产一区二区在线观看| 日本视频中文字幕一区二区三区| 韩国女主播成人在线| 日韩欧美在线综合网| 午夜精品视频一区| 欧美综合一区二区| 亚洲综合视频在线观看| 91精品1区2区| 亚洲福中文字幕伊人影院| 欧洲av一区二区嗯嗯嗯啊| 亚洲自拍偷拍欧美| 在线观看国产一区二区| 亚洲二区在线观看| 欧美情侣在线播放| 免费av网站大全久久| 91精品国产综合久久久蜜臀粉嫩 | 狠狠色综合日日| 精品国产123| 国产一区二区三区蝌蚪| 亚洲国产精品传媒在线观看| 国产成a人亚洲精品| 国产精品家庭影院| 色偷偷久久一区二区三区| 亚洲国产精品一区二区久久恐怖片 | 欧美性大战久久久久久久蜜臀| 欧美第一区第二区| 狠狠色2019综合网| 久久精品夜夜夜夜久久| 国产乱人伦偷精品视频不卡| 国产精品素人一区二区| 97se亚洲国产综合在线| 亚洲一区视频在线| 日韩欧美你懂的| 国产91精品一区二区麻豆亚洲| 欧美www视频| 国产福利一区二区三区视频 | 欧美男人的天堂一二区| 蜜臀av性久久久久蜜臀aⅴ四虎 | 色综合久久综合中文综合网| 一区二区三区毛片| 91精品国产一区二区三区香蕉| 亚洲免费色视频| 欧美日本精品一区二区三区| 国内精品写真在线观看| 国产女人水真多18毛片18精品视频| 蜜桃视频在线观看一区二区| 国产午夜精品久久久久久免费视| 蜜臀av性久久久久蜜臀aⅴ流畅| 欧美中文字幕一区二区三区亚洲| 欧美国产一区二区| 91丨九色丨尤物| 日韩精品一级中文字幕精品视频免费观看| 91小视频免费观看| 天堂va蜜桃一区二区三区漫画版 | 国产校园另类小说区| 色婷婷av一区二区| 精品一区二区久久久| 一区二区三区在线观看国产| 欧美精品一区二区三区蜜桃视频 | 亚洲视频免费看| 日韩一本二本av| 91色乱码一区二区三区| 精品一区二区综合| 成人欧美一区二区三区1314| 日韩精品一区二区三区中文不卡 | 亚洲激情欧美激情| 日韩一级片网址| 色婷婷av一区二区三区gif| 激情综合色播五月| 亚洲女人的天堂| 久久人人超碰精品| 欧美精品日韩综合在线| 91在线观看成人| 国产另类ts人妖一区二区| 午夜伦欧美伦电影理论片| 自拍偷拍亚洲激情| 久久精品亚洲一区二区三区浴池| 成人精品免费网站| 麻豆精品在线视频| 亚洲二区视频在线|