mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
Possibly make OLE work on Windows 64 bit. (untested)
This commit is contained in:
@@ -50,6 +50,14 @@ WINOLEAUTAPI UnRegisterTypeLib(REFGUID libID, WORD wVerMajor,
|
|||||||
WORD wVerMinor, LCID lcid, SYSKIND syskind);
|
WORD wVerMinor, LCID lcid, SYSKIND syskind);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Modern way of creating registry entries, also works on 64 bit windows when
|
||||||
|
* compiled as a 32 bit program.
|
||||||
|
*/
|
||||||
|
# ifndef KEY_WOW64_64KEY
|
||||||
|
# define KEY_WOW64_64KEY 0x0100
|
||||||
|
# endif
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
1. Internal definitions for this file
|
1. Internal definitions for this file
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
@@ -157,7 +165,8 @@ CVim *CVim::Create(int *pbDoRestart)
|
|||||||
// Check we can write to the registry.
|
// Check we can write to the registry.
|
||||||
// RegCreateKeyEx succeeds even if key exists. W.Briscoe W2K 20021011
|
// RegCreateKeyEx succeeds even if key exists. W.Briscoe W2K 20021011
|
||||||
if (RegCreateKeyEx(HKEY_CLASSES_ROOT, MYVIPROGID, 0, NULL,
|
if (RegCreateKeyEx(HKEY_CLASSES_ROOT, MYVIPROGID, 0, NULL,
|
||||||
REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hKey, NULL))
|
REG_OPTION_NON_VOLATILE,
|
||||||
|
KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL, &hKey, NULL))
|
||||||
{
|
{
|
||||||
delete me;
|
delete me;
|
||||||
return NULL; // Unable to write to registry. Quietly fail.
|
return NULL; // Unable to write to registry. Quietly fail.
|
||||||
@@ -692,7 +701,7 @@ static void SetKeyAndValue(const char *key, const char *subkey, const char *valu
|
|||||||
long result = RegCreateKeyEx(HKEY_CLASSES_ROOT,
|
long result = RegCreateKeyEx(HKEY_CLASSES_ROOT,
|
||||||
buffer,
|
buffer,
|
||||||
0, NULL, REG_OPTION_NON_VOLATILE,
|
0, NULL, REG_OPTION_NON_VOLATILE,
|
||||||
KEY_ALL_ACCESS, NULL,
|
KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL,
|
||||||
&hKey, NULL);
|
&hKey, NULL);
|
||||||
if (result != ERROR_SUCCESS)
|
if (result != ERROR_SUCCESS)
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user