{"blog_title":"potisan\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30e1\u30e2","type":"rich","published":"2023-12-18 21:24:55","blog_url":"https://potisan-programming-memo.hatenablog.jp/","author_name":"potisan","provider_url":"https://hatena.blog","title":"C++&Win API _bstr_t\u3068wil::make_bstr","provider_name":"Hatena Blog","author_url":"https://blog.hatena.ne.jp/potisan/","url":"https://potisan-programming-memo.hatenablog.jp/entry/2023/12/18/212455","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpotisan-programming-memo.hatenablog.jp%2Fentry%2F2023%2F12%2F18%2F212455\" title=\"C++&amp;Win API _bstr_t\u3068wil::make_bstr - potisan\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30e1\u30e2\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","width":"100%","version":"1.0","categories":["C++","Windows","WIL"],"image_url":null,"height":"190","description":"Windows\u74b0\u5883\u3067LPWSTR\u304b\u3089\u30b9\u30de\u30fc\u30c8\u30dd\u30a4\u30f3\u30bf\u7684\u306aBSTR\u3092\u4f5c\u6210\u3059\u308b\u65b9\u6cd5\u306b\u306f\u6b21\u306e2\u901a\u308a\u3042\u308a\u307e\u3059\u3002 _bstr_t(...) <comutil.h> wil::make_bstr(...) \"wil/com.h\" \u524d\u8005\u306e_bstr_t(...)\u306f\u30b3\u30f3\u30d1\u30a4\u30e9\u4ed8\u5c5e\u306a\u306e\u3067\u8ffd\u52a0\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u4e0d\u8981\u3067\u3059\u304c\u3001\u30e0\u30fc\u30d6\u30bb\u30de\u30f3\u30c6\u30a3\u30af\u30b9\u975e\u5bfe\u5fdc\u3067\u72ec\u81ea\u306e\u53c2\u7167\u30ab\u30a6\u30f3\u30bf\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002\u4f5c\u6210\u3059\u308b\u5ea6\u306b\u53c2\u7167\u30ab\u30a6\u30f3\u30c8\u7ba1\u7406\u7528\u306b\u30af\u30e9\u30b9\u304cnew\u3055\u308c\u307e\u3059\u3002\u307e\u305f\u3001LPWSTR/LPSTR\u7b49\u304b\u3089\u306e\u4f5c\u6210\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002 \u5f8c\u8005\u306ewil::make_bstr(...)\u306fMicrosoft\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3067\u3059\u304c\u8ffd\u52a0\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5fc5\u8981\u3067\u3059\u3002\u30e0\u30fc\u30d6\u30bb\u2026"}