OSDN Git Service

[Release] Ver.2.1.2
[dokopop/dokopop.git] / ExMODIst / ExMODIst.cpp
1 // ExMODIst.cpp : \83R\83\93\83\\81[\83\8b \83A\83v\83\8a\83P\81[\83V\83\87\83\93\82Ì\83G\83\93\83g\83\8a \83|\83C\83\93\83g\82ð\92è\8b`\82µ\82Ü\82·\81B
2 //
3
4 #include "stdafx.h"
5 #include "ExMODIst.h"
6 #include "MDIVWCTL.tlh"
7
8 using namespace modi;
9
10 bool IsMODIAvailable();
11
12 using namespace std;
13
14 int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
15 {
16         if (IsMODIAvailable()){
17                 return 1;
18         }
19         return 0;
20 }
21
22 bool IsMODIAvailable()
23 {
24         bool bRet= true;
25
26     HRESULT hr;
27     modi::IDocument  *IDobj   = NULL;
28
29         hr = CoInitialize(0);
30         if ( SUCCEEDED(hr))
31         {
32                 hr = CoCreateInstance(CLSID_Document,NULL,CLSCTX_ALL,IID_IDocument,(void**) &IDobj);
33
34                 if ( SUCCEEDED(hr) )
35                 {
36                         IDobj->Release();
37                 } else {
38                    bRet= false;
39                 }
40
41         } else {
42                 bRet= false;
43         }
44
45         return bRet;
46 }