Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# Tools/Xabsl2/yabsl/vsyabsl/dllmain.cpp File Reference

`#include <malloc.h>`
`#include "common.h"`
`#include "dllmain.h"`
`#include "languagedef.h"`

Include dependency graph for dllmain.cpp:

Go to the source code of this file.

## Classes
class | BabelServiceFactory
## Functions
HRESULT | RegisterServer (in bool registerIt)
HRESULT | GetRegistrationRoot (Str pszRegistrationRoot, ULONG cchBuffer=_MAX_PATH)
HRESULT | LoadTypeInfo ()
HRESULT | RegCreateValue (in HKEY key, in CStr name, in CStr value)
HRESULT | RegCreateDwordValue (in HKEY key, in CStr name, in DWORD value)
HRESULT | RegDeleteRecursive (in HKEY keyRoot, in CStr path)
BOOL APIENTRY | DllMain (HINSTANCE instance, DWORD reason, LPVOID reserved)
STDAPI | DllCanUnloadNow ()
STDAPI | DllGetClassObject (REFCLSID clsid, REFIID iid, LPVOID *obj)
STDAPI | DllRegisterServer ()
STDAPI | DllUnregisterServer ()
| STDMETHODIMP_ (ULONG) BabelServiceFactory
HRESULT | RegisterService (in CStr regPathVS, in const CLSID &packageCLSID, in bool registerIt)
## Variables
ITypeInfo * | g_typeInfoBabelService = NULL
HINSTANCE | g_instance = NULL
ULONG | g_dllRefCount = 0
const CLSID | babelPackageCLSID7
CStr | regPathVS7 = STR("Software\\Microsoft\\VisualStudio\\7.1")
CStr | regPathVS7_NoVersion = STR("Software\\Microsoft\\VisualStudio\\")
CStr | regPathFileExts = STR("Languages\\File Extensions")
CStr | regPathLServices = STR("Languages\\Language Services")
CStr | regPathServices = STR("Services")

## Function Documentation

HRESULT RegisterServer | ( | in bool | registerIt | ) | `[static]`

| Definition at line 393 of file dllmain.cpp. References Ansi2CStr(), babelPackageCLSID7, Char, g_instance, g_languageCLSID, g_languageName, GetRegistrationRoot(), Ole2CStr, OleChar, RegCreateValue(), RegDeleteRecursive(), RegisterService(), STR, strCat, strCopy, and USECONV. Referenced by DllRegisterServer(), and DllUnregisterServer().

Here is the call graph for this function:

HRESULT GetRegistrationRoot | ( | Str | pszRegistrationRoot,
|  | ULONG | cchBuffer = _MAX_PATH
| ) | `[static]`

| Definition at line 531 of file dllmain.cpp. References regPathVS7, regPathVS7_NoVersion, Str, and strCopy. Referenced by RegisterServer().

HRESULT LoadTypeInfo | ( |  | ) | `[static]`

| Definition at line 219 of file dllmain.cpp. References g_typeInfoBabelService, and RELEASE. Referenced by DllMain().

HRESULT RegCreateValue | ( | in HKEY | key,
|  | in CStr | name,
|  | in CStr | value
| ) | `[static]`

| Definition at line 471 of file dllmain.cpp. References Char, CStr, and strLen. Referenced by RegisterServer(), and RegisterService().

HRESULT RegCreateDwordValue | ( | in HKEY | key,
|  | in CStr | name,
|  | in DWORD | value
| ) | `[static]`

| Definition at line 478 of file dllmain.cpp. References CStr. Referenced by RegisterService().

HRESULT RegDeleteRecursive | ( | in HKEY | keyRoot,
|  | in CStr | path
| ) | `[static]`

| Definition at line 484 of file dllmain.cpp. References ASSERT, Char, CStr, Str, and WINERROR. Referenced by RegisterServer(), and RegisterService().

BOOL APIENTRY DllMain | ( | HINSTANCE | instance,
|  | DWORD | reason,
|  | LPVOID | reserved
| ) |

| Definition at line 74 of file dllmain.cpp. References g_dllRefCount, g_instance, g_languageName, g_typeInfoBabelService, LoadTypeInfo(), RELEASE, TRACE, TRACE_DONE, and TRACE_INIT.

Here is the call graph for this function:

STDAPI DllCanUnloadNow | ( |  | ) |

| Definition at line 101 of file dllmain.cpp. References g_dllRefCount.

STDAPI DllGetClassObject | ( | REFCLSID | clsid,
|  | REFIID | iid,
|  | LPVOID * | obj
| ) |

| Definition at line 107 of file dllmain.cpp. References g_languageCLSID, OUTARG, BabelServiceFactory::QueryInterface(), and RELEASE.

Here is the call graph for this function:

STDAPI DllRegisterServer | ( |  | ) |

| Definition at line 125 of file dllmain.cpp. References RegisterServer().

Here is the call graph for this function:

STDAPI DllUnregisterServer | ( |  | ) |

| Definition at line 131 of file dllmain.cpp. References RegisterServer().

Here is the call graph for this function:

STDMETHODIMP_ | ( | ULONG |  | ) |

| Definition at line 167 of file dllmain.cpp. References IncRefCount().

Here is the call graph for this function:

HRESULT RegisterService | ( | in CStr | regPathVS,
|  | in const CLSID & | packageCLSID,
|  | in bool | registerIt
| ) | `[static]`

| Definition at line 242 of file dllmain.cpp. References Ansi2CStr(), ansiToStrCat, Char, CStr, g_languageCLSID, g_languageFileExtensions, g_languageName, g_languageProperties, MAXPATH, LanguageProperty::name, OLE, Ole2CStr, OleChar, RegCreateDwordValue(), RegCreateValue(), RegDeleteRecursive(), regPathFileExts, regPathLServices, regPathServices, STR, strCat, USECONV, and LanguageProperty::value. Referenced by RegisterServer().

Here is the call graph for this function:

## Variable Documentation

ITypeInfo* g_typeInfoBabelService = NULL

| Definition at line 16 of file dllmain.cpp. Referenced by DllMain(), StdService::GetIDsOfNames(), StdService::GetTypeInfo(), StdService::GetTypeInfoCount(), StdService::Invoke(), and LoadTypeInfo().

HINSTANCE g_instance = NULL`[static]`

| Definition at line 18 of file dllmain.cpp. Referenced by DllMain(), and RegisterServer().

ULONG g_dllRefCount = 0`[static]`

| Definition at line 19 of file dllmain.cpp. Referenced by DllCanUnloadNow(), DllMain(), and BabelServiceFactory::LockServer().

const CLSID babelPackageCLSID7`[static]`

| Initial value:
      { 0x221f0eb7, 0x30f7, 0x45ff, { 0xae, 0x73, 0x59, 0x68, 0xb1, 0x67, 0xcf, 0x9 } }
Definition at line 22 of file dllmain.cpp. Referenced by RegisterServer().

CStr regPathVS7 = STR("Software\\Microsoft\\VisualStudio\\7.1")`[static]`

| Definition at line 26 of file dllmain.cpp. Referenced by GetRegistrationRoot().

CStr regPathVS7_NoVersion = STR("Software\\Microsoft\\VisualStudio\\")`[static]`

| Definition at line 27 of file dllmain.cpp. Referenced by GetRegistrationRoot().

CStr regPathFileExts = STR("Languages\\File Extensions")`[static]`

| Definition at line 29 of file dllmain.cpp. Referenced by RegisterService().

CStr regPathLServices = STR("Languages\\Language Services")`[static]`

| Definition at line 30 of file dllmain.cpp. Referenced by RegisterService().

CStr regPathServices = STR("Services")`[static]`

| Definition at line 31 of file dllmain.cpp. Referenced by RegisterService().