mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
updated for version 7.0099
This commit is contained in:
@@ -78,7 +78,7 @@ class CVim : public IVim
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
~CVim();
|
~CVim();
|
||||||
static CVim *Create(int* pbDoRestart);
|
static CVim *Create(int *pbDoRestart);
|
||||||
|
|
||||||
// IUnknown members
|
// IUnknown members
|
||||||
STDMETHOD(QueryInterface)(REFIID riid, void ** ppv);
|
STDMETHOD(QueryInterface)(REFIID riid, void ** ppv);
|
||||||
@@ -88,14 +88,14 @@ public:
|
|||||||
// IDispatch members
|
// IDispatch members
|
||||||
STDMETHOD(GetTypeInfoCount)(UINT *pCount);
|
STDMETHOD(GetTypeInfoCount)(UINT *pCount);
|
||||||
STDMETHOD(GetTypeInfo)(UINT iTypeInfo, LCID, ITypeInfo **ppITypeInfo);
|
STDMETHOD(GetTypeInfo)(UINT iTypeInfo, LCID, ITypeInfo **ppITypeInfo);
|
||||||
STDMETHOD(GetIDsOfNames)(const IID& iid, OLECHAR** names, UINT n, LCID, DISPID *dispids);
|
STDMETHOD(GetIDsOfNames)(const IID &iid, OLECHAR **names, UINT n, LCID, DISPID *dispids);
|
||||||
STDMETHOD(Invoke)(DISPID member, const IID& iid, LCID, WORD flags, DISPPARAMS *dispparams, VARIANT *result, EXCEPINFO *excepinfo, UINT *argerr);
|
STDMETHOD(Invoke)(DISPID member, const IID &iid, LCID, WORD flags, DISPPARAMS *dispparams, VARIANT *result, EXCEPINFO *excepinfo, UINT *argerr);
|
||||||
|
|
||||||
// IVim members
|
// IVim members
|
||||||
STDMETHOD(SendKeys)(BSTR keys);
|
STDMETHOD(SendKeys)(BSTR keys);
|
||||||
STDMETHOD(Eval)(BSTR expr, BSTR *result);
|
STDMETHOD(Eval)(BSTR expr, BSTR *result);
|
||||||
STDMETHOD(SetForeground)(void);
|
STDMETHOD(SetForeground)(void);
|
||||||
STDMETHOD(GetHwnd)(UINT* result);
|
STDMETHOD(GetHwnd)(UINT *result);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Constructor is private - create using CVim::Create()
|
// Constructor is private - create using CVim::Create()
|
||||||
@@ -112,7 +112,7 @@ private:
|
|||||||
* --------------
|
* --------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
CVim *CVim::Create(int* pbDoRestart)
|
CVim *CVim::Create(int *pbDoRestart)
|
||||||
{
|
{
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
CVim *me = 0;
|
CVim *me = 0;
|
||||||
@@ -187,6 +187,7 @@ CVim::~CVim()
|
|||||||
{
|
{
|
||||||
if (typeinfo && vim_parent_hwnd == NULL)
|
if (typeinfo && vim_parent_hwnd == NULL)
|
||||||
typeinfo->Release();
|
typeinfo->Release();
|
||||||
|
typeinfo = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
STDMETHODIMP
|
STDMETHODIMP
|
||||||
@@ -242,8 +243,8 @@ CVim::GetTypeInfo(UINT iTypeInfo, LCID, ITypeInfo **ppITypeInfo)
|
|||||||
|
|
||||||
STDMETHODIMP
|
STDMETHODIMP
|
||||||
CVim::GetIDsOfNames(
|
CVim::GetIDsOfNames(
|
||||||
const IID& iid,
|
const IID &iid,
|
||||||
OLECHAR** names,
|
OLECHAR **names,
|
||||||
UINT n,
|
UINT n,
|
||||||
LCID,
|
LCID,
|
||||||
DISPID *dispids)
|
DISPID *dispids)
|
||||||
@@ -257,7 +258,7 @@ CVim::GetIDsOfNames(
|
|||||||
STDMETHODIMP
|
STDMETHODIMP
|
||||||
CVim::Invoke(
|
CVim::Invoke(
|
||||||
DISPID member,
|
DISPID member,
|
||||||
const IID& iid,
|
const IID &iid,
|
||||||
LCID,
|
LCID,
|
||||||
WORD flags,
|
WORD flags,
|
||||||
DISPPARAMS *dispparams,
|
DISPPARAMS *dispparams,
|
||||||
@@ -275,7 +276,7 @@ CVim::Invoke(
|
|||||||
}
|
}
|
||||||
|
|
||||||
STDMETHODIMP
|
STDMETHODIMP
|
||||||
CVim::GetHwnd(UINT* result)
|
CVim::GetHwnd(UINT *result)
|
||||||
{
|
{
|
||||||
*result = (UINT) s_hwnd;
|
*result = (UINT) s_hwnd;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
@@ -486,9 +487,9 @@ CVimCF::LockServer(BOOL lock)
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
// Internal use only
|
// Internal use only
|
||||||
static void SetKeyAndValue(const char* path, const char* subkey, const char* value);
|
static void SetKeyAndValue(const char *path, const char *subkey, const char *value);
|
||||||
static void GUIDtochar(const GUID& guid, char* GUID, int length);
|
static void GUIDtochar(const GUID &guid, char *GUID, int length);
|
||||||
static void RecursiveDeleteKey(HKEY hKeyParent, const char* child);
|
static void RecursiveDeleteKey(HKEY hKeyParent, const char *child);
|
||||||
static const int GUID_STRING_SIZE = 39;
|
static const int GUID_STRING_SIZE = 39;
|
||||||
|
|
||||||
// Register the component in the registry
|
// Register the component in the registry
|
||||||
@@ -607,7 +608,7 @@ extern "C" void UnregisterMe(int bNotifyUser)
|
|||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
// Convert a GUID to a char string
|
// Convert a GUID to a char string
|
||||||
static void GUIDtochar(const GUID& guid, char* GUID, int length)
|
static void GUIDtochar(const GUID &guid, char *GUID, int length)
|
||||||
{
|
{
|
||||||
// Get wide string version
|
// Get wide string version
|
||||||
LPOLESTR wGUID = NULL;
|
LPOLESTR wGUID = NULL;
|
||||||
@@ -621,7 +622,7 @@ static void GUIDtochar(const GUID& guid, char* GUID, int length)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Delete a key and all of its descendents
|
// Delete a key and all of its descendents
|
||||||
static void RecursiveDeleteKey(HKEY hKeyParent, const char* child)
|
static void RecursiveDeleteKey(HKEY hKeyParent, const char *child)
|
||||||
{
|
{
|
||||||
// Open the child
|
// Open the child
|
||||||
HKEY hKeyChild;
|
HKEY hKeyChild;
|
||||||
@@ -650,7 +651,7 @@ static void RecursiveDeleteKey(HKEY hKeyParent, const char* child)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create a key and set its value
|
// Create a key and set its value
|
||||||
static void SetKeyAndValue(const char* key, const char* subkey, const char* value)
|
static void SetKeyAndValue(const char *key, const char subkey, const char *value)
|
||||||
{
|
{
|
||||||
HKEY hKey;
|
HKEY hKey;
|
||||||
char buffer[1024];
|
char buffer[1024];
|
||||||
@@ -684,7 +685,7 @@ static void SetKeyAndValue(const char* key, const char* subkey, const char* valu
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
5. OLE Initialisation and shutdown processing
|
5. OLE Initialisation and shutdown processing
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
extern "C" void InitOLE(int* pbDoRestart)
|
extern "C" void InitOLE(int *pbDoRestart)
|
||||||
{
|
{
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user