version 0.1 (beta)
2005/9/5
ssThis line, and those below, will be ignored--
A MkImgPage_Ver0_1
A MkImgPage_Ver0_1/MkImgPage
A MkImgPage_Ver0_1/MkImgPage/stdafx.h
A MkImgPage_Ver0_1/MkImgPage/error.h
A MkImgPage_Ver0_1/MkImgPage/Release
AM MkImgPage_Ver0_1/MkImgPage/Release/MkImgPage.dll
AM MkImgPage_Ver0_1/MkImgPage/_MkImgPage.tlb
A MkImgPage_Ver0_1/MkImgPage/MkImgPageCom.cpp
A MkImgPage_Ver0_1/MkImgPage/DocumentParser.h
A MkImgPage_Ver0_1/MkImgPage/MkImgPage.cpp
A MkImgPage_Ver0_1/MkImgPage/ieextension.rgs
A MkImgPage_Ver0_1/MkImgPage/MkImgPageCom.h
A MkImgPage_Ver0_1/MkImgPage/_MkImgPage.h
A MkImgPage_Ver0_1/MkImgPage/dlldata.c
A MkImgPage_Ver0_1/MkImgPage/_MkImgPage_i.c
A MkImgPage_Ver0_1/MkImgPage/MkImgPage.rgs
A MkImgPage_Ver0_1/MkImgPage/_MkImgPage_p.c
A MkImgPage_Ver0_1/MkImgPage/MkImgPageps.def
A MkImgPage_Ver0_1/MkImgPage/MkImgPage.vcproj
A MkImgPage_Ver0_1/MkImgPage/MkImgPage.rc
A MkImgPage_Ver0_1/MkImgPage/ItemSelectDlg.cpp
A MkImgPage_Ver0_1/MkImgPage/MkImgPagePS.vcproj
A MkImgPage_Ver0_1/MkImgPage/MkImgPagePS.vcproj.vspscc
A MkImgPage_Ver0_1/MkImgPage/_MkImgPage.idl
A MkImgPage_Ver0_1/MkImgPage/error.cpp
A MkImgPage_Ver0_1/MkImgPage/stdafx.cpp
A MkImgPage_Ver0_1/MkImgPage/ItemSelectDlg.h
A MkImgPage_Ver0_1/MkImgPage/ReadMe.txt
A MkImgPage_Ver0_1/MkImgPage/DocumentParser.cpp
A MkImgPage_Ver0_1/MkImgPage/resource.h
A MkImgPage_Ver0_1/MkImgPageSetup
A MkImgPage_Ver0_1/MkImgPageSetup/Release
AM MkImgPage_Ver0_1/MkImgPageSetup/Release/MkImgPage.msi
A MkImgPage_Ver0_1/MkImgPageSetup/MkImgPageSetup.vdproj
A MkImgPage_Ver0_1/MkImgPageSetup/HowToUseTheOrcaToRemoveTheEveryoneOption.url
A MkImgPage_Ver0_1/MkImgPage.sln
@@ -0,0 +1,3 @@ | ||
1 | +#pragma once | |
2 | + | |
3 | +void CheckAndThrow( HRESULT hr ); |
@@ -0,0 +1,45 @@ | ||
1 | +// stdafx.h : 標準のシステム インクルード ファイルのインクルード ファイル、または | |
2 | +// 参照回数が多く、かつあまり変更されない、プロジェクト専用のインクルード ファイル | |
3 | +// を記述します。 | |
4 | + | |
5 | +#pragma once | |
6 | + | |
7 | +#ifndef STRICT | |
8 | +#define STRICT | |
9 | +#endif | |
10 | + | |
11 | +// 下で指定された定義の前に対象プラットフォームを指定しなければならない場合、以下の定義を変更してください。 | |
12 | +// 異なるプラットフォームに対応する値に関する最新情報については、MSDN を参照してください。 | |
13 | +#ifndef WINVER // Windows 95 および Windows NT 4 以降のバージョンに固有の機能の使用を許可します。 | |
14 | +#define WINVER 0x0500 // これを Windows 98 および Windows 2000 またはそれ以降のバージョン向けに適切な値に変更してください。 | |
15 | +#endif | |
16 | + | |
17 | +#ifndef _WIN32_WINNT // Windows NT 4 以降のバージョンに固有の機能の使用を許可します。 | |
18 | +#define _WIN32_WINNT 0x0500 // これを Windows 2000 またはそれ以降のバージョン向けに適切な値に変更してください。 | |
19 | +#endif | |
20 | + | |
21 | +#ifndef _WIN32_WINDOWS // Windows 98 以降のバージョンに固有の機能の使用を許可します。 | |
22 | +#define _WIN32_WINDOWS 0x0510 // これを Windows Me またはそれ以降のバージョン向けに適切な値に変更してください。 | |
23 | +#endif | |
24 | + | |
25 | +#ifndef _WIN32_IE // IE 4.0 以降のバージョンに固有の機能の使用を許可します。 | |
26 | +#define _WIN32_IE 0x0500 // これを IE 5.0 またはそれ以降のバージョン向けに適切な値に変更してください。 | |
27 | +#endif | |
28 | + | |
29 | +#define _ATL_APARTMENT_THREADED | |
30 | +#define _ATL_NO_AUTOMATIC_NAMESPACE | |
31 | + | |
32 | +#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // 一部の CString コンストラクタは明示的です。 | |
33 | + | |
34 | +// 一般的で無視しても安全な MFC の警告メッセージの一部の非表示を解除します。 | |
35 | +#define _ATL_ALL_WARNINGS | |
36 | + | |
37 | +#include <atlbase.h> | |
38 | +#include <atlcom.h> | |
39 | +#include <atlwin.h> | |
40 | +#include <atltypes.h> | |
41 | +#include <atlctl.h> | |
42 | +#include <atlhost.h> | |
43 | + | |
44 | + | |
45 | +using namespace ATL; |
@@ -0,0 +1,267 @@ | ||
1 | +// MkImgPageCom.cpp : CMkImgPage の実装 | |
2 | + | |
3 | +#include "stdafx.h" | |
4 | +#include "MkImgPageCom.h" | |
5 | + | |
6 | +#include "DocumentParser.h" | |
7 | +#include "error.h" | |
8 | + | |
9 | +#include <map> | |
10 | + | |
11 | +void CMkImgPage::FinalRelease() | |
12 | +{ | |
13 | + for( CStringList::const_iterator ite = temp_paths.begin(); | |
14 | + ite != temp_paths.end(); | |
15 | + ++ite ) | |
16 | + { | |
17 | + const CString& path = *ite; | |
18 | + DeleteFile( path ); | |
19 | + } | |
20 | +} | |
21 | + | |
22 | +STDMETHODIMP CMkImgPage::QueryStatus( | |
23 | + const GUID *pguidCmdGroup, // Pointer to command group | |
24 | + ULONG cCmds, // Number of commands in prgCmds array | |
25 | + OLECMD *prgCmds, // Array of commands | |
26 | + OLECMDTEXT *pCmdText // Pointer to name or status of command | |
27 | +) | |
28 | +{ | |
29 | + ATLTRACE(atlTraceCOM, 2, _T("IOleCommandTarget::QueryStatus\n") ); | |
30 | + return S_OK; | |
31 | +} | |
32 | + | |
33 | +STDMETHODIMP CMkImgPage::Exec( | |
34 | + const GUID *pguidCmdGroup, // Pointer to command group | |
35 | + DWORD nCmdID, // Identifier of command to execute | |
36 | + DWORD nCmdExecOpt, // Options for executing the command | |
37 | + VARIANTARG *pvaIn, // Pointer to input arguments | |
38 | + VARIANTARG *pvaOut // Pointer to command output | |
39 | +) | |
40 | +{ | |
41 | + ATLTRACE(atlTraceCOM, 2, _T("IOleCommandTarget::Exec\n") ); | |
42 | + | |
43 | + try{ | |
44 | + CComPtr<IServiceProvider> spServiceProvider; | |
45 | + CheckAndThrow( m_spUnkSite.QueryInterface( &spServiceProvider ) ); | |
46 | + | |
47 | + CComPtr<IServiceProvider> spServiceProvider2; | |
48 | + CheckAndThrow( spServiceProvider->QueryService( SID_STopLevelBrowser, &spServiceProvider2 ) ); | |
49 | + | |
50 | + CComPtr<IWebBrowser2> browser; | |
51 | + CheckAndThrow( spServiceProvider2->QueryService( SID_SWebBrowserApp, &browser ) ) ; | |
52 | + | |
53 | + CComPtr<IDispatch> doc_disp; | |
54 | + CheckAndThrow( browser->get_Document( &doc_disp ) ); | |
55 | + | |
56 | + CComPtr<IHTMLDocument2> doc; | |
57 | + CheckAndThrow( doc_disp.QueryInterface( &doc ) ); | |
58 | + | |
59 | + CComBSTR bstrTitle; | |
60 | + if( FAILED( doc->get_title( &bstrTitle.m_str ) ) || bstrTitle.m_str == NULL ) { | |
61 | + bstrTitle = L"unknown"; | |
62 | + } | |
63 | + | |
64 | + CComBSTR bstrURL; | |
65 | + if( FAILED( doc->get_URL( &bstrURL.m_str ) ) || bstrURL.m_str == NULL ) { | |
66 | + bstrURL = L""; | |
67 | + } | |
68 | + | |
69 | + CItemSelectDlg dlg; | |
70 | + dlg.set_linked_url( CString( (LPCWSTR)(BSTR) bstrURL ) ); | |
71 | + | |
72 | + INT_PTR result = dlg.DoModal(); | |
73 | + if( result != IDOK ) { | |
74 | + return S_OK; | |
75 | + } | |
76 | + | |
77 | + CComPtr<IStream> buffer; | |
78 | + | |
79 | + CString real_temp_path; | |
80 | + ExpandEnvironmentStrings( dlg.get_temp_path(), real_temp_path.GetBuffer( MAX_PATH ), MAX_PATH ); | |
81 | + real_temp_path.ReleaseBuffer(); | |
82 | + | |
83 | + CString save_path; | |
84 | + if( dlg.get_save_mode() != 0 ) { | |
85 | + if( dlg.is_temp_name() ) { | |
86 | + // テンポラリファイル名の自動生成 | |
87 | + CString baseDir( real_temp_path ); | |
88 | + const LPCTSTR tmp = baseDir; | |
89 | + LPCTSTR p = tmp; | |
90 | + while(*p)p++; | |
91 | + const TCHAR lastChr = *CharPrev( tmp, p ); | |
92 | + if( ! ( lastChr == '\\' || lastChr == '/' ) ) { | |
93 | + // 終端に\がなければ追加する。 | |
94 | + baseDir += "\\"; | |
95 | + } | |
96 | + | |
97 | + int retry = 0; | |
98 | + for(;;) { | |
99 | + SYSTEMTIME systime = { 0 }; | |
100 | + GetLocalTime( &systime ); | |
101 | + CString tempFileName; | |
102 | + tempFileName.Format( "%smkimgpage-%04d%02d%02d%02d%02d%02d-%04d-%02d.htm", | |
103 | + baseDir, | |
104 | + systime.wYear, | |
105 | + systime.wMonth, | |
106 | + systime.wDay, | |
107 | + systime.wHour, | |
108 | + systime.wMinute, | |
109 | + systime.wSecond, | |
110 | + systime.wMilliseconds, | |
111 | + retry | |
112 | + ); | |
113 | + HANDLE hTempFile = CreateFile( tempFileName, GENERIC_WRITE, FILE_SHARE_WRITE | FILE_SHARE_READ, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL ); | |
114 | + if( hTempFile != INVALID_HANDLE_VALUE ) { | |
115 | + CloseHandle( hTempFile ); | |
116 | + temp_paths.push_back( tempFileName ); | |
117 | + save_path = tempFileName; | |
118 | + break; | |
119 | + } | |
120 | + retry++; | |
121 | + if( retry >= 100 ) { | |
122 | + AtlThrow( MAKE_HRESULT( 1, FACILITY_WIN32, ERROR_FILE_NOT_FOUND ) ); | |
123 | + } | |
124 | + } | |
125 | + } | |
126 | + else { | |
127 | + // ローカルにファイルを生成 | |
128 | + save_path = (LPCWSTR)(BSTR) bstrTitle; | |
129 | + OPENFILENAME opfn = { 0 }; | |
130 | + opfn.lStructSize = sizeof( OPENFILENAME ); | |
131 | + opfn.lpstrFile = save_path.GetBuffer( MAX_PATH + 1); | |
132 | + opfn.lpstrInitialDir = real_temp_path; | |
133 | + opfn.nMaxFile = MAX_PATH; | |
134 | + opfn.lpstrFilter = "HTML\0*.html;*.htm\0all files\0*.*\0\0"; | |
135 | + opfn.lpstrDefExt = "html"; | |
136 | + opfn.Flags = OFN_DONTADDTORECENT | OFN_OVERWRITEPROMPT; | |
137 | + if( ! GetSaveFileName( &opfn ) ) { | |
138 | + return S_OK; | |
139 | + } | |
140 | + save_path.ReleaseBuffer(-1); | |
141 | + } | |
142 | + | |
143 | + // ファイルからストリームを生成 | |
144 | + OutputDebugString( "OutputFileName=" ); | |
145 | + OutputDebugString( save_path ); | |
146 | + OutputDebugString( "\n" ); | |
147 | + | |
148 | + CheckAndThrow( SHCreateStreamOnFile( save_path, STGM_READWRITE | STGM_SHARE_DENY_NONE | STGM_CREATE, &buffer ) ); | |
149 | + } | |
150 | + else { | |
151 | + // 仮想ページの生成(メモリ上のストリームを生成) | |
152 | + CheckAndThrow( CreateStreamOnHGlobal( NULL, TRUE, &buffer ) ); | |
153 | + } | |
154 | + | |
155 | + CDocumentParser parser( dlg ); | |
156 | + CheckAndThrow( parser.parse( doc ) ); | |
157 | + | |
158 | + typedef std::map<CString, bool> CStringMap; | |
159 | + CStringMap usedItemMap; | |
160 | + | |
161 | + // HTML開始 | |
162 | + CStringA head( "<html><head><title>"); | |
163 | + head += CString( (LPCWSTR)(BSTR) bstrTitle ); | |
164 | + head += "</title></head><body>\r\n"; | |
165 | + | |
166 | + buffer->Write( (LPCSTR) head, (ULONG) head.GetLength(), NULL ); | |
167 | + | |
168 | + int item_count = 0; | |
169 | + for( CDocumentParser::const_iterator ite = parser.begin(); | |
170 | + ite != parser.end(); | |
171 | + ++ite, item_count++ ) | |
172 | + { | |
173 | + const ItemInfo& itemInfo = *ite; | |
174 | + | |
175 | + // アイテム数制限のチェック | |
176 | + if( dlg.is_use_item_limit() ) { | |
177 | + const range = (item_count >= ( dlg.get_item_start() - 1 ) ) && | |
178 | + ( item_count < dlg.get_item_start() + dlg.get_item_limit() - 1 ); | |
179 | + if( ! range ) { | |
180 | + continue; | |
181 | + } | |
182 | + } | |
183 | + | |
184 | + // 同一アイテムのチェック | |
185 | + CStringMap::iterator usedItemIte = usedItemMap.find( itemInfo.getItem() ); | |
186 | + if( usedItemIte != usedItemMap.end() ) { | |
187 | + continue; | |
188 | + } | |
189 | + usedItemMap.insert( CStringMap::value_type( itemInfo.getItem(), true ) ); | |
190 | + | |
191 | + // アイテムのレンダリング | |
192 | + switch( itemInfo.getItemType() ) | |
193 | + { | |
194 | + case ItemInfo::ITEMTYPE_NONE: | |
195 | + break; | |
196 | + | |
197 | + case ItemInfo::ITEMTYPE_IMAGE: | |
198 | + case ItemInfo::ITEMTYPE_LINKED_IMAGE: | |
199 | + { | |
200 | + CStringA img( "<img src=\"" ); | |
201 | + img += itemInfo.getItem(); | |
202 | + img += CString( "\"><br>\r\n" ); | |
203 | + buffer->Write( (LPCSTR) img, img.GetLength(), NULL ); | |
204 | + } | |
205 | + break; | |
206 | + | |
207 | + case ItemInfo::ITEMTYPE_LINKED_HTML: | |
208 | + { | |
209 | + CStringA a( "<iframe src=\"" ); | |
210 | + a += itemInfo.getItem(); | |
211 | + a += CString( "\"></iframe><br>\r\n" ); | |
212 | + buffer->Write( (LPCSTR) a, a.GetLength(), NULL ); | |
213 | + } | |
214 | + break; | |
215 | + | |
216 | + default: | |
217 | + AtlThrow( MAKE_HRESULT( 1, FACILITY_WIN32, ERROR_INVALID_FUNCTION ) ); | |
218 | + } | |
219 | + } | |
220 | + | |
221 | + // HTMLおわり | |
222 | + CStringA tail( "</body></html>\r\n" ); | |
223 | + buffer->Write( (LPCSTR) tail, (ULONG) tail.GetLength(), NULL ); | |
224 | + | |
225 | + // 生成したHTMLを開く | |
226 | + if( dlg.get_save_mode() == 0 ) { | |
227 | + LARGE_INTEGER offset = { 0 }; | |
228 | + buffer->Seek( offset, STREAM_SEEK_SET, NULL); | |
229 | + | |
230 | + CComPtr<IPersistStreamInit> doc_persist; | |
231 | + CheckAndThrow( doc.QueryInterface( &doc_persist ) ); | |
232 | + doc_persist->Load( buffer ); | |
233 | + } | |
234 | + else { | |
235 | + if( dlg.get_open_mode() != 2 ) { | |
236 | + CComVariant target( L"_top" ); | |
237 | + CComVariant flag( 0 ); | |
238 | + | |
239 | + if( dlg.get_open_mode() == 1 ) { | |
240 | + target = L"_blank"; | |
241 | + flag = navOpenInNewWindow; | |
242 | + } | |
243 | + | |
244 | + CComVariant fname( save_path ); | |
245 | + CComVariant postdata; | |
246 | + CComVariant header; | |
247 | + | |
248 | + CheckAndThrow( browser->Navigate2( &fname, &flag, &target, &postdata, &header ) ); | |
249 | + } | |
250 | + } | |
251 | + | |
252 | + return S_OK; | |
253 | + } | |
254 | + catch( const CAtlException& e ) { | |
255 | + CString message; | |
256 | + message.Format("処理に失敗しました。(HRESULT=%08lx)", (HRESULT) e ); | |
257 | + ::MessageBox( NULL, message, "MkImgPage Error", MB_ICONERROR | MB_OK ); | |
258 | + return E_FAIL; | |
259 | + } | |
260 | + catch( ... ) { | |
261 | + ::MessageBox( NULL, "不明な例外が発生しました。", "MkImgPage Error", MB_ICONERROR | MB_OK ); | |
262 | + return E_FAIL; | |
263 | + } | |
264 | +} | |
265 | + | |
266 | +// CMkImgPage | |
267 | + |
@@ -0,0 +1,86 @@ | ||
1 | +#pragma once | |
2 | + | |
3 | +#include "ItemSelectDlg.h" | |
4 | + | |
5 | +#include <map> | |
6 | +#include <list> | |
7 | + | |
8 | +class ItemInfo | |
9 | +{ | |
10 | +public: | |
11 | + ItemInfo() | |
12 | + : itemtype_( ItemType::ITEMTYPE_NONE ) | |
13 | + { | |
14 | + } | |
15 | + | |
16 | + ItemInfo( const ItemInfo& v_other ) | |
17 | + : itemtype_( v_other.itemtype_ ) | |
18 | + , item_( v_other.item_ ) | |
19 | + { | |
20 | + } | |
21 | + | |
22 | + ~ItemInfo() | |
23 | + { | |
24 | + } | |
25 | + | |
26 | + ItemInfo& operator=( const ItemInfo& v_other ) | |
27 | + { | |
28 | + itemtype_ = v_other.itemtype_; | |
29 | + item_ = v_other.item_; | |
30 | + } | |
31 | + | |
32 | + enum ItemType | |
33 | + { | |
34 | + ITEMTYPE_NONE, | |
35 | + ITEMTYPE_LINKED_IMAGE, | |
36 | + ITEMTYPE_LINKED_HTML, | |
37 | + ITEMTYPE_IMAGE | |
38 | + }; | |
39 | + | |
40 | + void setItemType( ItemType v_itemtype ) | |
41 | + { | |
42 | + itemtype_ = v_itemtype; | |
43 | + } | |
44 | + | |
45 | + void setItem( const CString& v_item ) | |
46 | + { | |
47 | + item_ = v_item; | |
48 | + } | |
49 | + | |
50 | + ItemType getItemType() const | |
51 | + { | |
52 | + return itemtype_; | |
53 | + } | |
54 | + | |
55 | + CString getItem() const | |
56 | + { | |
57 | + return item_; | |
58 | + } | |
59 | + | |
60 | +protected: | |
61 | + | |
62 | + ItemType itemtype_; | |
63 | + CString item_; | |
64 | + | |
65 | +}; | |
66 | + | |
67 | +class CDocumentParser : | |
68 | + public std::list<ItemInfo> | |
69 | +{ | |
70 | +public: | |
71 | + CDocumentParser( const CItemSelectInfo& v_selectInfo ); | |
72 | + virtual ~CDocumentParser(void); | |
73 | + | |
74 | + HRESULT parse( IHTMLDocument2* v_pDoc ); | |
75 | + | |
76 | +protected: | |
77 | + | |
78 | + HRESULT parseFrame( IHTMLDocument2* v_pDoc ); | |
79 | + | |
80 | + HRESULT parseDocument( IHTMLDocument2* v_pDoc ); | |
81 | + | |
82 | +protected: | |
83 | + | |
84 | + const CItemSelectInfo& selectInfo_; | |
85 | + | |
86 | +}; |
@@ -0,0 +1,38 @@ | ||
1 | +// MkImgPage.cpp : DLL エクスポートの実装です。 | |
2 | + | |
3 | +#include "stdafx.h" | |
4 | +#include "resource.h" | |
5 | + | |
6 | +// このモジュール属性は、DllMain、DllRegisterServer および DllUnregisterServer を自動的に実装します。 | |
7 | +[ module(dll, uuid = "{9B0EB08D-A810-4F7C-9081-6B65F86CB706}", | |
8 | + name = "MkImgPage", | |
9 | + helpstring = "MkImgPage 1.0 タイプ ライブラリ", | |
10 | + resource_name = "IDR_MKIMGPAGE") ] | |
11 | +class CMkImgPageModule | |
12 | +{ | |
13 | +public: | |
14 | + BOOL WINAPI DllMain(DWORD dwReason, LPVOID lpReserved) throw( ) | |
15 | + { | |
16 | + return __super::DllMain(dwReason, lpReserved); | |
17 | + } | |
18 | + | |
19 | + HRESULT DllRegisterServer(BOOL bRegTypeLib = TRUE) throw() | |
20 | + { | |
21 | + HRESULT hr; | |
22 | + if( SUCCEEDED( hr = UpdateRegistryFromResource( IDR_IEEXTENSION, TRUE ) ) ) { | |
23 | + hr = __super::DllRegisterServer( bRegTypeLib ); | |
24 | + } | |
25 | + return hr; | |
26 | + } | |
27 | + | |
28 | + HRESULT DllUnregisterServer(BOOL bUnRegTypeLib = TRUE) throw() | |
29 | + { | |
30 | + HRESULT hr; | |
31 | + if( SUCCEEDED( hr = UpdateRegistryFromResource( IDR_IEEXTENSION, FALSE ) ) ) { | |
32 | + hr = __super::DllUnregisterServer( bUnRegTypeLib ); | |
33 | + } | |
34 | + return hr; | |
35 | + } | |
36 | + | |
37 | +}; | |
38 | + |
@@ -0,0 +1,220 @@ | ||
1 | + | |
2 | + | |
3 | +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ | |
4 | + | |
5 | + | |
6 | + /* File created by MIDL compiler version 6.00.0361 */ | |
7 | +/* at Sun Sep 04 16:54:05 2005 | |
8 | + */ | |
9 | +/* Compiler settings for _MkImgPage.idl: | |
10 | + Oicf, W1, Zp8, env=Win32 (32b run) | |
11 | + protocol : dce , ms_ext, c_ext, robust | |
12 | + error checks: allocation ref bounds_check enum stub_data | |
13 | + VC __declspec() decoration level: | |
14 | + __declspec(uuid()), __declspec(selectany), __declspec(novtable) | |
15 | + DECLSPEC_UUID(), MIDL_INTERFACE() | |
16 | +*/ | |
17 | +//@@MIDL_FILE_HEADING( ) | |
18 | + | |
19 | +#pragma warning( disable: 4049 ) /* more than 64k source lines */ | |
20 | + | |
21 | + | |
22 | +/* verify that the <rpcndr.h> version is high enough to compile this file*/ | |
23 | +#ifndef __REQUIRED_RPCNDR_H_VERSION__ | |
24 | +#define __REQUIRED_RPCNDR_H_VERSION__ 475 | |
25 | +#endif | |
26 | + | |
27 | +#include "rpc.h" | |
28 | +#include "rpcndr.h" | |
29 | + | |
30 | +#ifndef __RPCNDR_H_VERSION__ | |
31 | +#error this stub requires an updated version of <rpcndr.h> | |
32 | +#endif // __RPCNDR_H_VERSION__ | |
33 | + | |
34 | +#ifndef COM_NO_WINDOWS_H | |
35 | +#include "windows.h" | |
36 | +#include "ole2.h" | |
37 | +#endif /*COM_NO_WINDOWS_H*/ | |
38 | + | |
39 | +#ifndef ___MkImgPage_h__ | |
40 | +#define ___MkImgPage_h__ | |
41 | + | |
42 | +#if defined(_MSC_VER) && (_MSC_VER >= 1020) | |
43 | +#pragma once | |
44 | +#endif | |
45 | + | |
46 | +/* Forward Declarations */ | |
47 | + | |
48 | +#ifndef __IMkImgPage_FWD_DEFINED__ | |
49 | +#define __IMkImgPage_FWD_DEFINED__ | |
50 | +typedef interface IMkImgPage IMkImgPage; | |
51 | +#endif /* __IMkImgPage_FWD_DEFINED__ */ | |
52 | + | |
53 | + | |
54 | +#ifndef __CMkImgPage_FWD_DEFINED__ | |
55 | +#define __CMkImgPage_FWD_DEFINED__ | |
56 | + | |
57 | +#ifdef __cplusplus | |
58 | +typedef class CMkImgPage CMkImgPage; | |
59 | +#else | |
60 | +typedef struct CMkImgPage CMkImgPage; | |
61 | +#endif /* __cplusplus */ | |
62 | + | |
63 | +#endif /* __CMkImgPage_FWD_DEFINED__ */ | |
64 | + | |
65 | + | |
66 | +/* header files for imported files */ | |
67 | +#include "prsht.h" | |
68 | +#include "mshtml.h" | |
69 | +#include "mshtmhst.h" | |
70 | +#include "exdisp.h" | |
71 | +#include "objsafe.h" | |
72 | +#include "shldisp.h" | |
73 | + | |
74 | +#ifdef __cplusplus | |
75 | +extern "C"{ | |
76 | +#endif | |
77 | + | |
78 | +void * __RPC_USER MIDL_user_allocate(size_t); | |
79 | +void __RPC_USER MIDL_user_free( void * ); | |
80 | + | |
81 | +#ifndef __IMkImgPage_INTERFACE_DEFINED__ | |
82 | +#define __IMkImgPage_INTERFACE_DEFINED__ | |
83 | + | |
84 | +/* interface IMkImgPage */ | |
85 | +/* [unique][helpstring][dual][uuid][object] */ | |
86 | + | |
87 | + | |
88 | +EXTERN_C const IID IID_IMkImgPage; | |
89 | + | |
90 | +#if defined(__cplusplus) && !defined(CINTERFACE) | |
91 | + | |
92 | + MIDL_INTERFACE("547BE647-9CF0-4AE7-96D9-22DDED3FC88F") | |
93 | + IMkImgPage : public IDispatch | |
94 | + { | |
95 | + public: | |
96 | + }; | |
97 | + | |
98 | +#else /* C style interface */ | |
99 | + | |
100 | + typedef struct IMkImgPageVtbl | |
101 | + { | |
102 | + BEGIN_INTERFACE | |
103 | + | |
104 | + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( | |
105 | + IMkImgPage * This, | |
106 | + /* [in] */ REFIID riid, | |
107 | + /* [iid_is][out] */ void **ppvObject); | |
108 | + | |
109 | + ULONG ( STDMETHODCALLTYPE *AddRef )( | |
110 | + IMkImgPage * This); | |
111 | + | |
112 | + ULONG ( STDMETHODCALLTYPE *Release )( | |
113 | + IMkImgPage * This); | |
114 | + | |
115 | + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( | |
116 | + IMkImgPage * This, | |
117 | + /* [out] */ UINT *pctinfo); | |
118 | + | |
119 | + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( | |
120 | + IMkImgPage * This, | |
121 | + /* [in] */ UINT iTInfo, | |
122 | + /* [in] */ LCID lcid, | |
123 | + /* [out] */ ITypeInfo **ppTInfo); | |
124 | + | |
125 | + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( | |
126 | + IMkImgPage * This, | |
127 | + /* [in] */ REFIID riid, | |
128 | + /* [size_is][in] */ LPOLESTR *rgszNames, | |
129 | + /* [in] */ UINT cNames, | |
130 | + /* [in] */ LCID lcid, | |
131 | + /* [size_is][out] */ DISPID *rgDispId); | |
132 | + | |
133 | + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( | |
134 | + IMkImgPage * This, | |
135 | + /* [in] */ DISPID dispIdMember, | |
136 | + /* [in] */ REFIID riid, | |
137 | + /* [in] */ LCID lcid, | |
138 | + /* [in] */ WORD wFlags, | |
139 | + /* [out][in] */ DISPPARAMS *pDispParams, | |
140 | + /* [out] */ VARIANT *pVarResult, | |
141 | + /* [out] */ EXCEPINFO *pExcepInfo, | |
142 | + /* [out] */ UINT *puArgErr); | |
143 | + | |
144 | + END_INTERFACE | |
145 | + } IMkImgPageVtbl; | |
146 | + | |
147 | + interface IMkImgPage | |
148 | + { | |
149 | + CONST_VTBL struct IMkImgPageVtbl *lpVtbl; | |
150 | + }; | |
151 | + | |
152 | + | |
153 | + | |
154 | +#ifdef COBJMACROS | |
155 | + | |
156 | + | |
157 | +#define IMkImgPage_QueryInterface(This,riid,ppvObject) \ | |
158 | + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) | |
159 | + | |
160 | +#define IMkImgPage_AddRef(This) \ | |
161 | + (This)->lpVtbl -> AddRef(This) | |
162 | + | |
163 | +#define IMkImgPage_Release(This) \ | |
164 | + (This)->lpVtbl -> Release(This) | |
165 | + | |
166 | + | |
167 | +#define IMkImgPage_GetTypeInfoCount(This,pctinfo) \ | |
168 | + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) | |
169 | + | |
170 | +#define IMkImgPage_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ | |
171 | + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) | |
172 | + | |
173 | +#define IMkImgPage_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ | |
174 | + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) | |
175 | + | |
176 | +#define IMkImgPage_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ | |
177 | + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) | |
178 | + | |
179 | + | |
180 | +#endif /* COBJMACROS */ | |
181 | + | |
182 | + | |
183 | +#endif /* C style interface */ | |
184 | + | |
185 | + | |
186 | + | |
187 | + | |
188 | +#endif /* __IMkImgPage_INTERFACE_DEFINED__ */ | |
189 | + | |
190 | + | |
191 | + | |
192 | +#ifndef __MkImgPage_LIBRARY_DEFINED__ | |
193 | +#define __MkImgPage_LIBRARY_DEFINED__ | |
194 | + | |
195 | +/* library MkImgPage */ | |
196 | +/* [helpstring][uuid][version] */ | |
197 | + | |
198 | + | |
199 | +EXTERN_C const IID LIBID_MkImgPage; | |
200 | + | |
201 | +EXTERN_C const CLSID CLSID_CMkImgPage; | |
202 | + | |
203 | +#ifdef __cplusplus | |
204 | + | |
205 | +class DECLSPEC_UUID("23B340AA-97B4-4AEB-870E-0D9A01CB6BEE") | |
206 | +CMkImgPage; | |
207 | +#endif | |
208 | +#endif /* __MkImgPage_LIBRARY_DEFINED__ */ | |
209 | + | |
210 | +/* Additional Prototypes for ALL interfaces */ | |
211 | + | |
212 | +/* end of Additional Prototypes */ | |
213 | + | |
214 | +#ifdef __cplusplus | |
215 | +} | |
216 | +#endif | |
217 | + | |
218 | +#endif | |
219 | + | |
220 | + |
@@ -0,0 +1,78 @@ | ||
1 | +// MkImgPageCom.h : CMkImgPage の宣言 | |
2 | + | |
3 | +#pragma once | |
4 | +#include "resource.h" // メイン シンボル | |
5 | + | |
6 | +#include "ItemSelectDlg.h" | |
7 | + | |
8 | +#include <Shlguid.h> | |
9 | +#include <atlconv.h> | |
10 | + | |
11 | +#include <list> | |
12 | + | |
13 | +// IMkImgPage | |
14 | +[ | |
15 | + object, | |
16 | + uuid("547BE647-9CF0-4AE7-96D9-22DDED3FC88F"), | |
17 | + dual, helpstring("IMkImgPage インターフェイス"), | |
18 | + pointer_default(unique) | |
19 | +] | |
20 | +__interface IMkImgPage : IDispatch | |
21 | +{ | |
22 | +}; | |
23 | + | |
24 | + | |
25 | + | |
26 | +// CMkImgPage | |
27 | + | |
28 | +[ | |
29 | + coclass, | |
30 | + threading("apartment"), | |
31 | + vi_progid("seraphyware.MkImgPage"), | |
32 | + progid("seraphyware.MkImgPage.1"), | |
33 | + version(1.0), | |
34 | + uuid("23B340AA-97B4-4AEB-870E-0D9A01CB6BEE"), | |
35 | + helpstring("MkImgPage Class") | |
36 | +] | |
37 | +class ATL_NO_VTABLE CMkImgPage : | |
38 | + public IObjectWithSiteImpl<CMkImgPage>, | |
39 | + public IOleCommandTarget, | |
40 | + public IMkImgPage | |
41 | +{ | |
42 | +public: | |
43 | + CMkImgPage() | |
44 | + { | |
45 | + } | |
46 | + | |
47 | + STDMETHOD(QueryStatus)( | |
48 | + const GUID *pguidCmdGroup, // Pointer to command group | |
49 | + ULONG cCmds, // Number of commands in prgCmds array | |
50 | + OLECMD *prgCmds, // Array of commands | |
51 | + OLECMDTEXT *pCmdText // Pointer to name or status of command | |
52 | + ); | |
53 | + | |
54 | + STDMETHOD(Exec)( | |
55 | + const GUID *pguidCmdGroup, // Pointer to command group | |
56 | + DWORD nCmdID, // Identifier of command to execute | |
57 | + DWORD nCmdExecOpt, // Options for executing the command | |
58 | + VARIANTARG *pvaIn, // Pointer to input arguments | |
59 | + VARIANTARG *pvaOut // Pointer to command output | |
60 | + ); | |
61 | + | |
62 | + DECLARE_PROTECT_FINAL_CONSTRUCT() | |
63 | + | |
64 | + HRESULT FinalConstruct() | |
65 | + { | |
66 | + return S_OK; | |
67 | + } | |
68 | + | |
69 | + void FinalRelease(); | |
70 | + | |
71 | +protected: | |
72 | + typedef std::list<CString> CStringList; | |
73 | + CStringList temp_paths; | |
74 | + | |
75 | +public: | |
76 | + | |
77 | +}; | |
78 | + |
@@ -0,0 +1,38 @@ | ||
1 | +/********************************************************* | |
2 | + DllData file -- generated by MIDL compiler | |
3 | + | |
4 | + DO NOT ALTER THIS FILE | |
5 | + | |
6 | + This file is regenerated by MIDL on every IDL file compile. | |
7 | + | |
8 | + To completely reconstruct this file, delete it and rerun MIDL | |
9 | + on all the IDL files in this DLL, specifying this file for the | |
10 | + /dlldata command line option | |
11 | + | |
12 | +*********************************************************/ | |
13 | + | |
14 | +#define PROXY_DELEGATION | |
15 | + | |
16 | +#include <rpcproxy.h> | |
17 | + | |
18 | +#ifdef __cplusplus | |
19 | +extern "C" { | |
20 | +#endif | |
21 | + | |
22 | +EXTERN_PROXY_FILE( _MkImgPage ) | |
23 | + | |
24 | + | |
25 | +PROXYFILE_LIST_START | |
26 | +/* Start of list */ | |
27 | + REFERENCE_PROXY_FILE( _MkImgPage ), | |
28 | +/* End of list */ | |
29 | +PROXYFILE_LIST_END | |
30 | + | |
31 | + | |
32 | +DLLDATA_ROUTINES( aProxyFileList, GET_DLL_CLSID ) | |
33 | + | |
34 | +#ifdef __cplusplus | |
35 | +} /*extern "C" */ | |
36 | +#endif | |
37 | + | |
38 | +/* end of generated dlldata file */ |
@@ -0,0 +1,90 @@ | ||
1 | + | |
2 | + | |
3 | +/* this ALWAYS GENERATED file contains the IIDs and CLSIDs */ | |
4 | + | |
5 | +/* link this file in with the server and any clients */ | |
6 | + | |
7 | + | |
8 | + /* File created by MIDL compiler version 6.00.0361 */ | |
9 | +/* at Sun Sep 04 16:54:05 2005 | |
10 | + */ | |
11 | +/* Compiler settings for _MkImgPage.idl: | |
12 | + Oicf, W1, Zp8, env=Win32 (32b run) | |
13 | + protocol : dce , ms_ext, c_ext, robust | |
14 | + error checks: allocation ref bounds_check enum stub_data | |
15 | + VC __declspec() decoration level: | |
16 | + __declspec(uuid()), __declspec(selectany), __declspec(novtable) | |
17 | + DECLSPEC_UUID(), MIDL_INTERFACE() | |
18 | +*/ | |
19 | +//@@MIDL_FILE_HEADING( ) | |
20 | + | |
21 | +#if !defined(_M_IA64) && !defined(_M_AMD64) | |
22 | + | |
23 | + | |
24 | +#pragma warning( disable: 4049 ) /* more than 64k source lines */ | |
25 | + | |
26 | + | |
27 | +#ifdef __cplusplus | |
28 | +extern "C"{ | |
29 | +#endif | |
30 | + | |
31 | + | |
32 | +#include <rpc.h> | |
33 | +#include <rpcndr.h> | |
34 | + | |
35 | +#ifdef _MIDL_USE_GUIDDEF_ | |
36 | + | |
37 | +#ifndef INITGUID | |
38 | +#define INITGUID | |
39 | +#include <guiddef.h> | |
40 | +#undef INITGUID | |
41 | +#else | |
42 | +#include <guiddef.h> | |
43 | +#endif | |
44 | + | |
45 | +#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \ | |
46 | + DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) | |
47 | + | |
48 | +#else // !_MIDL_USE_GUIDDEF_ | |
49 | + | |
50 | +#ifndef __IID_DEFINED__ | |
51 | +#define __IID_DEFINED__ | |
52 | + | |
53 | +typedef struct _IID | |
54 | +{ | |
55 | + unsigned long x; | |
56 | + unsigned short s1; | |
57 | + unsigned short s2; | |
58 | + unsigned char c[8]; | |
59 | +} IID; | |
60 | + | |
61 | +#endif // __IID_DEFINED__ | |
62 | + | |
63 | +#ifndef CLSID_DEFINED | |
64 | +#define CLSID_DEFINED | |
65 | +typedef IID CLSID; | |
66 | +#endif // CLSID_DEFINED | |
67 | + | |
68 | +#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \ | |
69 | + const type name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}} | |
70 | + | |
71 | +#endif !_MIDL_USE_GUIDDEF_ | |
72 | + | |
73 | +MIDL_DEFINE_GUID(IID, IID_IMkImgPage,0x547BE647,0x9CF0,0x4AE7,0x96,0xD9,0x22,0xDD,0xED,0x3F,0xC8,0x8F); | |
74 | + | |
75 | + | |
76 | +MIDL_DEFINE_GUID(IID, LIBID_MkImgPage,0x9B0EB08D,0xA810,0x4F7C,0x90,0x81,0x6B,0x65,0xF8,0x6C,0xB7,0x06); | |
77 | + | |
78 | + | |
79 | +MIDL_DEFINE_GUID(CLSID, CLSID_CMkImgPage,0x23B340AA,0x97B4,0x4AEB,0x87,0x0E,0x0D,0x9A,0x01,0xCB,0x6B,0xEE); | |
80 | + | |
81 | +#undef MIDL_DEFINE_GUID | |
82 | + | |
83 | +#ifdef __cplusplus | |
84 | +} | |
85 | +#endif | |
86 | + | |
87 | + | |
88 | + | |
89 | +#endif /* !defined(_M_IA64) && !defined(_M_AMD64)*/ | |
90 | + |
@@ -0,0 +1,268 @@ | ||
1 | + | |
2 | + | |
3 | +/* this ALWAYS GENERATED file contains the proxy stub code */ | |
4 | + | |
5 | + | |
6 | + /* File created by MIDL compiler version 6.00.0361 */ | |
7 | +/* at Sun Sep 04 16:54:05 2005 | |
8 | + */ | |
9 | +/* Compiler settings for _MkImgPage.idl: | |
10 | + Oicf, W1, Zp8, env=Win32 (32b run) | |
11 | + protocol : dce , ms_ext, c_ext, robust | |
12 | + error checks: allocation ref bounds_check enum stub_data | |
13 | + VC __declspec() decoration level: | |
14 | + __declspec(uuid()), __declspec(selectany), __declspec(novtable) | |
15 | + DECLSPEC_UUID(), MIDL_INTERFACE() | |
16 | +*/ | |
17 | +//@@MIDL_FILE_HEADING( ) | |
18 | + | |
19 | +#if !defined(_M_IA64) && !defined(_M_AMD64) | |
20 | + | |
21 | + | |
22 | +#pragma warning( disable: 4049 ) /* more than 64k source lines */ | |
23 | +#if _MSC_VER >= 1200 | |
24 | +#pragma warning(push) | |
25 | +#endif | |
26 | +#pragma warning( disable: 4100 ) /* unreferenced arguments in x86 call */ | |
27 | +#pragma warning( disable: 4211 ) /* redefine extent to static */ | |
28 | +#pragma warning( disable: 4232 ) /* dllimport identity*/ | |
29 | +#define USE_STUBLESS_PROXY | |
30 | + | |
31 | + | |
32 | +/* verify that the <rpcproxy.h> version is high enough to compile this file*/ | |
33 | +#ifndef __REDQ_RPCPROXY_H_VERSION__ | |
34 | +#define __REQUIRED_RPCPROXY_H_VERSION__ 475 | |
35 | +#endif | |
36 | + | |
37 | + | |
38 | +#include "rpcproxy.h" | |
39 | +#ifndef __RPCPROXY_H_VERSION__ | |
40 | +#error this stub requires an updated version of <rpcproxy.h> | |
41 | +#endif // __RPCPROXY_H_VERSION__ | |
42 | + | |
43 | + | |
44 | +#include "_MkImgPage.h" | |
45 | + | |
46 | +#define TYPE_FORMAT_STRING_SIZE 3 | |
47 | +#define PROC_FORMAT_STRING_SIZE 1 | |
48 | +#define TRANSMIT_AS_TABLE_SIZE 0 | |
49 | +#define WIRE_MARSHAL_TABLE_SIZE 0 | |
50 | + | |
51 | +typedef struct _MIDL_TYPE_FORMAT_STRING | |
52 | + { | |
53 | + short Pad; | |
54 | + unsigned char Format[ TYPE_FORMAT_STRING_SIZE ]; | |
55 | + } MIDL_TYPE_FORMAT_STRING; | |
56 | + | |
57 | +typedef struct _MIDL_PROC_FORMAT_STRING | |
58 | + { | |
59 | + short Pad; | |
60 | + unsigned char Format[ PROC_FORMAT_STRING_SIZE ]; | |
61 | + } MIDL_PROC_FORMAT_STRING; | |
62 | + | |
63 | + | |
64 | +static RPC_SYNTAX_IDENTIFIER _RpcTransferSyntax = | |
65 | +{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}}; | |
66 | + | |
67 | + | |
68 | +extern const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString; | |
69 | +extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString; | |
70 | + | |
71 | + | |
72 | +extern const MIDL_STUB_DESC Object_StubDesc; | |
73 | + | |
74 | + | |
75 | +extern const MIDL_SERVER_INFO IMkImgPage_ServerInfo; | |
76 | +extern const MIDL_STUBLESS_PROXY_INFO IMkImgPage_ProxyInfo; | |
77 | + | |
78 | + | |
79 | + | |
80 | +#if !defined(__RPC_WIN32__) | |
81 | +#error Invalid build platform for this stub. | |
82 | +#endif | |
83 | + | |
84 | +#if !(TARGET_IS_NT50_OR_LATER) | |
85 | +#error You need a Windows 2000 or later to run this stub because it uses these features: | |
86 | +#error /robust command line switch. | |
87 | +#error However, your C/C++ compilation flags indicate you intend to run this app on earlier systems. | |
88 | +#error This app will die there with the RPC_X_WRONG_STUB_VERSION error. | |
89 | +#endif | |
90 | + | |
91 | + | |
92 | +static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString = | |
93 | + { | |
94 | + 0, | |
95 | + { | |
96 | + | |
97 | + 0x0 | |
98 | + } | |
99 | + }; | |
100 | + | |
101 | +static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString = | |
102 | + { | |
103 | + 0, | |
104 | + { | |
105 | + NdrFcShort( 0x0 ), /* 0 */ | |
106 | + | |
107 | + 0x0 | |
108 | + } | |
109 | + }; | |
110 | + | |
111 | + | |
112 | +/* Object interface: IUnknown, ver. 0.0, | |
113 | + GUID={0x00000000,0x0000,0x0000,{0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}} */ | |
114 | + | |
115 | + | |
116 | +/* Object interface: IDispatch, ver. 0.0, | |
117 | + GUID={0x00020400,0x0000,0x0000,{0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}} */ | |
118 | + | |
119 | + | |
120 | +/* Object interface: IMkImgPage, ver. 0.0, | |
121 | + GUID={0x547BE647,0x9CF0,0x4AE7,{0x96,0xD9,0x22,0xDD,0xED,0x3F,0xC8,0x8F}} */ | |
122 | + | |
123 | +#pragma code_seg(".orpc") | |
124 | +static const unsigned short IMkImgPage_FormatStringOffsetTable[] = | |
125 | + { | |
126 | + (unsigned short) -1, | |
127 | + (unsigned short) -1, | |
128 | + (unsigned short) -1, | |
129 | + (unsigned short) -1, | |
130 | + 0 | |
131 | + }; | |
132 | + | |
133 | +static const MIDL_STUBLESS_PROXY_INFO IMkImgPage_ProxyInfo = | |
134 | + { | |
135 | + &Object_StubDesc, | |
136 | + __MIDL_ProcFormatString.Format, | |
137 | + &IMkImgPage_FormatStringOffsetTable[-3], | |
138 | + 0, | |
139 | + 0, | |
140 | + 0 | |
141 | + }; | |
142 | + | |
143 | + | |
144 | +static const MIDL_SERVER_INFO IMkImgPage_ServerInfo = | |
145 | + { | |
146 | + &Object_StubDesc, | |
147 | + 0, | |
148 | + __MIDL_ProcFormatString.Format, | |
149 | + &IMkImgPage_FormatStringOffsetTable[-3], | |
150 | + 0, | |
151 | + 0, | |
152 | + 0, | |
153 | + 0}; | |
154 | +CINTERFACE_PROXY_VTABLE(7) _IMkImgPageProxyVtbl = | |
155 | +{ | |
156 | + 0, | |
157 | + &IID_IMkImgPage, | |
158 | + IUnknown_QueryInterface_Proxy, | |
159 | + IUnknown_AddRef_Proxy, | |
160 | + IUnknown_Release_Proxy , | |
161 | + 0 /* (void *) (INT_PTR) -1 /* IDispatch::GetTypeInfoCount */ , | |
162 | + 0 /* (void *) (INT_PTR) -1 /* IDispatch::GetTypeInfo */ , | |
163 | + 0 /* (void *) (INT_PTR) -1 /* IDispatch::GetIDsOfNames */ , | |
164 | + 0 /* IDispatch_Invoke_Proxy */ | |
165 | +}; | |
166 | + | |
167 | + | |
168 | +static const PRPC_STUB_FUNCTION IMkImgPage_table[] = | |
169 | +{ | |
170 | + STUB_FORWARDING_FUNCTION, | |
171 | + STUB_FORWARDING_FUNCTION, | |
172 | + STUB_FORWARDING_FUNCTION, | |
173 | + STUB_FORWARDING_FUNCTION | |
174 | +}; | |
175 | + | |
176 | +CInterfaceStubVtbl _IMkImgPageStubVtbl = | |
177 | +{ | |
178 | + &IID_IMkImgPage, | |
179 | + &IMkImgPage_ServerInfo, | |
180 | + 7, | |
181 | + &IMkImgPage_table[-3], | |
182 | + CStdStubBuffer_DELEGATING_METHODS | |
183 | +}; | |
184 | + | |
185 | +static const MIDL_STUB_DESC Object_StubDesc = | |
186 | + { | |
187 | + 0, | |
188 | + NdrOleAllocate, | |
189 | + NdrOleFree, | |
190 | + 0, | |
191 | + 0, | |
192 | + 0, | |
193 | + 0, | |
194 | + 0, | |
195 | + __MIDL_TypeFormatString.Format, | |
196 | + 1, /* -error bounds_check flag */ | |
197 | + 0x50002, /* Ndr library version */ | |
198 | + 0, | |
199 | + 0x6000169, /* MIDL Version 6.0.361 */ | |
200 | + 0, | |
201 | + 0, | |
202 | + 0, /* notify & notify_flag routine table */ | |
203 | + 0x1, /* MIDL flag */ | |
204 | + 0, /* cs routines */ | |
205 | + 0, /* proxy/server info */ | |
206 | + 0 /* Reserved5 */ | |
207 | + }; | |
208 | + | |
209 | +const CInterfaceProxyVtbl * __MkImgPage_ProxyVtblList[] = | |
210 | +{ | |
211 | + ( CInterfaceProxyVtbl *) &_IMkImgPageProxyVtbl, | |
212 | + 0 | |
213 | +}; | |
214 | + | |
215 | +const CInterfaceStubVtbl * __MkImgPage_StubVtblList[] = | |
216 | +{ | |
217 | + ( CInterfaceStubVtbl *) &_IMkImgPageStubVtbl, | |
218 | + 0 | |
219 | +}; | |
220 | + | |
221 | +PCInterfaceName const __MkImgPage_InterfaceNamesList[] = | |
222 | +{ | |
223 | + "IMkImgPage", | |
224 | + 0 | |
225 | +}; | |
226 | + | |
227 | +const IID * __MkImgPage_BaseIIDList[] = | |
228 | +{ | |
229 | + &IID_IDispatch, | |
230 | + 0 | |
231 | +}; | |
232 | + | |
233 | + | |
234 | +#define __MkImgPage_CHECK_IID(n) IID_GENERIC_CHECK_IID( __MkImgPage, pIID, n) | |
235 | + | |
236 | +int __stdcall __MkImgPage_IID_Lookup( const IID * pIID, int * pIndex ) | |
237 | +{ | |
238 | + | |
239 | + if(!__MkImgPage_CHECK_IID(0)) | |
240 | + { | |
241 | + *pIndex = 0; | |
242 | + return 1; | |
243 | + } | |
244 | + | |
245 | + return 0; | |
246 | +} | |
247 | + | |
248 | +const ExtendedProxyFileInfo _MkImgPage_ProxyFileInfo = | |
249 | +{ | |
250 | + (PCInterfaceProxyVtblList *) & __MkImgPage_ProxyVtblList, | |
251 | + (PCInterfaceStubVtblList *) & __MkImgPage_StubVtblList, | |
252 | + (const PCInterfaceName * ) & __MkImgPage_InterfaceNamesList, | |
253 | + (const IID ** ) & __MkImgPage_BaseIIDList, | |
254 | + & __MkImgPage_IID_Lookup, | |
255 | + 1, | |
256 | + 2, | |
257 | + 0, /* table of [async_uuid] interfaces */ | |
258 | + 0, /* Filler1 */ | |
259 | + 0, /* Filler2 */ | |
260 | + 0 /* Filler3 */ | |
261 | +}; | |
262 | +#if _MSC_VER >= 1200 | |
263 | +#pragma warning(pop) | |
264 | +#endif | |
265 | + | |
266 | + | |
267 | +#endif /* !defined(_M_IA64) && !defined(_M_AMD64)*/ | |
268 | + |
@@ -0,0 +1,383 @@ | ||
1 | +#include "StdAfx.h" | |
2 | +#include ".\itemselectdlg.h" | |
3 | + | |
4 | +#include <shlobj.h> | |
5 | + | |
6 | +CItemSelectDlg::CItemSelectDlg(void) | |
7 | +{ | |
8 | + load_setting(); | |
9 | +} | |
10 | + | |
11 | +CItemSelectDlg::~CItemSelectDlg(void) | |
12 | +{ | |
13 | +} | |
14 | + | |
15 | +void CItemSelectDlg::load_setting() | |
16 | +{ | |
17 | + HKEY context = NULL; | |
18 | + if( ERROR_SUCCESS != RegOpenKeyEx( HKEY_CURRENT_USER, "Software\\MkImgPage", 0, KEY_ALL_ACCESS, &context ) ) { | |
19 | + return; | |
20 | + } | |
21 | + | |
22 | + TCHAR buffer[ MAX_PATH ]; | |
23 | + DWORD temp; | |
24 | + DWORD len; | |
25 | + | |
26 | + len = MAX_PATH; | |
27 | + if( ERROR_SUCCESS == RegQueryValueEx( context, _TEXT("temp_path"), NULL, NULL, (BYTE*) buffer, &len ) ) { | |
28 | + temp_path_ = buffer; | |
29 | + } | |
30 | + | |
31 | + len = sizeof( DWORD ); | |
32 | + if( ERROR_SUCCESS == RegQueryValueEx( context, _TEXT("select_linked_image"), NULL, NULL, (BYTE*) &temp, &len ) ) { | |
33 | + select_linked_image_ = ( temp != 0 ); | |
34 | + } | |
35 | + | |
36 | + len = sizeof( DWORD ); | |
37 | + if( ERROR_SUCCESS == RegQueryValueEx( context, _TEXT("select_linked_html"), NULL, NULL, (BYTE*) &temp, &len ) ) { | |
38 | + select_linked_html_ = ( temp != 0 ); | |
39 | + } | |
40 | + | |
41 | + len = sizeof( DWORD ); | |
42 | + if( ERROR_SUCCESS == RegQueryValueEx( context, _TEXT("select_image"), NULL, NULL, (BYTE*) &temp, &len ) ) { | |
43 | + select_image_ = ( temp != 0 ); | |
44 | + } | |
45 | + | |
46 | + len = sizeof( DWORD ); | |
47 | + if( ERROR_SUCCESS == RegQueryValueEx( context, _TEXT("save_mode"), NULL, NULL, (BYTE*) &temp, &len ) ) { | |
48 | + save_mode_ = (int) temp; | |
49 | + } | |
50 | + | |
51 | + len = sizeof( DWORD ); | |
52 | + if( ERROR_SUCCESS == RegQueryValueEx( context, _TEXT("open_mode"), NULL, NULL, (BYTE*) &temp, &len ) ) { | |
53 | + open_mode_ = (int) temp; | |
54 | + } | |
55 | + | |
56 | + len = sizeof( DWORD ); | |
57 | + if( ERROR_SUCCESS == RegQueryValueEx( context, _TEXT("make_temp_name"), NULL, NULL, (BYTE*) &temp, &len ) ) { | |
58 | + temp_name_ = ( temp != 0 ); | |
59 | + } | |
60 | + | |
61 | + len = sizeof( DWORD ); | |
62 | + if( ERROR_SUCCESS == RegQueryValueEx( context, _TEXT("use_item_limit"), NULL, NULL, (BYTE*) &temp, &len ) ) { | |
63 | + use_item_limit_ = ( temp != 0 ); | |
64 | + } | |
65 | + | |
66 | + len = sizeof( DWORD ); | |
67 | + if( ERROR_SUCCESS == RegQueryValueEx( context, _TEXT("item_limit"), NULL, NULL, (BYTE*) &temp, &len ) ) { | |
68 | + item_limit_ = (int) temp; | |
69 | + } | |
70 | + | |
71 | + len = sizeof( DWORD ); | |
72 | + if( ERROR_SUCCESS == RegQueryValueEx( context, _TEXT("item_start"), NULL, NULL, (BYTE*) &temp, &len ) ) { | |
73 | + item_start_ = (int) temp; | |
74 | + } | |
75 | + | |
76 | + len = sizeof( DWORD ); | |
77 | + if( ERROR_SUCCESS == RegQueryValueEx( context, _TEXT("use_image_size"), NULL, NULL, (BYTE*) &temp, &len ) ) { | |
78 | + use_image_size_ = ( temp != 0 ); | |
79 | + } | |
80 | + | |
81 | + len = sizeof( DWORD ); | |
82 | + if( ERROR_SUCCESS == RegQueryValueEx( context, _TEXT("image_size_width"), NULL, NULL, (BYTE*) &temp, &len ) ) { | |
83 | + image_size_width_ = (int) temp; | |
84 | + } | |
85 | + | |
86 | + len = sizeof( DWORD ); | |
87 | + if( ERROR_SUCCESS == RegQueryValueEx( context, _TEXT("image_size_height"), NULL, NULL, (BYTE*) &temp, &len ) ) { | |
88 | + image_size_height_ = (int) temp; | |
89 | + } | |
90 | + | |
91 | + len = sizeof( DWORD ); | |
92 | + if( ERROR_SUCCESS == RegQueryValueEx( context, _TEXT("use_linked_url"), NULL, NULL, (BYTE*) &temp, &len ) ) { | |
93 | + use_linked_url_ = ( temp != 0 ); | |
94 | + } | |
95 | + | |
96 | + RegCloseKey( context ); | |
97 | +} | |
98 | + | |
99 | +void CItemSelectDlg::save_setting() | |
100 | +{ | |
101 | + HKEY context = NULL; | |
102 | + if( ERROR_SUCCESS != RegCreateKeyEx( | |
103 | + HKEY_CURRENT_USER, | |
104 | + "Software\\MkImgPage", | |
105 | + 0, | |
106 | + NULL, | |
107 | + REG_OPTION_NON_VOLATILE, | |
108 | + KEY_ALL_ACCESS, | |
109 | + NULL, | |
110 | + &context, | |
111 | + NULL | |
112 | + ) ) | |
113 | + { | |
114 | + return; | |
115 | + } | |
116 | + | |
117 | + DWORD tmp; | |
118 | + | |
119 | + RegSetValueEx( context, _TEXT("temp_path"), NULL, REG_SZ, (BYTE*)(LPCTSTR) temp_path_, temp_path_.GetLength() + 1 ); | |
120 | + | |
121 | + tmp = select_linked_image_ ? 1 : 0; | |
122 | + RegSetValueEx( context, _TEXT("select_linked_image"), NULL, REG_DWORD, (BYTE*) &tmp, sizeof(DWORD) ); | |
123 | + | |
124 | + tmp = select_linked_html_ ? 1 : 0; | |
125 | + RegSetValueEx( context, _TEXT("select_linked_html"), NULL, REG_DWORD, (BYTE*) &tmp, sizeof(DWORD) ); | |
126 | + | |
127 | + tmp = select_image_ ? 1 : 0; | |
128 | + RegSetValueEx( context, _TEXT("select_image"), NULL, REG_DWORD, (BYTE*) &tmp, sizeof(DWORD) ); | |
129 | + | |
130 | + tmp = (DWORD) save_mode_; | |
131 | + RegSetValueEx( context, _TEXT("save_mode"), NULL, REG_DWORD, (BYTE*) &tmp, sizeof(DWORD) ); | |
132 | + | |
133 | + tmp = (DWORD) open_mode_; | |
134 | + RegSetValueEx( context, _TEXT("open_mode"), NULL, REG_DWORD, (BYTE*) &tmp, sizeof(DWORD) ); | |
135 | + | |
136 | + tmp = temp_name_ ? 1 : 0; | |
137 | + RegSetValueEx( context, _TEXT("make_temp_name"), NULL, REG_DWORD, (BYTE*) &tmp, sizeof(DWORD) ); | |
138 | + | |
139 | + tmp = use_item_limit_ ? 1 : 0; | |
140 | + RegSetValueEx( context, _TEXT("use_item_limit"), NULL, REG_DWORD, (BYTE*) &tmp, sizeof(DWORD) ); | |
141 | + | |
142 | + tmp = (DWORD) item_limit_; | |
143 | + RegSetValueEx( context, _TEXT("item_limit"), NULL, REG_DWORD, (BYTE*) &tmp, sizeof(DWORD) ); | |
144 | + | |
145 | + tmp = (DWORD) item_start_; | |
146 | + RegSetValueEx( context, _TEXT("item_start"), NULL, REG_DWORD, (BYTE*) &tmp, sizeof(DWORD) ); | |
147 | + | |
148 | + tmp = use_image_size_ ? 1 : 0; | |
149 | + RegSetValueEx( context, _TEXT("use_image_size"), NULL, REG_DWORD, (BYTE*) &tmp, sizeof(DWORD) ); | |
150 | + | |
151 | + tmp = (DWORD) image_size_width_; | |
152 | + RegSetValueEx( context, _TEXT("image_size_width"), NULL, REG_DWORD, (BYTE*) &tmp, sizeof(DWORD) ); | |
153 | + | |
154 | + tmp = (DWORD) image_size_height_; | |
155 | + RegSetValueEx( context, _TEXT("image_size_height"), NULL, REG_DWORD, (BYTE*) &tmp, sizeof(DWORD) ); | |
156 | + | |
157 | + tmp = use_linked_url_ ? 1 : 0; | |
158 | + RegSetValueEx( context, _TEXT("use_linked_url"), NULL, REG_DWORD, (BYTE*) &tmp, sizeof(DWORD) ); | |
159 | + | |
160 | + RegCloseKey( context ); | |
161 | +} | |
162 | + | |
163 | +LRESULT CItemSelectDlg::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) | |
164 | +{ | |
165 | + CString tmp; | |
166 | + | |
167 | + tmp.LoadString( IDS_DDLIST_OPEN_MODE ); | |
168 | + | |
169 | + int st = 0; | |
170 | + for(;;) { | |
171 | + int fp = tmp.Find( ";", st ); | |
172 | + if( fp == -1 ) { | |
173 | + GetDlgItem( IDC_OPEN_MODE ).SendMessage( CB_ADDSTRING, 0, (LPARAM)(LPCTSTR) tmp.Mid( st ) ); | |
174 | + break; | |
175 | + } | |
176 | + GetDlgItem( IDC_OPEN_MODE ).SendMessage( CB_ADDSTRING, 0, (LPARAM)(LPCTSTR) tmp.Mid( st, fp - st ) ); | |
177 | + st = fp + 1; | |
178 | + } | |
179 | + GetDlgItem( IDC_OPEN_MODE ).SendMessage( CB_SETCURSEL, open_mode_, 0 ); | |
180 | + | |
181 | + SetDlgItemText( IDC_FOLDER, temp_path_ ); | |
182 | + | |
183 | + CheckDlgButton( IDC_SELECT_LINKED_IMAGE, select_linked_image_ ? BST_CHECKED : BST_UNCHECKED ); | |
184 | + CheckDlgButton( IDC_SELECT_LINKED_HTML, select_linked_html_ ? BST_CHECKED : BST_UNCHECKED ); | |
185 | + CheckDlgButton( IDC_SELECT_IMAGE, select_image_ ? BST_CHECKED : BST_UNCHECKED ); | |
186 | + | |
187 | + CheckRadioButton( IDC_CREATE_VIRTUAL, IDC_CREATE_REAL, save_mode_ == 1 ? IDC_CREATE_REAL : IDC_CREATE_VIRTUAL ); | |
188 | + | |
189 | + CheckDlgButton( IDC_USE_IMAGE_SIZE, use_image_size_ ? BST_CHECKED : BST_UNCHECKED ); | |
190 | + | |
191 | + tmp.Format( "%d", image_size_width_ ); | |
192 | + SetDlgItemText( IDC_IMAGE_WIDTH, tmp ); | |
193 | + | |
194 | + tmp.Format( "%d", image_size_width_ ); | |
195 | + SetDlgItemText( IDC_IMAGE_HEIGHT, tmp ); | |
196 | + | |
197 | + | |
198 | + CheckDlgButton( IDC_USE_ITEM_LIMIT, use_item_limit_ ? BST_CHECKED : BST_UNCHECKED ); | |
199 | + | |
200 | + tmp.Format( "%d", item_start_ ); | |
201 | + SetDlgItemText( IDC_ITEM_START, tmp ); | |
202 | + | |
203 | + tmp.Format( "%d", item_limit_ ); | |
204 | + SetDlgItemText( IDC_ITEM_LIMIT, tmp ); | |
205 | + | |
206 | + SetDlgItemText( IDC_LINKED_URL, linked_url_ ); | |
207 | + | |
208 | + | |
209 | + CheckDlgButton( IDC_NAME_AUTO, temp_name_ ? BST_CHECKED : BST_UNCHECKED ); | |
210 | + CheckDlgButton( IDC_USE_LINKED_URL, use_linked_url_ ? BST_CHECKED : BST_UNCHECKED ); | |
211 | + | |
212 | + return 1; | |
213 | +} | |
214 | + | |
215 | +LRESULT CItemSelectDlg::OnOK( | |
216 | + WORD wNotifyCode, | |
217 | + WORD wID, | |
218 | + HWND hWndCtl, | |
219 | + BOOL& bHandled | |
220 | +) | |
221 | +{ | |
222 | + select_linked_image_ = IsDlgButtonChecked( IDC_SELECT_LINKED_IMAGE ) != 0; | |
223 | + select_linked_html_ = IsDlgButtonChecked( IDC_SELECT_LINKED_HTML ) != 0; | |
224 | + select_image_ = IsDlgButtonChecked( IDC_SELECT_IMAGE ) != 0; | |
225 | + | |
226 | + save_mode_ = IsDlgButtonChecked( IDC_CREATE_REAL ) ? 1 : 0; | |
227 | + temp_name_ = IsDlgButtonChecked( IDC_NAME_AUTO ) != 0; | |
228 | + | |
229 | + open_mode_ = (int) GetDlgItem( IDC_OPEN_MODE ).SendMessage( CB_GETCURSEL ); | |
230 | + if( open_mode_ < 0 || open_mode_ > 2 ) { | |
231 | + open_mode_ = 0; | |
232 | + } | |
233 | + | |
234 | + if( ! GetDlgItemText( IDC_FOLDER, temp_path_ ) ) { | |
235 | + SetDefaultTempDir(); | |
236 | + } | |
237 | + | |
238 | + CString real_temp_path; | |
239 | + ExpandEnvironmentStrings( temp_path_, real_temp_path.GetBuffer( MAX_PATH ), MAX_PATH ); | |
240 | + real_temp_path.ReleaseBuffer(); | |
241 | + | |
242 | + const DWORD attr = GetFileAttributes( real_temp_path ); | |
243 | + if( attr == -1 || ( attr & FILE_ATTRIBUTE_DIRECTORY ) == 0 ) { | |
244 | + CString message; | |
245 | + message.LoadString( IDS_ERR_TEMP_PATH ); | |
246 | + MessageBox( message, "Error", MB_ICONERROR | MB_OK ); | |
247 | + return 1; | |
248 | + } | |
249 | + | |
250 | + use_linked_url_ = IsDlgButtonChecked( IDC_USE_LINKED_URL ) != 0; | |
251 | + use_item_limit_ = IsDlgButtonChecked( IDC_USE_ITEM_LIMIT ) != 0; | |
252 | + use_image_size_ = IsDlgButtonChecked( IDC_USE_IMAGE_SIZE ) != 0; | |
253 | + | |
254 | + if( ! GetDlgItemText( IDC_LINKED_URL, linked_url_ ) || linked_url_.IsEmpty() ) { | |
255 | + use_linked_url_ = false; | |
256 | + } | |
257 | + | |
258 | + CString tmp; | |
259 | + if( GetDlgItemText( IDC_IMAGE_WIDTH, tmp ) ) { | |
260 | + image_size_width_ = atol( tmp ); | |
261 | + } | |
262 | + if( GetDlgItemText( IDC_IMAGE_HEIGHT, tmp ) ) { | |
263 | + image_size_height_ = atol( tmp ); | |
264 | + } | |
265 | + if( GetDlgItemText( IDC_ITEM_LIMIT, tmp ) ) { | |
266 | + item_limit_ = atoi( tmp ); | |
267 | + } | |
268 | + if( GetDlgItemText( IDC_ITEM_START, tmp ) ) { | |
269 | + item_start_ = atoi( tmp ); | |
270 | + if( item_start_ <= 0 ) { | |
271 | + item_start_ = 1; | |
272 | + } | |
273 | + } | |
274 | + | |
275 | + EndDialog( IDOK ); | |
276 | + save_setting(); | |
277 | + | |
278 | + return 1; | |
279 | +} | |
280 | + | |
281 | +LRESULT CItemSelectDlg::OnCancel( | |
282 | + WORD wNotifyCode, | |
283 | + WORD wID, | |
284 | + HWND hWndCtl, | |
285 | + BOOL& bHandled | |
286 | +) | |
287 | +{ | |
288 | + EndDialog( IDCANCEL ); | |
289 | + return 1; | |
290 | +} | |
291 | + | |
292 | +LRESULT CItemSelectDlg::OnNextItemStartNumber( | |
293 | + WORD wNotifyCode, | |
294 | + WORD wID, | |
295 | + HWND hWndCtl, | |
296 | + BOOL& bHandled | |
297 | +) | |
298 | +{ | |
299 | + CString tmp; | |
300 | + int step = 0; | |
301 | + if( GetDlgItemText( IDC_ITEM_LIMIT, tmp ) ) { | |
302 | + step = atoi( tmp ); | |
303 | + } | |
304 | + | |
305 | + item_start_ += step; | |
306 | + | |
307 | + tmp.Format( "%d", item_start_ ); | |
308 | + SetDlgItemText( IDC_ITEM_START, tmp ); | |
309 | + | |
310 | + return 1; | |
311 | +} | |
312 | + | |
313 | +LRESULT CItemSelectDlg::OnSetDefaultTempPath( | |
314 | + WORD wNotifyCode, | |
315 | + WORD wID, | |
316 | + HWND hWndCtl, | |
317 | + BOOL& bHandled | |
318 | +) | |
319 | +{ | |
320 | + SetDefaultTempDir(); | |
321 | + SetDlgItemText( IDC_FOLDER, temp_path_ ); | |
322 | + return 1; | |
323 | +} | |
324 | + | |
325 | +LRESULT CItemSelectDlg::OnBrowseForFolder( | |
326 | + WORD wNotifyCode, | |
327 | + WORD wID, | |
328 | + HWND hWndCtl, | |
329 | + BOOL& bHandled | |
330 | +) | |
331 | +{ | |
332 | + TCHAR path[ MAX_PATH ]; | |
333 | + | |
334 | + BROWSEINFO binfo = { 0 }; | |
335 | + binfo.hwndOwner = m_hWnd; | |
336 | + binfo.pszDisplayName = path; | |
337 | + binfo.lpszTitle = "一時フォルダの選択"; | |
338 | + binfo.ulFlags = BIF_BROWSEFORCOMPUTER | BIF_NEWDIALOGSTYLE | BIF_RETURNONLYFSDIRS; | |
339 | + | |
340 | + LPITEMIDLIST pidl = SHBrowseForFolder( &binfo ); | |
341 | + if( pidl != NULL ) { | |
342 | + if( SHGetPathFromIDList( pidl, path ) ) { | |
343 | + temp_path_ = path; | |
344 | + SetDlgItemText( IDC_FOLDER, temp_path_ ); | |
345 | + } | |
346 | + CoTaskMemFree( pidl ); | |
347 | + } | |
348 | + | |
349 | + return 1; | |
350 | +} | |
351 | + | |
352 | +LRESULT CItemSelectDlg::OnOpenFolder( | |
353 | + WORD wNotifyCode, | |
354 | + WORD wID, | |
355 | + HWND hWndCtl, | |
356 | + BOOL& bHandled | |
357 | +) | |
358 | +{ | |
359 | + CString real_temp_path; | |
360 | + bool accept = false; | |
361 | + | |
362 | + if( GetDlgItemText( IDC_FOLDER, temp_path_ ) ) { | |
363 | + ExpandEnvironmentStrings( temp_path_, real_temp_path.GetBuffer( MAX_PATH ), MAX_PATH ); | |
364 | + real_temp_path.ReleaseBuffer(); | |
365 | + if( ! real_temp_path.IsEmpty() ) { | |
366 | + const DWORD attr = GetFileAttributes( real_temp_path ); | |
367 | + if( attr != -1 && ( attr & FILE_ATTRIBUTE_DIRECTORY ) != 0 ) { | |
368 | + accept = true; | |
369 | + } | |
370 | + } | |
371 | + } | |
372 | + | |
373 | + if( accept ) { | |
374 | + ShellExecute( NULL, "OPEN", real_temp_path, NULL, NULL, SW_SHOWNORMAL ); | |
375 | + } | |
376 | + else { | |
377 | + MessageBeep( MB_ICONEXCLAMATION ); | |
378 | + } | |
379 | + | |
380 | + return 1; | |
381 | +} | |
382 | + | |
383 | + |
@@ -0,0 +1,10 @@ | ||
1 | +#include "stdafx.h" | |
2 | + | |
3 | +#include "error.h" | |
4 | + | |
5 | +void CheckAndThrow( HRESULT hr ) | |
6 | +{ | |
7 | + if( FAILED( hr ) ) { | |
8 | + AtlThrow( hr ); | |
9 | + } | |
10 | +} |
@@ -0,0 +1,6 @@ | ||
1 | +// stdafx.cpp : 標準インクルードのみを含むソース ファイルです。 | |
2 | +// MkImgPage.pch は、プリコンパイル済みヘッダーになります。 | |
3 | +// stdafx.obj にはプリコンパイル済み型情報が含まれます。 | |
4 | + | |
5 | +#include "stdafx.h" | |
6 | + |
@@ -0,0 +1,64 @@ | ||
1 | +======================================================================== | |
2 | + アクティブ テンプレート ライブラリ : MkImgPage プロジェクトの概要 | |
3 | +======================================================================== | |
4 | + | |
5 | +AppWizard が作成したこの MkImgPage アプリケーションには、 | |
6 | +ダイナミック リンク ライブラリ (DLL) の基本的な使い方が示されています。アプリケーション作成のひな型としてお使いください。 | |
7 | +このプロジェクトは Visual C++ 属性を使用して実装されました。 | |
8 | + | |
9 | +このファイルにはプロジェクトを構成している各ファイルの | |
10 | +概要が含まれています。 | |
11 | + | |
12 | +MkImgPage.vcproj | |
13 | + これはアプリケーション ウィザードで生成された VC++ プロジェクトのメイン プロジェクト ファイルです。 | |
14 | + ファイルが生成された Visual C++ のバージョン情報が含まれています。 | |
15 | + また、アプリケーション ウィザードで選択したプラットフォーム、構成およびプロジェクト機能に関する | |
16 | + 情報も含まれています。 | |
17 | + | |
18 | +_MkImgPage.idl | |
19 | + このファイルはプロジェクトがビルドされるときにコンパイラで生成されます。タイプ ライブラリの IDL 定義、 | |
20 | + プロジェクトで定義されたインターフェイス、およびコクラスを含んでいます。 | |
21 | + このファイルは MIDL コンパイラによって処理され、以下のファイルを生成します : | |
22 | + C++ インターフェイス定義および GUID 宣言 (_MkImgPage.h) | |
23 | + GUID 宣言 (_MkImgPage_i.c) | |
24 | + タイプ ライブラリ (_MkImgPage.tlb) | |
25 | + マーシャリング コード (_MkImgPage_p.c and dlldata.c) | |
26 | +MkImgPage.cpp | |
27 | + このファイルはオブジェクト マップおよび DLL エクスポートの実装を含んでいます。 | |
28 | +MkImgPage.rc | |
29 | + これはプログラムが使用する Microsoft Windows のリソースの | |
30 | + 一覧ファイルです。 | |
31 | + | |
32 | +MkImgPage.def | |
33 | + このモジュール定義ファイルは、DLL で必要なエクスポートに関する情報へのリンカを提供し、 | |
34 | + 次のエクスポート情報を含んでいます : | |
35 | + DllGetClassObject | |
36 | + DllCanUnloadNow | |
37 | + GetProxyDllInfo | |
38 | + DllRegisterServer | |
39 | + DllUnregisterServer | |
40 | + | |
41 | +///////////////////////////////////////////////////////////////////////////// | |
42 | +その他の標準ファイル : | |
43 | + | |
44 | +StdAfx.h, StdAfx.cpp | |
45 | + これらのファイルはプリコンパイル済みヘッダー (PCH) ファイル MkImgPage.pch、 | |
46 | + およびプリコンパイルされた型の (PCT) ファイル stdafx.obj をビルドするために使われます。 | |
47 | + | |
48 | +Resource.h | |
49 | + このファイルはリソース ID を定義する標準ヘッダー ファイルです。 | |
50 | + | |
51 | +///////////////////////////////////////////////////////////////////////////// | |
52 | +プロキシ/スタブ DLL プロジェクトおよびモジュール定義ファイル : | |
53 | + | |
54 | +MkImgPageps.vcproj | |
55 | + このファイルは必要に応じてプロキシ/スタブのビルドに使用されるプロジェクト ファイルです。 | |
56 | + 主なプロジェクトの IDL ファイルには少なくともインターフェイスを 1 つ含み、 | |
57 | + プロキシ/スタブ DLL をビルドする前に IDL ファイルをコンパイルする必要があります。 この過程で | |
58 | +\プロキシ/スタブ DLL をビルドするのに必要な tdlldata.c、MkImgPage_i.c および MkImgPage_p.c が | |
59 | + 生成されます。 | |
60 | + | |
61 | +MkImgPageps.def | |
62 | + このモジュール定義ファイルは、プロキシ/スタブで必要なエクスポートに関する | |
63 | + 情報へのリンカを提供します。 | |
64 | +///////////////////////////////////////////////////////////////////////////// |
@@ -0,0 +1,218 @@ | ||
1 | +#pragma once | |
2 | + | |
3 | +#include <atlwin.h> | |
4 | +#include "resource.h" | |
5 | + | |
6 | +class CItemSelectInfo | |
7 | +{ | |
8 | +public: | |
9 | + CItemSelectInfo() | |
10 | + : select_linked_image_( true ) | |
11 | + , select_linked_html_( false ) | |
12 | + , select_image_( false ) | |
13 | + , save_mode_( 1 ) | |
14 | + , open_mode_( 0 ) | |
15 | + , temp_name_( true ) | |
16 | + , use_item_limit_( true ) | |
17 | + , item_start_( 1 ) | |
18 | + , item_limit_( 50 ) | |
19 | + , use_image_size_( true ) | |
20 | + , image_size_width_( 200 ) | |
21 | + , image_size_height_( 200 ) | |
22 | + , use_linked_url_( false ) | |
23 | + { | |
24 | + SetDefaultTempDir(); | |
25 | + } | |
26 | + | |
27 | + virtual ~CItemSelectInfo() {} | |
28 | + | |
29 | +protected: | |
30 | + | |
31 | + bool select_linked_image_; | |
32 | + | |
33 | + bool select_linked_html_; | |
34 | + | |
35 | + bool select_image_; | |
36 | + | |
37 | + int save_mode_; | |
38 | + | |
39 | + int open_mode_; | |
40 | + | |
41 | + bool temp_name_; | |
42 | + | |
43 | + CString temp_path_; | |
44 | + | |
45 | + bool use_item_limit_; | |
46 | + | |
47 | + int item_limit_; | |
48 | + | |
49 | + int item_start_; | |
50 | + | |
51 | + bool use_image_size_; | |
52 | + | |
53 | + int image_size_width_; | |
54 | + | |
55 | + int image_size_height_; | |
56 | + | |
57 | + bool use_linked_url_; | |
58 | + | |
59 | + CString linked_url_; | |
60 | + | |
61 | +public: | |
62 | + | |
63 | + void SetDefaultTempDir() | |
64 | + { | |
65 | + temp_path_ = "%TMP%"; | |
66 | + } | |
67 | + | |
68 | + inline bool is_select_linked_image() const | |
69 | + { | |
70 | + return select_linked_image_; | |
71 | + } | |
72 | + | |
73 | + inline bool is_select_linked_html() const | |
74 | + { | |
75 | + return select_linked_html_; | |
76 | + } | |
77 | + | |
78 | + inline bool is_select_image() const | |
79 | + { | |
80 | + return select_image_; | |
81 | + } | |
82 | + | |
83 | + inline int get_save_mode() const | |
84 | + { | |
85 | + return save_mode_; | |
86 | + } | |
87 | + | |
88 | + inline int get_open_mode() const | |
89 | + { | |
90 | + return open_mode_; | |
91 | + } | |
92 | + | |
93 | + inline bool is_temp_name() const | |
94 | + { | |
95 | + return temp_name_; | |
96 | + } | |
97 | + | |
98 | + inline CString get_temp_path() const | |
99 | + { | |
100 | + return temp_path_; | |
101 | + } | |
102 | + | |
103 | + inline bool is_use_item_limit() const | |
104 | + { | |
105 | + return use_item_limit_; | |
106 | + } | |
107 | + | |
108 | + inline int get_item_start() const | |
109 | + { | |
110 | + return item_start_; | |
111 | + } | |
112 | + | |
113 | + inline int get_item_limit() const | |
114 | + { | |
115 | + return item_limit_; | |
116 | + } | |
117 | + | |
118 | + inline bool is_use_image_size() const | |
119 | + { | |
120 | + return use_image_size_; | |
121 | + } | |
122 | + | |
123 | + inline int get_image_size_width() const | |
124 | + { | |
125 | + return image_size_width_; | |
126 | + } | |
127 | + | |
128 | + inline int get_image_size_height() const | |
129 | + { | |
130 | + return image_size_height_; | |
131 | + } | |
132 | + | |
133 | + inline CString get_linked_url() const | |
134 | + { | |
135 | + return linked_url_; | |
136 | + } | |
137 | + | |
138 | + inline bool is_use_linked_url() const | |
139 | + { | |
140 | + return use_linked_url_; | |
141 | + } | |
142 | + | |
143 | + void set_linked_url( const CString& v_linked_url ) | |
144 | + { | |
145 | + linked_url_ = v_linked_url; | |
146 | + } | |
147 | + | |
148 | +}; | |
149 | + | |
150 | +class CItemSelectDlg : | |
151 | + public CDialogImpl<CItemSelectDlg>, | |
152 | + public CItemSelectInfo | |
153 | +{ | |
154 | +public: | |
155 | + enum { IDD = IDD_ITEMSELECTDLG }; | |
156 | + | |
157 | + CItemSelectDlg(void); | |
158 | + virtual ~CItemSelectDlg(void); | |
159 | + | |
160 | + BEGIN_MSG_MAP(CMyDialog) | |
161 | + MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) | |
162 | + COMMAND_ID_HANDLER( IDOK, OnOK ) | |
163 | + COMMAND_ID_HANDLER( IDCANCEL, OnCancel ) | |
164 | + COMMAND_ID_HANDLER( IDC_BROWSE_FOLDER, OnBrowseForFolder ) | |
165 | + COMMAND_ID_HANDLER( IDC_ADD_NEXT, OnNextItemStartNumber ) | |
166 | + COMMAND_ID_HANDLER( IDC_SET_DEFAULT_TEMP_PATH, OnSetDefaultTempPath ) | |
167 | + COMMAND_ID_HANDLER( IDC_OPEN_FOLDER, OnOpenFolder ) | |
168 | + END_MSG_MAP() | |
169 | + | |
170 | + LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); | |
171 | + | |
172 | + LRESULT OnOK( | |
173 | + WORD wNotifyCode, | |
174 | + WORD wID, | |
175 | + HWND hWndCtl, | |
176 | + BOOL& bHandled | |
177 | + ); | |
178 | + | |
179 | + LRESULT OnCancel( | |
180 | + WORD wNotifyCode, | |
181 | + WORD wID, | |
182 | + HWND hWndCtl, | |
183 | + BOOL& bHandled | |
184 | + ); | |
185 | + | |
186 | + | |
187 | + LRESULT OnBrowseForFolder( | |
188 | + WORD wNotifyCode, | |
189 | + WORD wID, | |
190 | + HWND hWndCtl, | |
191 | + BOOL& bHandled | |
192 | + ); | |
193 | + | |
194 | + LRESULT OnNextItemStartNumber( | |
195 | + WORD wNotifyCode, | |
196 | + WORD wID, | |
197 | + HWND hWndCtl, | |
198 | + BOOL& bHandled | |
199 | + ); | |
200 | + | |
201 | + LRESULT OnSetDefaultTempPath( | |
202 | + WORD wNotifyCode, | |
203 | + WORD wID, | |
204 | + HWND hWndCtl, | |
205 | + BOOL& bHandled | |
206 | + ); | |
207 | + | |
208 | + LRESULT OnOpenFolder( | |
209 | + WORD wNotifyCode, | |
210 | + WORD wID, | |
211 | + HWND hWndCtl, | |
212 | + BOOL& bHandled | |
213 | + ); | |
214 | + | |
215 | +protected: | |
216 | + void load_setting(); | |
217 | + void save_setting(); | |
218 | +}; |
@@ -0,0 +1,165 @@ | ||
1 | +#include "StdAfx.h" | |
2 | +#include ".\documentparser.h" | |
3 | + | |
4 | +#include "error.h" | |
5 | + | |
6 | +CDocumentParser::CDocumentParser( const CItemSelectInfo& v_selectInfo ) | |
7 | + : selectInfo_( v_selectInfo ) | |
8 | +{ | |
9 | +} | |
10 | + | |
11 | +CDocumentParser::~CDocumentParser(void) | |
12 | +{ | |
13 | +} | |
14 | + | |
15 | +HRESULT CDocumentParser::parse( IHTMLDocument2* v_pDoc ) | |
16 | +{ | |
17 | + CComPtr<IHTMLDocument2> doc = v_pDoc; | |
18 | + | |
19 | + OutputDebugString("@@@\n"); | |
20 | + CheckAndThrow( parseDocument( doc ) ); | |
21 | + | |
22 | + CComPtr<IOleContainer> frames; | |
23 | + CheckAndThrow( doc.QueryInterface( &frames ) ); | |
24 | + | |
25 | + CComPtr<IEnumUnknown> enumerator; | |
26 | + CheckAndThrow( frames->EnumObjects( OLECONTF_EMBEDDINGS, &enumerator ) ); | |
27 | + | |
28 | + IUnknown* pUnk; | |
29 | + ULONG uFetched; | |
30 | + for(UINT i = 0; | |
31 | + S_OK == enumerator->Next(1, &pUnk, &uFetched); | |
32 | + i++) | |
33 | + { | |
34 | + CComPtr<IWebBrowser2> frame_browser; | |
35 | + | |
36 | + HRESULT hr = pUnk->QueryInterface(IID_IWebBrowser2, (void**)&frame_browser ); | |
37 | + pUnk->Release(); | |
38 | + | |
39 | + if( SUCCEEDED(hr) ) { | |
40 | + CComPtr<IDispatch> frame_doc_disp; | |
41 | + CheckAndThrow( frame_browser->get_Document( &frame_doc_disp ) ); | |
42 | + | |
43 | + CComPtr<IHTMLDocument2> frame_doc; | |
44 | + CheckAndThrow( frame_doc_disp.QueryInterface( &frame_doc ) ); | |
45 | + | |
46 | + CheckAndThrow( parse( frame_doc ) ); | |
47 | + } | |
48 | + } | |
49 | + return S_OK; | |
50 | +} | |
51 | + | |
52 | +HRESULT CDocumentParser::parseDocument( IHTMLDocument2* v_pDoc ) | |
53 | +{ | |
54 | + CComPtr<IHTMLDocument2> doc = v_pDoc; | |
55 | + | |
56 | + CComPtr<IMalloc> malloc; | |
57 | + CheckAndThrow( CoGetMalloc( 1, &malloc ) ); | |
58 | + | |
59 | + CComPtr<IHTMLElementCollection> anchors; | |
60 | + CheckAndThrow( doc->get_anchors( &anchors ) ); | |
61 | + | |
62 | + CComPtr<IHTMLElementCollection> all; | |
63 | + CheckAndThrow( doc->get_all( &all ) ); | |
64 | + | |
65 | + long all_count = 0; | |
66 | + CheckAndThrow( all->get_length( &all_count ) ); | |
67 | + | |
68 | + for( long all_idx = 0; all_idx < all_count; all_idx++ ) { | |
69 | + CComVariant idxVar( all_idx ); | |
70 | + CComPtr<IDispatch> element_disp; | |
71 | + CheckAndThrow( all->item( idxVar, idxVar, &element_disp ) ); | |
72 | + | |
73 | + // 画像の判定 | |
74 | + if( selectInfo_.is_select_image() ) { | |
75 | + CComPtr<IHTMLImgElement > image; | |
76 | + if( SUCCEEDED( element_disp.QueryInterface( &image ) ) ) { | |
77 | + CComBSTR bstrSrc; | |
78 | + if( SUCCEEDED( image->get_src( &bstrSrc.m_str ) ) ) { | |
79 | + bool size_check = true; | |
80 | + if( selectInfo_.is_use_image_size() ) { | |
81 | + long width = 0, height = 0; | |
82 | + image->get_width( &width ); | |
83 | + image->get_height( &height ); | |
84 | + | |
85 | + size_check = ( width >= selectInfo_.get_image_size_width() ) && ( height >= selectInfo_.get_image_size_height() ); | |
86 | + } | |
87 | + if( size_check ) { | |
88 | + if( bstrSrc.Length() > 0 ) { | |
89 | + CString src( (LPCWSTR)(BSTR) bstrSrc ); | |
90 | + ItemInfo itemInfo; | |
91 | + itemInfo.setItem( src ); | |
92 | + itemInfo.setItemType( ItemInfo::ITEMTYPE_IMAGE ); | |
93 | + push_back( itemInfo ); | |
94 | + } | |
95 | + } | |
96 | + } | |
97 | + } | |
98 | + } | |
99 | + | |
100 | + // リンク先の判定 | |
101 | + if( selectInfo_.is_select_linked_image() || | |
102 | + selectInfo_.is_select_linked_html() ) | |
103 | + { | |
104 | + CComPtr<IHTMLAnchorElement> anchor; | |
105 | + if( SUCCEEDED( element_disp.QueryInterface( &anchor ) ) ) { | |
106 | + CComBSTR bstrHref; | |
107 | + if( SUCCEEDED( anchor->get_href( &bstrHref.m_str ) ) ) { | |
108 | + if( bstrHref.Length() > 0 ) { | |
109 | + ItemInfo itemInfo; | |
110 | + CString href( (LPCWSTR)(BSTR) bstrHref ); | |
111 | + | |
112 | + // 拡張子の判定 | |
113 | + const LPCSTR tmp = href; | |
114 | + LPCSTR p = tmp; | |
115 | + while(*p)p++; | |
116 | + while( p > tmp ) { | |
117 | + if( *p == '.' ) { | |
118 | + if( stricmp( p, ".jpg" ) == 0 || | |
119 | + stricmp( p, ".jpeg" ) == 0 || | |
120 | + stricmp( p, ".gif" ) == 0 || | |
121 | + stricmp( p, ".png" ) == 0 || | |
122 | + stricmp( p, ".bmp" ) == 0 | |
123 | + ) | |
124 | + { | |
125 | + if( selectInfo_.is_select_linked_image() ) { | |
126 | + itemInfo.setItemType( ItemInfo::ITEMTYPE_LINKED_IMAGE ); | |
127 | + } | |
128 | + } | |
129 | + else if( | |
130 | + stricmp( p, ".htm" ) == 0 || | |
131 | + stricmp( p, ".html" ) == 0 | |
132 | + ) | |
133 | + { | |
134 | + if( selectInfo_.is_select_linked_html() ) { | |
135 | + itemInfo.setItemType( ItemInfo::ITEMTYPE_LINKED_HTML ); | |
136 | + } | |
137 | + } | |
138 | + break; | |
139 | + } | |
140 | + else if( *p == '/' || *p == '\\' ) { | |
141 | + break; | |
142 | + } | |
143 | + p = CharPrev( tmp, p ); | |
144 | + } | |
145 | + | |
146 | + // 取得されたリンク先の登録 | |
147 | + if( itemInfo.getItemType() != ItemInfo::ITEMTYPE_NONE ) { | |
148 | + // リンク先の制限の確認 | |
149 | + bool bAccept = true; | |
150 | + if( selectInfo_.is_use_linked_url() ) { | |
151 | + bAccept = ( href.Find( selectInfo_.get_linked_url() ) != -1 ); | |
152 | + } | |
153 | + if( bAccept ) { | |
154 | + itemInfo.setItem( href ); | |
155 | + push_back( itemInfo ); | |
156 | + } | |
157 | + } | |
158 | + } | |
159 | + } | |
160 | + } | |
161 | + } | |
162 | + } | |
163 | + | |
164 | + return S_OK; | |
165 | +} |
@@ -0,0 +1,43 @@ | ||
1 | +//{{NO_DEPENDENCIES}} | |
2 | +// Microsoft Visual C++ generated include file. | |
3 | +// Used by MkImgPage.rc | |
4 | +// | |
5 | +#define IDS_PROJNAME 100 | |
6 | +#define IDR_MKIMGPAGE 101 | |
7 | +#define IDS_ERR_TEMP_PATH 101 | |
8 | +#define IDR_IEEXTENSION 102 | |
9 | +#define IDD_ITEMSELECTDLG 103 | |
10 | +#define IDS_DDLIST_OPEN_MODE 200 | |
11 | +#define IDC_SELECT_LINKED_IMAGE 202 | |
12 | +#define IDC_SELECT_LINKED_HTML 203 | |
13 | +#define IDC_SELECT_IMAGE 204 | |
14 | +#define IDC_CREATE_VIRTUAL 205 | |
15 | +#define IDC_CREATE_REAL 206 | |
16 | +#define IDC_FOLDER 207 | |
17 | +#define IDC_BROWSE_FOLDER 208 | |
18 | +#define IDC_NAME_AUTO 209 | |
19 | +#define IDC_NAME_AUTO2 210 | |
20 | +#define IDC_BLANK_WINDOW 210 | |
21 | +#define IDC_USE_ITEM_LIMIT 211 | |
22 | +#define IDC_ITEM_LIMIT 212 | |
23 | +#define IDC_USE_IMAGE_SIZE 213 | |
24 | +#define IDC_IMAGE_WIDTH 214 | |
25 | +#define IDC_IMAGE_HEIGHT 215 | |
26 | +#define IDC_USE_LINKED_URL 216 | |
27 | +#define IDC_LINKED_URL 217 | |
28 | +#define IDC_ITEM_START 218 | |
29 | +#define IDC_ADD_NEXT 219 | |
30 | +#define IDC_SET_DEFAULT_TEMP_PATH 220 | |
31 | +#define IDC_OPEN_FOLDER 221 | |
32 | +#define IDC_OPEN_MODE 222 | |
33 | + | |
34 | +// Next default values for new objects | |
35 | +// | |
36 | +#ifdef APSTUDIO_INVOKED | |
37 | +#ifndef APSTUDIO_READONLY_SYMBOLS | |
38 | +#define _APS_NEXT_RESOURCE_VALUE 104 | |
39 | +#define _APS_NEXT_COMMAND_VALUE 32768 | |
40 | +#define _APS_NEXT_CONTROL_VALUE 223 | |
41 | +#define _APS_NEXT_SYMED_VALUE 103 | |
42 | +#endif | |
43 | +#endif |