Subversion Repositories Aucun

Compare Revisions

Regard whitespace Rev 194 → Rev 195

/branches/selfserve/shellie/Shellie.idl
0,0 → 1,36
import "oaidl.idl";
import "ocidl.idl";
import "atliface.idl";
 
#include "olectl.h"
//*
[
object,
uuid(9D366CB1-030D-48AF-B643-0FA18E89C4D1),
dual,
nonextensible,
helpstring("IBrowserLockDown Interface"),
pointer_default(unique)
]
interface IBrowserLockDown : IDocHostUIHandlerDispatch{
};
//*/
 
[
uuid(1DDCF4D2-18F8-420f-BB91-89977CBCEB44),
version(1.0),
]
library SHELLIELib
{
importlib("stdole32.tlb");
importlib("stdole2.tlb");
[
uuid(9C932A51-F06B-4A97-B4A8-9C1A3A5F7AC1),
helpstring("BrowserLockDown Class")
]
coclass BrowserLockDown
{
[default] interface IDocHostUIHandlerDispatch;
};
};
/branches/selfserve/shellie/BrowserLockDown.cpp
0,0 → 1,121
// BrowserLockDown.cpp : Implementation of CBrowserLockDown
 
#include "stdafx.h"
#include "BrowserLockDown.h"
 
 
// CBrowserLockDown
 
STDMETHODIMP CBrowserLockDown::ShowContextMenu(ULONG dwID, tagPOINT * ppt, IUnknown * pcmdtReserved, IDispatch * pdispReserved)
{
if(GetAsyncKeyState(VK_CONTROL) < 0)
return S_FALSE;
 
return S_OK;
}
 
STDMETHODIMP CBrowserLockDown::GetHostInfo(_DOCHOSTUIINFO * pInfo)
{
if (pInfo == NULL)
return E_POINTER;
 
pInfo->cbSize = sizeof _DOCHOSTUIINFO;
pInfo->dwFlags = 0
//| DOCHOSTUIFLAG_DIALOG
| DOCHOSTUIFLAG_DISABLE_HELP_MENU
//| DOCHOSTUIFLAG_NO3DBORDER
//| DOCHOSTUIFLAG_NO3DOUTERBORDER
//| DOCHOSTUIFLAG_SCROLL_NO
| DOCHOSTUIFLAG_DISABLE_SCRIPT_INACTIVE
//| DOCHOSTUIFLAG_OPENNEWWIN
//| DOCHOSTUIFLAG_DISABLE_OFFSCREEN
| DOCHOSTUIFLAG_FLAT_SCROLLBAR
//| DOCHOSTUIFLAG_DIV_BLOCKDEFAULT
| DOCHOSTUIFLAG_ACTIVATE_CLIENTHIT_ONLY
//| DOCHOSTUIFLAG_OVERRIDEBEHAVIORFACTORY
//| DOCHOSTUIFLAG_CODEPAGELINKEDFONTS
//| DOCHOSTUIFLAG_URL_ENCODING_DISABLE_UTF8
//| DOCHOSTUIFLAG_URL_ENCODING_ENABLE_UTF8
//| DOCHOSTUIFLAG_ENABLE_FORMS_AUTOCOMPLETE
//| DOCHOSTUIFLAG_ENABLE_INPLACE_NAVIGATION
//| DOCHOSTUIFLAG_IME_ENABLE_RECONVERSION
//| DOCHOSTUIFLAG_THEME
| DOCHOSTUIFLAG_NOTHEME
//| DOCHOSTUIFLAG_NOPICS
;
 
pInfo->dwDoubleClick = DOCHOSTUIDBLCLK_DEFAULT;
return S_OK;
}
 
STDMETHODIMP CBrowserLockDown::ShowUI(ULONG dwID, IOleInPlaceActiveObject * pActiveObject, IOleCommandTarget * pCommandTarget, IOleInPlaceFrame * pFrame, IOleInPlaceUIWindow * pDoc)
{
return S_OK;
}
 
STDMETHODIMP CBrowserLockDown::HideUI()
{
return S_OK;
}
 
STDMETHODIMP CBrowserLockDown::UpdateUI()
{
return S_OK;
}
 
STDMETHODIMP CBrowserLockDown::EnableModeless(BOOL fEnable)
{
return S_OK;
}
 
STDMETHODIMP CBrowserLockDown::OnDocWindowActivate(BOOL fActivate)
{
return S_OK;
}
 
STDMETHODIMP CBrowserLockDown::OnFrameWindowActivate(BOOL fActivate)
{
return S_OK;
}
 
STDMETHODIMP CBrowserLockDown::ResizeBorder(const RECT * prcBorder, IOleInPlaceUIWindow * pUIWindow, BOOL fRameWindow)
{
return S_OK;
}
 
STDMETHODIMP CBrowserLockDown::TranslateAccelerator(MSG * lpmsg, const GUID * pguidCmdGroup, DWORD nCmdID)
{
return E_NOTIMPL;
}
 
STDMETHODIMP CBrowserLockDown::GetOptionKeyPath(LPWSTR * pchKey, ULONG dw)
{
if (pchKey != NULL)
pchKey = 0;
return S_FALSE;
}
 
STDMETHODIMP CBrowserLockDown::GetDropTarget(IDropTarget * pDropTarget, IDropTarget * * ppDropTarget)
{
return E_NOTIMPL;
}
 
STDMETHODIMP CBrowserLockDown::GetExternal(IDispatch * * ppDispatch)
{
if(ppDispatch)
*ppDispatch = 0;
 
return E_NOTIMPL;
}
 
STDMETHODIMP CBrowserLockDown::TranslateUrl(ULONG dwTranslate, OLECHAR * pchURLIn, OLECHAR ** ppchURLOut)
{
return S_FALSE;
}
 
STDMETHODIMP CBrowserLockDown::FilterDataObject(IDataObject * pDO, IDataObject * * ppDORet)
{
return S_FALSE;
}
/branches/selfserve/shellie/shellie.cpp
9,9 → 9,15
#include "MainFrm.h"
#include "RESHelper.h"
#include "toolhelp_iterator.h"
#include "BrowserLockDown.h"
 
CAppModule _Module;
 
BEGIN_OBJECT_MAP(ObjectMap)
OBJECT_ENTRY_NON_CREATEABLE(CBrowserLockDown)
END_OBJECT_MAP()
 
 
int Run(LPTSTR /*lpstrCmdLine*/ = NULL, int nCmdShow = SW_SHOWDEFAULT)
{
CMessageLoop theLoop;
/branches/selfserve/shellie/BrowserLockDown.h
0,0 → 1,194
// BrowserLockDown.h : Declaration of the CBrowserLockDown
 
#pragma once
#include "resource.h" // main symbols
 
#include "shellie.h"
#include <atliface.h>
 
 
 
// CBrowserLockDown
 
class ATL_NO_VTABLE CBrowserLockDown :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CBrowserLockDown, &CLSID_BrowserLockDown>,
public IDispatchImpl<IBrowserLockDown, &IID_IBrowserLockDown, &LIBID_SHELLIELib, /*wMajor =*/ 1, /*wMinor =*/ 0>
{
public:
CBrowserLockDown()
{
}
 
DECLARE_REGISTRY_RESOURCEID(IDR_BROWSERLOCKDOWN)
 
 
BEGIN_COM_MAP(CBrowserLockDown)
COM_INTERFACE_ENTRY(IBrowserLockDown)
COM_INTERFACE_ENTRY(IDocHostUIHandlerDispatch)
COM_INTERFACE_ENTRY(IDispatch)
END_COM_MAP()
 
 
 
DECLARE_PROTECT_FINAL_CONSTRUCT()
 
HRESULT FinalConstruct()
{
return S_OK;
}
 
void FinalRelease()
{
}
 
public:
/*
// IDocHostUIHandler
//STDMETHOD(ShowContextMenu)(ULONG dwID, tagPOINT * ppt, IUnknown * pcmdtReserved, IDispatch * pdispReserved);
//HRESULT STDMETHODCALLTYPE ShowContextMenu(DWORD dwID, DWORD x, DWORD y, IUnknown *pcmdtReserved, IDispatch *pdispReserved, HRESULT *dwRetVal )
STDMETHOD(GetHostInfo)(_DOCHOSTUIINFO * pInfo);
STDMETHOD(ShowUI)(ULONG dwID, IOleInPlaceActiveObject * pActiveObject, IOleCommandTarget * pCommandTarget, IOleInPlaceFrame * pFrame, IOleInPlaceUIWindow * pDoc);
STDMETHOD(HideUI)();
STDMETHOD(UpdateUI)();
STDMETHOD(EnableModeless)(BOOL fEnable);
STDMETHOD(OnDocWindowActivate)(BOOL fActivate);
STDMETHOD(OnFrameWindowActivate)(BOOL fActivate);
STDMETHOD(ResizeBorder)(const RECT * prcBorder, IOleInPlaceUIWindow * pUIWindow, BOOL fRameWindow);
STDMETHOD(TranslateAccelerator)(MSG * lpmsg, const GUID * pguidCmdGroup, DWORD nCmdID);
STDMETHOD(GetOptionKeyPath)(LPWSTR * pchKey, ULONG dw);
STDMETHOD(GetDropTarget)(IDropTarget * pDropTarget, IDropTarget * * ppDropTarget);
STDMETHOD(GetExternal)(IDispatch * * ppDispatch);
STDMETHOD(TranslateUrl)(ULONG dwTranslate, OLECHAR * pchURLIn, OLECHAR * * ppchURLOut);
STDMETHOD(FilterDataObject)(IDataObject * pDO, IDataObject * * ppDORet);
/*/
// Do not show the context menu
STDMETHOD (ShowContextMenu) (
DWORD dwID,
DWORD x,
DWORD y,
IUnknown *pcmdtReserved,
IDispatch *pdispReserved,
HRESULT *dwRetVal)
;
// Mark all the other methods as not implemented
 
STDMETHOD (GetHostInfo) (
DWORD *pdwFlags,
DWORD *pdwDoubleClick)
{
return E_NOTIMPL;
}
 
 
STDMETHOD (ShowUI) (
DWORD dwID,
IUnknown *pActiveObject,
IUnknown *pCommandTarget,
IUnknown *pFrame,
IUnknown *pDoc,
HRESULT *dwRetVal)
{
return E_NOTIMPL;
}
 
 
STDMETHOD (HideUI) (void)
{
return E_NOTIMPL;
}
 
 
STDMETHOD (UpdateUI) (void)
{
return E_NOTIMPL;
}
 
STDMETHOD (EnableModeless) (
VARIANT_BOOL fEnable)
{
return E_NOTIMPL;
}
 
 
STDMETHOD (OnDocWindowActivate) (
VARIANT_BOOL fActivate)
{
return E_NOTIMPL;
}
 
 
STDMETHOD (OnFrameWindowActivate) (
VARIANT_BOOL fActivate)
{
return E_NOTIMPL;
}
 
 
STDMETHOD (ResizeBorder) (
long left,
long top,
long right,
long bottom,
IUnknown *pUIWindow,
VARIANT_BOOL fFrameWindow)
{
return E_NOTIMPL;
}
 
 
STDMETHOD (TranslateAccelerator) (
DWORD hWnd,
DWORD nMessage,
DWORD wParam,
DWORD lParam,
BSTR bstrGuidCmdGroup,
DWORD nCmdID,
HRESULT *dwRetVal)
{
return E_NOTIMPL;
}
 
 
STDMETHOD (GetOptionKeyPath) (
BSTR *pbstrKey,
DWORD dw)
{
return E_NOTIMPL;
}
 
 
STDMETHOD (GetDropTarget) (
IUnknown *pDropTarget,
IUnknown **ppDropTarget)
{
return E_NOTIMPL;
}
 
 
STDMETHOD (GetExternal) (
IDispatch **ppDispatch)
{
return E_NOTIMPL;
}
 
 
STDMETHOD (TranslateUrl) (
DWORD dwTranslate,
BSTR bstrURLIn,
BSTR *pbstrURLOut)
{
return E_NOTIMPL;
}
 
 
STDMETHOD (FilterDataObject) (
IUnknown *pDO,
IUnknown **ppDORet)
{
return E_NOTIMPL;
}
//*/
};
 
//OBJECT_ENTRY_AUTO(__uuidof(BrowserLockDown), CBrowserLockDown)
/branches/selfserve/shellie/shellie.h
4,7 → 4,7
 
 
/* File created by MIDL compiler version 7.00.0500 */
/* at Thu May 27 23:48:14 2010
/* at Wed Jun 02 23:26:00 2010
*/
/* Compiler settings for .\Shellie.idl:
Oicf, W1, Zp8, env=Win32 (32b run)
/branches/selfserve/shellie/BrowserLockDown.rgs
0,0 → 1,23
HKCR
{
shellie.BrowserLockDown.1 = s 'BrowserLockDown Class'
{
CLSID = s '{9C932A51-F06B-4A97-B4A8-9C1A3A5F7AC1}'
}
shellie.BrowserLockDown = s 'BrowserLockDown Class'
{
CLSID = s '{9C932A51-F06B-4A97-B4A8-9C1A3A5F7AC1}'
CurVer = s 'shellie.BrowserLockDown.1'
}
NoRemove CLSID
{
ForceRemove {9C932A51-F06B-4A97-B4A8-9C1A3A5F7AC1} = s 'BrowserLockDown Class'
{
ProgID = s 'shellie.BrowserLockDown.1'
VersionIndependentProgID = s 'shellie.BrowserLockDown'
ForceRemove 'Programmable'
LocalServer32 = s '%MODULE%'
'TypeLib' = s '{1DDCF4D2-18F8-420f-BB91-89977CBCEB44}'
}
}
}