Re: [問題] Console 下使用 Com 元件
※ 引述《tropical72 (藍影)》之銘言:
: 開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
: vs2008 + xp
: 額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
: #include <afxwin.h>
: #include <wininet.h>
: #include <afxext.h>
: 問題(Question):
: 網路上針對 vc + com 元件的說明,九成以上都是在 MFC 底下進行,
: 請問有沒有辦法開 console mode, 使用 com 元件?
: 程式碼(Code):(請善用置底文網頁, 記得排版)
: http://paste.plurk.com/show/354248/
: (CString 到時可全換掉沒關係)
: 補充說明(Supplement):
: 謝謝各位指教。
很簡單. 在你的 main 寫:
CoInitialize(NULL); // initialize COM service.
把你的 SetWallPaper Code 全搬到這裡... 就結束了
CoUnitialize();
return 0;
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 111.240.169.67
推
01/18 23:15, , 1F
01/18 23:15, 1F
推
01/18 23:27, , 2F
01/18 23:27, 2F
→
01/18 23:27, , 3F
01/18 23:27, 3F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章