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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? shell.html

?? windows系統編程 一本很好的書!值得看哦!
?? HTML
?? 第 1 頁 / 共 2 頁
字號:
    void Free ()
    {
        if (_p != 0)
            _malloc-&gt;<font color="#000099"><b>Free</b></font> (_p);
        _p = 0;
    }

    T * _p;
    <font color="#009966">IMalloc</font> *  _malloc;
private:
    SShellPtr (SShellPtr const &amp; p) {}
    void operator = (SShellPtr const &amp; p) {}
};
</font></pre><!--End Code-->
		<td width=20>
	</table><!--End of yellow background-->
<hr><!--Text-->
Notice the same trick as before: the class SShellPtr is not directly usable. You have to subclass it and provide the appropriate constructor.
<p>Notice also that I wasn't sure if _shellMalloc couldn't be made a static member of SShellPtr. The problem is that static members are initialized before WinMain. At that time, the whole COM system might be unstable. On the other hand, the documentation says that you can safely call another API, CoGetMalloc, before the call to CoInitialize. It doesn't say whether SHGetMalloc, which does almost the same thing, can also be called anytime in your program. Like in many other cases with badly designed/documented systems, only experiment can answer such questions. <a href="mailto:bartoszm@relisoft.com">Feedback</a> will be very welcome.
<p>By the way, if you need a smart pointer that uses COM-specific malloc, the one obtained by calling CoGetMalloc, you can safely make its _malloc a static member and initialize it once in your program (here, SComMalloc::GetMalloc is static, too):
<hr>
	<!--Yellow background table.-->
         	<table cellpadding=10 cellspacing=0 width="100%">
         		<tr>
		<td width=20>
            		<td bgcolor="#e0e080">
<pre><font face="courier"><!--Code-->IMalloc * SComMalloc::_malloc = SComMalloc::GetMalloc ();

IMalloc * <font color="#cc0066"><b>SComMalloc::GetMalloc</b></font> ()
{
    <font color="#009966">IMalloc</font> * malloc = 0;
    if (<font color="#000099"><b>CoGetMalloc</b></font> (1, &amp; malloc) == S_OK)
        return malloc;
    else
        return 0;
}
</font></pre><!--End Code-->
		<td width=20>
	</table><!--End of yellow background-->
<hr>
That's all there is to know in order to start using Windows95 shell and its COM interfaces. Here's an example. Windows95 shell has this notion of a Desktop being the root of the "file" system. Did you notice how Windows95 applications let the user browse the file system starting at the desktop? This way you can, for instance, create files directly on your desktop, move between drives, browse a network drive, etc. It is, in effect, a poor man's Distributed File System (PMDFS). How can your application get access to PMDFS? Easy. For instance, let's write some code that will let the user pick a folder by browsing PMDFS. All we need to do is to get hold of the desktop, position ourselves with respect to it, start the built-in browser and retrieve the path that the user has chosen. 
<hr><!--End Text-->
	<!--Yellow background table.-->
         	<table cellpadding=10 cellspacing=0 width="100%">
         		<tr>
		<td width=20>
            		<td bgcolor="#e0e080">
<pre><font face="courier"><!--Code-->char path [MAX_PATH];
path [0] = '\0';
Desktop desktop;
ShPath browseRoot (desktop, unicodePath);
if (browseRoot.IsOK ())
{
    FolderBrowser browser (hwnd,
                          browseRoot,
                          BIF_RETURNONLYFSDIRS,
                          "Select folder of your choice");
    if (folder.IsOK ())
    {
        strcpy (path, browser.GetPath ());
    }
}
</font></pre><!--End Code-->
		<td width=20>
	</table><!--End of yellow background-->
<hr><!--Text-->
Let's start with the desktop object. It envelops the interface called IShellFolder. Notice how we conform to the First Rule of Acquisition--we allocate resources in the constructor by calling the API SHGetDesktopFolder. The smart interface pointer will take care of resource management (reference counting).
<hr><!--End Text-->
	<!--Yellow background table.-->
         	<table cellpadding=10 cellspacing=0 width="100%">
         		<tr>
		<td width=20>
            		<td bgcolor="#e0e080">
<pre><font face="courier"><!--Code-->
class <font color="#cc0066"><b>Desktop</b></font>: public <font color="#cc0066"><b>SIfacePtr</b></font>&lt;<font color="#cc0066"><b>IShellFolder</b></font>&gt;
{
public:
    Desktop ()
    {
        if (<font color="#000099"><b>SHGetDesktopFolder</b></font> (&amp; _p) != <font color="#009966">NOERROR</font>)
            throw "SHGetDesktopFolder failed";
    }
};
</font></pre><!--End Code-->
		<td width=20>
	</table><!--End of yellow background-->
<hr><!--Text-->
Once we have the desktop, we have to create a special kind of path that is used by PMDFS. The class ShPath encapsulates this "path." It is constructed from a regular Unicode path (use <i>mbstowcs</i> to convert ASCII path to Unicode: <font face="Courier">int mbstowcs(wchar_t *wchar, const char *mbchar, size_t count)</font>). The result of the conversion is a <i>generalized path</i> relative to the desktop. Notice that memory for the new path is allocated by the shell--we encapsulate it in SShellPtr to make sure it is correctly deallocated.
<hr><!--End Text-->
	<!--Yellow background table.-->
         	<table cellpadding=10 cellspacing=0 width="100%">
         		<tr>
		<td width=20>
            		<td bgcolor="#e0e080">
<pre><font face="courier"><!--Code-->
class <font color="#cc0066"><b>ShPath</b></font>: public <font color="#cc0066"><b>SShellPtr</b></font>&lt;<font color="#009966">ITEMIDLIST</font>&gt;
{
public:
    ShPath (SIfacePtr&lt;IShellFolder&gt; &amp; folder, wchar_t * path)
    {
        ULONG lenParsed = 0;
        _hresult = folder-&gt;<font color="#000099"><b>ParseDisplayName</b></font> (0, 0, path, &amp; lenParsed, &amp; _p, 0);
    }
    bool IsOK () const { return SUCCEEDED (_hresult); }
private:
    <font color="#009966">HRESULT</font> _hresult;
};
</font></pre><!--End Code-->
		<td width=20>
	</table><!--End of yellow background-->
	
<hr><!--Text-->
This shell path will become the root from which the browser will start its interaction with the user.
<p>From the client code's point of view, the browser <i>is</i> the path chosen by the user. That's why it inherits from SShellPtr&lt;ITEMIDLIST&gt;.
<p>By the way, ITEMIDLIST is the official name for this <i>generalized path</i>. It is a list of, and I'm not making this up, SHITEMID's. I shall refrain from making any further comments or jokes about shell naming conventions.
<hr><!--End Text-->

	<!--Yellow background table.-->
         	<table cellpadding=10 cellspacing=0 width="100%">
         		<tr>
		<td width=20>
            		<td bgcolor="#e0e080">
<pre><font face="courier"><!--Code-->
class <font color="#cc0066"><b>FolderBrowser</b></font>: public <font color="#cc0066"><b>SShellPtr</b></font>&lt;<font color="#009966">ITEMIDLIST</font>&gt;
{
public:
    FolderBrowser (
        HWND hwndOwner,
        SShellPtr&lt;ITEMIDLIST&gt; &amp; root,
        UINT browseForWhat,
        char const *title);

    char const * GetDisplayName () { return _displayName; }
    char const * GetPath ()        { return _fullPath; }
    bool IsOK() const              { return _p != 0; };

private:
    char       _displayName [MAX_PATH];
    char       _fullPath [MAX_PATH];
    <font color="#009966">BROWSEINFO</font> _browseInfo;
};

<font color="#cc0066"><b>FolderBrowser::FolderBrowser</b></font> (
    HWND hwndOwner,
    SShellPtr&lt;ITEMIDLIST&gt; &amp; root,
    UINT browseForWhat,
    char const *title)
{
    _displayName [0] = '\0';
    _fullPath [0] = '\0';
    _browseInfo.hwndOwner = hwndOwner;
    _browseInfo.pidlRoot = root; 
    _browseInfo.pszDisplayName = _displayName;
    _browseInfo.lpszTitle = title; 
    _browseInfo.ulFlags = browseForWhat; 
    _browseInfo.lpfn = 0; 
    _browseInfo.lParam = 0;
    _browseInfo.iImage = 0;
	 
    // Let the user do the browsing
    _p = <font color="#000099"><b>SHBrowseForFolder</b></font> (&amp; _browseInfo);
	 
    if (_p != 0)
        <font color="#000099"><b>SHGetPathFromIDList</b></font> (_p, _fullPath);
}

</font></pre><!--End Code-->
		<td width=20> <!-- right margin-->
	</table><!--End of yellow background-->
	
<hr><!--Text-->
That's it! Isn't it simple?
<p>Now, would you like to hear <a href="olerant.html">what I think about OLE</a>?
<hr><!--End Text-->

   </table> <!-- End central 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>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美影院一区二区三区| 久久综合狠狠综合久久综合88| 成人免费va视频| 成人国产亚洲欧美成人综合网| 国产精品99久久久| 国产一区不卡精品| 国产精品一二三区在线| 粉嫩嫩av羞羞动漫久久久| 成人av电影在线观看| 99久久精品国产观看| 色屁屁一区二区| 欧美日韩精品一区视频| 91精品国产麻豆国产自产在线| 久久成人免费网站| 一区二区三区在线播放| 欧美经典一区二区| 亚洲欧美电影一区二区| 国产精品成人午夜| 日韩欧美一级精品久久| 国产美女一区二区三区| 国产高清不卡一区| proumb性欧美在线观看| 欧美亚洲国产一区二区三区va| 欧美视频精品在线观看| 91精品婷婷国产综合久久竹菊| 欧美不卡一区二区三区| 国产精品久久一卡二卡| 亚洲一二三四在线| 久久草av在线| 91麻豆国产在线观看| 欧美三级电影精品| 欧美白人最猛性xxxxx69交| 中文字幕在线视频一区| 亚洲18女电影在线观看| 精品一二三四在线| www.欧美日韩| 7777精品伊人久久久大香线蕉的| 久久综合九色综合97婷婷女人| 国产精品久久久久久久第一福利 | 国产福利精品一区| 色婷婷综合久久| 日韩美女天天操| 亚洲日本丝袜连裤袜办公室| 免费高清在线视频一区·| 粉嫩av一区二区三区在线播放 | 中文字幕一区二区三区在线播放| 亚洲国产中文字幕| 国产老肥熟一区二区三区| 色婷婷综合久久久久中文 | 国产精品久久久久久久久图文区 | 亚洲一二三级电影| 国产呦精品一区二区三区网站| 99综合电影在线视频| 91精品国产综合久久久久久久 | 亚洲综合网站在线观看| 久久精品久久综合| 日本乱码高清不卡字幕| 久久免费视频一区| 亚洲成人av中文| 99久久精品久久久久久清纯| 欧美一区二区三区系列电影| 亚洲欧洲国产专区| 极品少妇xxxx精品少妇偷拍 | 久久综合网色—综合色88| 亚洲国产一区二区三区青草影视| 国内成+人亚洲+欧美+综合在线| 色中色一区二区| 久久久影视传媒| 日韩精品1区2区3区| 一本大道久久精品懂色aⅴ| 久久精品这里都是精品| 蜜桃视频第一区免费观看| 欧美性色欧美a在线播放| 亚洲国产高清在线观看视频| 久久成人久久鬼色| 欧美一区二区三区男人的天堂| 专区另类欧美日韩| 国产福利一区二区三区在线视频| 4438亚洲最大| 亚洲成人一区在线| 91久久国产最好的精华液| 亚洲国产成人私人影院tom| 精品无人码麻豆乱码1区2区| 欧美巨大另类极品videosbest| 一区二区三区在线视频观看58| 成人99免费视频| 久久久久久久av麻豆果冻| 国产自产高清不卡| 日韩精品一区二| 久久se这里有精品| 欧美成人精品3d动漫h| 免费成人美女在线观看.| 日韩亚洲欧美一区| 久久精品国产在热久久| 欧美一区欧美二区| 蜜桃一区二区三区在线| 欧美一区二区三区性视频| 琪琪久久久久日韩精品| 欧美一级高清大全免费观看| 蜜臀av性久久久久蜜臀aⅴ流畅| 777亚洲妇女| 免费在线成人网| 欧美一区中文字幕| 久久国产尿小便嘘嘘尿| 亚洲精品一区二区三区福利 | 欧美日韩免费视频| 亚洲精品菠萝久久久久久久| 91麻豆视频网站| 亚洲午夜精品一区二区三区他趣| 色噜噜狠狠成人中文综合| 亚洲综合成人在线视频| 欧美日韩精品一区视频| 日韩av不卡一区二区| 欧美一级日韩免费不卡| 国产一区福利在线| 国产精品久久久久久户外露出| 91香蕉视频在线| 亚洲国产另类av| 欧美一二三四在线| 国产成人免费在线视频| 亚洲天堂免费看| 欧美精品自拍偷拍| 激情深爱一区二区| 国产精品免费视频一区| 欧美综合视频在线观看| 爽好久久久欧美精品| 欧美tk丨vk视频| av一区二区三区在线| 亚洲综合免费观看高清在线观看| 欧美另类变人与禽xxxxx| 韩国精品免费视频| 国产精品国产三级国产普通话99| 在线欧美日韩国产| 另类小说图片综合网| 国产精品动漫网站| 91麻豆精品91久久久久久清纯| 精品一区二区在线免费观看| 中文字幕一区二区三区乱码在线| 欧美三级日韩在线| 国产乱人伦偷精品视频免下载| 综合av第一页| 日韩欧美亚洲另类制服综合在线| 成人午夜在线视频| 丝袜美腿亚洲色图| 国产精品视频你懂的| 777亚洲妇女| www.日本不卡| 久久黄色级2电影| 一区二区三区在线影院| 久久日韩精品一区二区五区| 色88888久久久久久影院按摩 | 日本高清不卡aⅴ免费网站| 午夜国产不卡在线观看视频| 国产亚洲一区字幕| 欧美日韩国产美| av在线综合网| 激情综合色综合久久| 亚洲高清不卡在线观看| 中文一区在线播放| 日韩欧美国产一区二区在线播放| 91视视频在线观看入口直接观看www | 一区二区三区加勒比av| 久久综合久久综合亚洲| 欧美三区在线观看| 不卡视频在线看| 乱一区二区av| 亚瑟在线精品视频| 亚洲欧美一区二区久久 | 亚洲妇熟xx妇色黄| 国产精品成人一区二区三区夜夜夜| 欧美一区二区黄| 在线观看视频91| av动漫一区二区| 国产福利电影一区二区三区| 午夜精品视频一区| 一区二区三区不卡视频| 日本一区二区三区免费乱视频| 日韩欧美成人午夜| 欧美日韩国产一二三| 一本大道久久精品懂色aⅴ| 成人一区二区三区在线观看| 久久不见久久见中文字幕免费| 午夜电影网一区| 亚洲一区在线观看视频| 亚洲色图一区二区| 国产精品久久夜| 欧美国产一区视频在线观看| 精品国偷自产国产一区| 日韩女优毛片在线| 日韩欧美国产精品一区| 91精品国产入口| 欧美一区二区三区四区五区 | 亚洲午夜电影在线| 亚洲美女区一区| 最新成人av在线| 综合久久国产九一剧情麻豆| 国产精品激情偷乱一区二区∴| 国产精品丝袜久久久久久app| 国产欧美一区二区三区在线老狼 | 国内精品在线播放|