Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
6c32e6e4
Kaydet (Commit)
6c32e6e4
authored
Haz 10, 2002
tarafından
Mikhail Voitenko
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#100120# initial version
üst
54e834ea
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
797 additions
and
0 deletions
+797
-0
Makefile
odk/examples/OLE/activex/Makefile
+48
-0
README.txt
odk/examples/OLE/activex/README.txt
+33
-0
SOActiveX.cpp
odk/examples/OLE/activex/SOActiveX.cpp
+0
-0
SOActiveX.h
odk/examples/OLE/activex/SOActiveX.h
+132
-0
SOActiveX.rgs
odk/examples/OLE/activex/SOActiveX.rgs
+33
-0
SOComWindowPeer.cpp
odk/examples/OLE/activex/SOComWindowPeer.cpp
+24
-0
SOComWindowPeer.h
odk/examples/OLE/activex/SOComWindowPeer.h
+128
-0
SOComWindowPeer.rgs
odk/examples/OLE/activex/SOComWindowPeer.rgs
+23
-0
StdAfx2.cpp
odk/examples/OLE/activex/StdAfx2.cpp
+12
-0
StdAfx2.h
odk/examples/OLE/activex/StdAfx2.h
+31
-0
example.html
odk/examples/OLE/activex/example.html
+23
-0
resource.h
odk/examples/OLE/activex/resource.h
+21
-0
so_activex.cpp
odk/examples/OLE/activex/so_activex.cpp
+74
-0
so_activex.def
odk/examples/OLE/activex/so_activex.def
+9
-0
so_activex.idl
odk/examples/OLE/activex/so_activex.idl
+104
-0
so_activex.rc
odk/examples/OLE/activex/so_activex.rc
+102
-0
No files found.
odk/examples/OLE/activex/Makefile
0 → 100644
Dosyayı görüntüle @
6c32e6e4
# Builds the ActiveX control.
PRJ
=
..
$(PS)
..
$(PS)
..
SETTINGS
=
../../../settings
include
$(SETTINGS)/settings.mk
include
$(SETTINGS)/std.mk
CC_INCLUDES
+=
-I
$(OUT_MISC)
#######################################################
# add path to ATL headers - REQUIRES TO BE EDIT BY USER
CC_INCLUDES
+=
-Ir
:
$(PS)
MSVC603
$(PS)
ATL
$(PS)
Include
#######################################################
ifeq
"$(OS)"
"WIN"
# Targets
.PHONY
:
ALL
ALL
:
$(OUT) $(OUT_MISC)
\s
o_activex.h so_activex_dll
include
$(SETTINGS)/stdtarget.mk
# source files
$(OUT_SLO)$(PS)so_activex.$(OBJ_EXT)
:
so_activex.cpp
$(CC)
$(CC_FLAGS)
$(CC_INCLUDES)
$(CC_DEFINES)
$(CC_OUTPUT_SWITCH)$@
$<
$(OUT_SLO)$(PS)SOActiveX.$(OBJ_EXT)
:
SOActiveX.cpp
$(CC)
$(CC_FLAGS)
$(CC_INCLUDES)
$(CC_DEFINES)
$(CC_OUTPUT_SWITCH)$@
$<
$(OUT_SLO)$(PS)SOComWindowPeer.$(OBJ_EXT)
:
SOComWindowPeer.cpp
$(CC)
$(CC_FLAGS)
$(CC_INCLUDES)
$(CC_DEFINES)
$(CC_OUTPUT_SWITCH)$@
$<
$(OUT_SLO)$(PS)StdAfx2.$(OBJ_EXT)
:
StdAfx2.cpp
$(CC)
$(CC_FLAGS)
$(CC_INCLUDES)
$(CC_DEFINES)
$(CC_OUTPUT_SWITCH)$@
$<
$(SHAREDLIB_OUT)$(PS)$(SHAREDLIB_PRE)so_activex.$(SHAREDLIB_EXT)
:
$(OUT_SLO)$(PS)so_activex.$(OBJ_EXT) $(OUT_SLO)$(PS)SOActiveX.$(OBJ_EXT) $(OUT_SLO)$(PS)SOComWindowPeer.$(OBJ_EXT) $(OUT_SLO)$(PS)StdAfx2.$(OBJ_EXT)
rc
$(CC_INCLUDES)
/R /FO
$(OUT_MISC)$(PS)
so_activex.res so_activex.rc
$(LINK)
$(LIBRARY_LINK_FLAGS)
/OUT:
$@
/DEF:so_activex.def /MAP:
$(OUT_MISC)$(PS)
so_activex.map /IMPLIB:
$(OUT_LIB)$(PS)
iso_activex.lib
$^
msvcrt.lib kernel32.lib user32.lib uuid.lib advapi32.lib ole32.lib oleaut32.lib gdi32.lib urlmon.lib Shlwapi.lib oldnames.lib
$(OUT_MISC)$(PS)
so_activex.res
so_activex_dll
:
$(SHAREDLIB_OUT)$(PS)$(SHAREDLIB_PRE)so_activex.$(SHAREDLIB_EXT)
$(OUT_MISC)\so_activex.h
:
so_activex.idl
midl.exe /tlb
$(OUT_MISC)
\s
o_activex.tlb /h
$(OUT_MISC)
\s
o_activex.h /iid
$(OUT_MISC)
\s
o_activex_i.c /proxy
$(OUT_MISC)
\s
o_activex_p.c /dlldata
$(OUT_MISC)
\d
lldata.c /Oicf so_activex.idl
endif
odk/examples/OLE/activex/README.txt
0 → 100644
Dosyayı görüntüle @
6c32e6e4
Warning: Before the control can be built
user has to add path to MS ATL headers into Makefile.
Description.
The StarOffice ActiveX control shows an example of access to UNO through COM technology.
It requires a properly installed StarOffice version 6.0/6.1 or OpenOffice 1.0.
This is a Lite ActiveX control so it can be used only in containers that
allows to use such controls. It can be activated with an <OBJECT> tag from
a html-page to embed a document. Without any parameters a new writer document will be
opened for editing. Possible parameters are
src - full URL to the file that should be edited/viewed;
it can contain "private:factory/..." URLs to open new documents
for edit, for example "private:factory/swriter"
readonly - if it is set to "true" the document will be opened readonly,
otherwise the document will be opened for editing.
The control can be extended easily, for example it can be changed
to allow scripting to load different documents.
As any ActiveX control this one should be registered.
To let MSIE register it itself the "CODEBASE" parameter
for the "OBJECT" tag should be specified
with an URL to the library "so_activex.dll".
Also it can be done using regsvr32 application.
To do it please write
<Path to Windows installation>\System32\regsvr32 so_activex.dll
To unregister the control please use /u option:
<Path to Windows installation>\system32\regsvr32 so_activex.dll /u
odk/examples/OLE/activex/SOActiveX.cpp
0 → 100644
Dosyayı görüntüle @
6c32e6e4
This diff is collapsed.
Click to expand it.
odk/examples/OLE/activex/SOActiveX.h
0 → 100644
Dosyayı görüntüle @
6c32e6e4
// SOActiveX.h : Declaration of the CSOActiveX
#ifndef __SOACTIVEX_H_
#define __SOACTIVEX_H_
#include "resource.h" // main symbols
#include <ExDispID.h>
#include <ExDisp.h>
#include <shlguid.h>
#include <atlctl.h>
#include "so_activex.h"
/////////////////////////////////////////////////////////////////////////////
// CSOActiveX
class
ATL_NO_VTABLE
CSOActiveX
:
public
CComObjectRootEx
<
CComSingleThreadModel
>
,
public
IDispatchImpl
<
ISOActiveX
,
&
IID_ISOActiveX
,
&
LIBID_SO_ACTIVEXLib
>
,
public
CComControl
<
CSOActiveX
>
,
public
IPersistStreamInitImpl
<
CSOActiveX
>
,
public
IOleControlImpl
<
CSOActiveX
>
,
public
IOleObjectImpl
<
CSOActiveX
>
,
public
IOleInPlaceActiveObjectImpl
<
CSOActiveX
>
,
public
IViewObjectExImpl
<
CSOActiveX
>
,
public
IOleInPlaceObjectWindowlessImpl
<
CSOActiveX
>
,
// public IConnectionPointContainerImpl<CSOActiveX>,
public
CComCoClass
<
CSOActiveX
,
&
CLSID_SOActiveX
>
,
// public CProxy_ItryPluginEvents< CSOActiveX >,
public
IPersistPropertyBagImpl
<
CSOActiveX
>
,
public
IProvideClassInfo2Impl
<
&
CLSID_SOActiveX
,
&
DIID__ISOActiveXEvents
,
&
LIBID_SO_ACTIVEXLib
>
,
public
IObjectSafetyImpl
<
CSOActiveX
,
INTERFACESAFE_FOR_UNTRUSTED_DATA
>
{
protected
:
CComPtr
<
IWebBrowser2
>
mWebBrowser2
;
DWORD
mCookie
;
CComPtr
<
IDispatch
>
mpDispFactory
;
CComPtr
<
IDispatch
>
mpDispFrame
;
CComPtr
<
IDispatch
>
mpDispWin
;
OLECHAR
*
mCurFileUrl
;
BOOL
mbLoad
;
BOOL
mbViewOnly
;
WNDCLASS
mPWinClass
;
HWND
mParentWin
;
HWND
mOffWin
;
public
:
CSOActiveX
();
~
CSOActiveX
();
DECLARE_REGISTRY_RESOURCEID
(
IDR_SOACTIVEX
)
DECLARE_PROTECT_FINAL_CONSTRUCT
()
BEGIN_COM_MAP
(
CSOActiveX
)
COM_INTERFACE_ENTRY
(
ISOActiveX
)
COM_INTERFACE_ENTRY
(
IDispatch
)
COM_INTERFACE_ENTRY
(
IViewObjectEx
)
COM_INTERFACE_ENTRY
(
IViewObject2
)
COM_INTERFACE_ENTRY
(
IViewObject
)
COM_INTERFACE_ENTRY
(
IOleInPlaceObjectWindowless
)
COM_INTERFACE_ENTRY
(
IOleInPlaceObject
)
COM_INTERFACE_ENTRY2
(
IOleWindow
,
IOleInPlaceObjectWindowless
)
COM_INTERFACE_ENTRY
(
IOleInPlaceActiveObject
)
COM_INTERFACE_ENTRY
(
IOleControl
)
COM_INTERFACE_ENTRY
(
IOleObject
)
COM_INTERFACE_ENTRY
(
IPersistStreamInit
)
COM_INTERFACE_ENTRY2
(
IPersist
,
IPersistStreamInit
)
// COM_INTERFACE_ENTRY(IConnectionPointContainer)
COM_INTERFACE_ENTRY
(
IProvideClassInfo
)
COM_INTERFACE_ENTRY
(
IProvideClassInfo2
)
COM_INTERFACE_ENTRY
(
IPersistPropertyBag
)
COM_INTERFACE_ENTRY
(
IObjectSafety
)
END_COM_MAP
()
BEGIN_PROP_MAP
(
CSOActiveX
)
PROP_DATA_ENTRY
(
"_cx"
,
m_sizeExtent
.
cx
,
VT_UI4
)
PROP_DATA_ENTRY
(
"_cy"
,
m_sizeExtent
.
cy
,
VT_UI4
)
// Example entries
// PROP_ENTRY("Property Description", dispid, clsid)
// PROP_PAGE(CLSID_StockColorPage)
END_PROP_MAP
()
BEGIN_CONNECTION_POINT_MAP
(
CSOActiveX
)
END_CONNECTION_POINT_MAP
()
BEGIN_MSG_MAP
(
CSOActiveX
)
CHAIN_MSG_MAP
(
CComControl
<
CSOActiveX
>
)
DEFAULT_REFLECTION_HANDLER
()
END_MSG_MAP
()
// Handler prototypes:
// LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
// LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
// LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
// IViewObjectEx
DECLARE_VIEW_STATUS
(
VIEWSTATUS_SOLIDBKGND
|
VIEWSTATUS_OPAQUE
)
// ISOActiveX
public
:
STDMETHOD
(
SetClientSite
)(
IOleClientSite
*
aClientSite
);
STDMETHOD
(
Invoke
)(
DISPID
dispidMember
,
REFIID
riid
,
LCID
lcid
,
WORD
wFlags
,
DISPPARAMS
*
pDispParams
,
VARIANT
*
pvarResult
,
EXCEPINFO
*
pExcepInfo
,
UINT
*
puArgErr
);
STDMETHOD
(
Load
)
(
LPPROPERTYBAG
pPropBag
,
LPERRORLOG
pErrorLog
);
STDMETHOD
(
Load
)
(
LPSTREAM
pStm
);
STDMETHOD
(
InitNew
)
();
HRESULT
OnDrawAdvanced
(
ATL_DRAWINFO
&
di
);
HRESULT
OnDraw
(
ATL_DRAWINFO
&
di
)
{
return
S_OK
;
}
HRESULT
CreateFrameOldWay
(
HWND
hwnd
,
int
width
,
int
height
);
HRESULT
GetUnoStruct
(
OLECHAR
*
sStructName
,
CComPtr
<
IDispatch
>&
pdispResult
);
HRESULT
LoadURLToFrame
();
HRESULT
ShowSomeBars
();
HRESULT
HideAllBars
();
HRESULT
CallDispatch1PBool
(
OLECHAR
*
sUrl
,
OLECHAR
*
sArgName
,
BOOL
sArgVal
);
HRESULT
GetUrlStruct
(
OLECHAR
*
sUrl
,
CComPtr
<
IDispatch
>&
pdispUrl
);
HRESULT
Cleanup
();
};
#endif //__SOACTIVEX_H_
odk/examples/OLE/activex/SOActiveX.rgs
0 → 100644
Dosyayı görüntüle @
6c32e6e4
HKCR
{
so_activex.SOActiveX.1 = s 'SOActiveX Class'
{
CLSID = s '{67F2A879-82D5-4A6D-8CC5-FFB3C114B69D}'
}
so_activex.SOActiveX = s 'SOActiveX Class'
{
CLSID = s '{67F2A879-82D5-4A6D-8CC5-FFB3C114B69D}'
CurVer = s 'so_activex.SOActiveX.1'
}
NoRemove CLSID
{
ForceRemove {67F2A879-82D5-4A6D-8CC5-FFB3C114B69D} = s 'SOActiveX Class'
{
ProgID = s 'so_activex.SOActiveX.1'
VersionIndependentProgID = s 'so_activex.SOActiveX'
ForceRemove 'Programmable'
InprocServer32 = s '%MODULE%'
{
val ThreadingModel = s 'Apartment'
}
ForceRemove 'Control'
ForceRemove 'ToolboxBitmap32' = s '%MODULE%, 101'
'MiscStatus' = s '0'
{
'1' = s '131473'
}
'TypeLib' = s '{61FA3F13-8061-4796-B055-3697ED28CB38}'
'Version' = s '1.0'
}
}
}
odk/examples/OLE/activex/SOComWindowPeer.cpp
0 → 100644
Dosyayı görüntüle @
6c32e6e4
// SOComWindowPeer.cpp : Implementation of CHelpApp and DLL registration.
#include "stdafx2.h"
#include "so_activex.h"
#include "SOComWindowPeer.h"
/////////////////////////////////////////////////////////////////////////////
//
STDMETHODIMP
SOComWindowPeer
::
InterfaceSupportsErrorInfo
(
REFIID
riid
)
{
static
const
IID
*
arr
[]
=
{
&
IID_ISOComWindowPeer
,
};
for
(
int
i
=
0
;
i
<
sizeof
(
arr
)
/
sizeof
(
arr
[
0
]);
i
++
)
{
if
(
InlineIsEqualGUID
(
*
arr
[
i
],
riid
))
return
S_OK
;
}
return
S_FALSE
;
}
odk/examples/OLE/activex/SOComWindowPeer.h
0 → 100644
Dosyayı görüntüle @
6c32e6e4
// SOComWindowPeer.h: Definition of the SOComWindowPeer class
//
//////////////////////////////////////////////////////////////////////
#if !defined __SOCOMWINDOWPEER_H_
#define __SOCOMWINDOWPEER_H_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "resource.h" // main symbols
#include <ExDispID.h>
#include <ExDisp.h>
#include <shlguid.h>
#include <atlctl.h>
#include "so_activex.h"
/////////////////////////////////////////////////////////////////////////////
// SOComWindowPeer
class
SOComWindowPeer
:
public
IDispatchImpl
<
ISOComWindowPeer
,
&
IID_ISOComWindowPeer
,
&
LIBID_SO_ACTIVEXLib
>
,
public
ISupportErrorInfo
,
public
CComObjectRoot
,
public
CComCoClass
<
SOComWindowPeer
,
&
CLSID_SOComWindowPeer
>
{
HWND
m_hwnd
;
public
:
SOComWindowPeer
()
:
m_hwnd
(
NULL
)
{}
BEGIN_COM_MAP
(
SOComWindowPeer
)
COM_INTERFACE_ENTRY
(
IDispatch
)
COM_INTERFACE_ENTRY
(
ISOComWindowPeer
)
COM_INTERFACE_ENTRY
(
ISupportErrorInfo
)
END_COM_MAP
()
DECLARE_NOT_AGGREGATABLE
(
SOComWindowPeer
)
// Remove the comment from the line above if you don't want your object to
// support aggregation.
DECLARE_REGISTRY_RESOURCEID
(
IDR_SOCOMWINDOWPEER
)
// ISupportsErrorInfo
STDMETHOD
(
InterfaceSupportsErrorInfo
)(
REFIID
riid
);
// ISOComWindowPeer
virtual
/* [helpstring][id] */
HRESULT
STDMETHODCALLTYPE
getWindowHandle
(
/* [in] */
SAFEARRAY
__RPC_FAR
*
procId
,
/* [in] */
short
s
,
/* [retval][out] */
long
__RPC_FAR
*
ret
)
{
*
ret
=
(
long
)
m_hwnd
;
return
S_OK
;
}
virtual
/* [helpstring][id] */
HRESULT
STDMETHODCALLTYPE
getToolkit
(
/* [retval][out] */
IDispatch
__RPC_FAR
*
__RPC_FAR
*
retVal
)
{
*
retVal
=
NULL
;
return
S_OK
;
}
virtual
/* [helpstring][id] */
HRESULT
STDMETHODCALLTYPE
setPointer
(
/* [in] */
IDispatch
__RPC_FAR
*
xPointer
)
{
return
S_OK
;
}
virtual
/* [helpstring][id] */
HRESULT
STDMETHODCALLTYPE
setBackground
(
/* [in] */
int
nColor
)
{
return
S_OK
;
}
virtual
/* [helpstring][id] */
HRESULT
STDMETHODCALLTYPE
invalidate
(
/* [in] */
short
__MIDL_0015
)
{
return
S_OK
;
}
virtual
/* [helpstring][id] */
HRESULT
STDMETHODCALLTYPE
invalidateRect
(
/* [in] */
IDispatch
__RPC_FAR
*
aRect
,
/* [in] */
short
nFlags
)
{
return
S_OK
;
}
virtual
/* [helpstring][id] */
HRESULT
STDMETHODCALLTYPE
dispose
(
void
)
{
return
S_OK
;
}
virtual
/* [helpstring][id] */
HRESULT
STDMETHODCALLTYPE
addEventListener
(
/* [in] */
IDispatch
__RPC_FAR
*
xListener
)
{
return
S_OK
;
}
virtual
/* [helpstring][id] */
HRESULT
STDMETHODCALLTYPE
removeEventListener
(
/* [in] */
IDispatch
__RPC_FAR
*
xListener
)
{
return
S_OK
;
}
virtual
/* [helpstring][id][propget] */
HRESULT
STDMETHODCALLTYPE
get_Bridge_implementedInterfaces
(
/* [retval][out] */
SAFEARRAY
__RPC_FAR
*
__RPC_FAR
*
pVal
)
{
*
pVal
=
SafeArrayCreateVector
(
VT_BSTR
,
0
,
2
);
if
(
!*
pVal
)
return
E_FAIL
;
long
ix
=
0
;
CComBSTR
aInterface
(
OLESTR
(
"com.sun.star.awt.XSystemDependentWindowPeer"
)
);
SafeArrayPutElement
(
*
pVal
,
&
ix
,
aInterface
);
ix
=
1
;
aInterface
=
CComBSTR
(
OLESTR
(
"com.sun.star.awt.XWindowPeer"
)
);
SafeArrayPutElement
(
*
pVal
,
&
ix
,
aInterface
);
return
S_OK
;
}
void
SetHWNDInternally
(
HWND
hwnd
)
{
m_hwnd
=
hwnd
;
}
};
#endif // __SOCOMWINDOWPEER_H_
odk/examples/OLE/activex/SOComWindowPeer.rgs
0 → 100644
Dosyayı görüntüle @
6c32e6e4
HKCR
{
so_activex.SOComWindowPeer.1 = s 'SOComWindowPeer Class'
{
CLSID = s '{EE51BD3E-8BB6-4FB8-B319-F65B1BE3B21D}'
}
so_activex.SOComWindowPeer = s 'SOComWindowPeer Class'
{
CLSID = s '{EE51BD3E-8BB6-4FB8-B319-F65B1BE3B21D}'
}
NoRemove CLSID
{
ForceRemove {EE51BD3E-8BB6-4FB8-B319-F65B1BE3B21D} = s 'SOComWindowPeer Class'
{
ProgID = s 'so_activex.SOComWindowPeer.1'
VersionIndependentProgID = s 'so_activex.SOComWindowPeer'
InprocServer32 = s '%MODULE%'
{
val ThreadingModel = s 'both'
}
}
}
}
odk/examples/OLE/activex/StdAfx2.cpp
0 → 100644
Dosyayı görüntüle @
6c32e6e4
// stdafx1.cpp : source file that includes just the standard includes
// stdafx1.pch will be the pre-compiled header
// stdafx1.obj will contain the pre-compiled type information
#include "stdafx2.h"
#ifdef _ATL_STATIC_REGISTRY
#include <statreg.h>
#include <statreg.cpp>
#endif
#include <atlimpl.cpp>
odk/examples/OLE/activex/StdAfx2.h
0 → 100644
Dosyayı görüntüle @
6c32e6e4
// stdafx1.h : include file for standard system include files,
// or project specific include files that are used frequently,
// but are changed infrequently
#if !defined(AFX_STDAFX_H__C1799EA0_62CC_44DE_A2DD_C9F0410FF7F1__INCLUDED_)
#define AFX_STDAFX_H__C1799EA0_62CC_44DE_A2DD_C9F0410FF7F1__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define STRICT
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0400
#endif
#define _ATL_APARTMENT_THREADED
#define _ATL_STATIC_REGISTRY
#define min(a, b) (((a) < (b)) ? (a) : (b))
#include <atlbase.h>
//You may derive a class from CComModule and use it if you want to override
//something, but do not change the name of _Module
extern
CComModule
_Module
;
#include <atlcom.h>
#include <atlctl.h>
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__C1799EA0_62CC_44DE_A2DD_C9F0410FF7F1__INCLUDED)
odk/examples/OLE/activex/example.html
0 → 100644
Dosyayı görüntüle @
6c32e6e4
<HTML>
<HEAD>
<TITLE>
Document Title
</TITLE>
</HEAD>
<BODY>
<center>
<OBJECT
CLASSID=
"clsid:67F2A879-82D5-4A6D-8CC5-FFB3C114B69D"
width=
"500"
height=
"500"
CODEBASE=
".\so_activex.dll"
>
<PARAM
NAME=
"src"
VALUE=
"private:factory/swriter"
>
<PARAM
NAME=
"readonly"
VALUE=
"true"
>
<!-- Full URL to a document
<PARAM NAME="src" VALUE="file:///d:/example.sxw">
-->
<!-- Just view the document, do not edit
<PARAM NAME="readonly" VALUE="true">
-->
</OBJECT>
</center>
</BODY>
</HTML>
odk/examples/OLE/activex/resource.h
0 → 100644
Dosyayı görüntüle @
6c32e6e4
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by so_activex.rc
//
#define IDS_PROJNAME 100
#define IDB_SOACTIVEX 101
#define IDR_SOACTIVEX 102
#define IDB_SOCOMWINDOWPEER 103
#define IDR_SOCOMWINDOWPEER 104
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 201
#define _APS_NEXT_COMMAND_VALUE 32768
#define _APS_NEXT_CONTROL_VALUE 201
#define _APS_NEXT_SYMED_VALUE 105
#endif
#endif
odk/examples/OLE/activex/so_activex.cpp
0 → 100644
Dosyayı görüntüle @
6c32e6e4
// so_activex.cpp : Implementation of DLL Exports.
// Note: Proxy/Stub Information
// To build a separate proxy/stub DLL,
// run nmake -f so_activexps.mk in the project directory.
#include "stdafx2.h"
#include "resource.h"
#include <initguid.h>
#include "so_activex.h"
#include "so_activex_i.c"
#include "SOActiveX.h"
CComModule
_Module
;
BEGIN_OBJECT_MAP
(
ObjectMap
)
OBJECT_ENTRY
(
CLSID_SOActiveX
,
CSOActiveX
)
END_OBJECT_MAP
()
/////////////////////////////////////////////////////////////////////////////
// DLL Entry Point
extern
"C"
BOOL
WINAPI
DllMain
(
HINSTANCE
hInstance
,
DWORD
dwReason
,
LPVOID
/*lpReserved*/
)
{
if
(
dwReason
==
DLL_PROCESS_ATTACH
)
{
_Module
.
Init
(
ObjectMap
,
hInstance
,
&
LIBID_SO_ACTIVEXLib
);
DisableThreadLibraryCalls
(
hInstance
);
}
else
if
(
dwReason
==
DLL_PROCESS_DETACH
)
_Module
.
Term
();
return
TRUE
;
// ok
}
/////////////////////////////////////////////////////////////////////////////
// Used to determine whether the DLL can be unloaded by OLE
STDAPI
DllCanUnloadNow
(
void
)
{
return
(
_Module
.
GetLockCount
()
==
0
)
?
S_OK
:
S_FALSE
;
}
/////////////////////////////////////////////////////////////////////////////
// Returns a class factory to create an object of the requested type
STDAPI
DllGetClassObject
(
REFCLSID
rclsid
,
REFIID
riid
,
LPVOID
*
ppv
)
{
return
_Module
.
GetClassObject
(
rclsid
,
riid
,
ppv
);
}
/////////////////////////////////////////////////////////////////////////////
// DllRegisterServer - Adds entries to the system registry
STDAPI
DllRegisterServer
(
void
)
{
HRESULT
aResult
=
_Module
.
RegisterServer
(
TRUE
);
return
aResult
;
}
/////////////////////////////////////////////////////////////////////////////
// DllUnregisterServer - Removes entries from the system registry
STDAPI
DllUnregisterServer
(
void
)
{
HRESULT
aResult
=
_Module
.
UnregisterServer
(
TRUE
);
return
aResult
;
}
odk/examples/OLE/activex/so_activex.def
0 → 100644
Dosyayı görüntüle @
6c32e6e4
; iervp.def : Declares the module parameters.
LIBRARY "so_activex.dll"
EXPORTS
DllCanUnloadNow @1 PRIVATE
DllGetClassObject @2 PRIVATE
DllRegisterServer @3 PRIVATE
DllUnregisterServer @4 PRIVATE
odk/examples/OLE/activex/so_activex.idl
0 → 100644
Dosyayı görüntüle @
6c32e6e4
//
so_activex
.
idl
:
IDL
source
for
so_activex
.
dll
//
//
This
file
will
be
processed
by
the
MIDL
tool
to
//
produce
the
type
library
(
so_activex
.
tlb)
and
marshalling
code
.
import
"oaidl.idl"
;
import
"ocidl.idl"
;
#
include
"olectl.h"
[
object
,
uuid
(
DACF7E3F
-
626B
-
4B
F9
-
964B
-
F4910C843711
),
dual
,
helpstring
(
"ISOActiveX Interface"
),
pointer_default
(
unique
)
]
interface
ISOActiveX
:
IDispatch
{
}
;
[
object
,
uuid
(
BF5D10F3
-
8
A10
-
4
A0B
-
B150
-
2B6
AA2D7E118
),
dual
,
helpstring
(
"ISOComWindowPeer Interface"
),
pointer_default
(
unique
)
]
interface
ISOComWindowPeer
:
IDispatch
{
[
id
(
1
),
helpstring
(
"method getWindowHandle"
)
]
HRESULT
getWindowHandle
(
[
in
]
SAFEARRAY
(
VARIANT
)
procId
,
[
in
]
short
s
,
[
out
,
retval
]
long
*
ret
)
;
[
id
(
2
),
helpstring
(
"method getToolkit"
)
]
HRESULT
getToolkit
(
[
out
,
retval
]
IDispatch
**
retVal
)
;
[
id
(
3
),
helpstring
(
"method setPointer"
)
]
HRESULT
setPointer
(
[
in
]
IDispatch
*
xPointer
)
;
[
id
(
4
),
helpstring
(
"method setBackground"
)
]
HRESULT
setBackground
(
[
in
]
int
nColor
)
;
[
id
(
5
),
helpstring
(
"method invalidate"
)
]
HRESULT
invalidate
(
[
in
]
short
)
;
[
id
(
6
),
helpstring
(
"method invalidateRect"
)
]
HRESULT
invalidateRect
(
[
in
]
IDispatch
*
aRect
,
[
in
]
short
nFlags
)
;
[
id
(
7
),
helpstring
(
"method dispose"
)
]
HRESULT
dispose
()
;
[
id
(
8
),
helpstring
(
"method addEventListener"
)
]
HRESULT
addEventListener
(
[
in
]
IDispatch
*
xListener
)
;
[
id
(
9
),
helpstring
(
"method removeEventListener"
)
]
HRESULT
removeEventListener
(
[
in
]
IDispatch
*
xListener
)
;
[
propget
,
id
(
10
),
helpstring
(
"property_implementedInterfaces"
)
]
HRESULT
Bridge_implementedInterfaces
(
[
out
,
retval
]
SAFEARRAY
(
BSTR
)
*
pVal
)
;
}
;
[
uuid
(
61
FA3F13
-
8061
-
4796
-
B055
-
3697
ED28CB38
),
version
(
1.0
),
helpstring
(
"so_activex 1.0 Type Library"
)
]
library
SO_ACTIVEXLib
{
importlib
(
"stdole32.tlb"
)
;
importlib
(
"stdole2.tlb"
)
;
[
uuid
(
7
F760565
-
5719
-
4
F04
-
BA86
-
112
C474B10EA
),
helpstring
(
"_ISOActiveXEvents Interface"
)
]
dispinterface
_ISOActiveXEvents
{
properties
:
methods
:
}
;
[
uuid
(
67
F2A879
-
82
D5
-
4
A6D
-
8
CC5
-
FFB3C114B69D
),
helpstring
(
"SOActiveX Class"
)
]
coclass
SOActiveX
{
[
default
]
interface
ISOActiveX
;
[
default
,
source
]
dispinterface
_ISOActiveXEvents
;
}
;
[
uuid
(
EE51BD3E
-
8B
B6
-
4
FB8
-
B319
-
F65B1BE3B21D
),
helpstring
(
"SOComWindowPeer Class"
)
]
coclass
SOComWindowPeer
{
[
default
]
interface
ISOComWindowPeer
;
}
;
}
;
odk/examples/OLE/activex/so_activex.rc
0 → 100644
Dosyayı görüntüle @
6c32e6e4
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "winres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// Russian resources
//#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
//#ifdef _WIN32
//LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
//#pragma code_page(1251)
//#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Bitmap
//
//IDB_SOACTIVEX BITMAP DISCARDABLE "soacti.bmp"
/////////////////////////////////////////////////////////////////////////////
//
// REGISTRY
//
IDR_SOACTIVEX REGISTRY DISCARDABLE "SOActiveX.rgs"
IDR_SOCOMWINDOWPEER REGISTRY DISCARDABLE "SOComWindowPeer.rgs"
//#endif // Russian resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""winres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"1 TYPELIB ""so_activex.tlb""\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE DISCARDABLE
BEGIN
IDS_PROJNAME "so_activex"
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
1 TYPELIB .\..\..\..\WINexample.out\misc\so_activex.tlb
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment