src/GvimExt/gvimext.cpp
//
//  FUNCTION: CShellExt::Initialize(LPCITEMIDLIST, LPDATAOBJECT, HKEY)
//
//  PURPOSE: Called by the shell when initializing a context menu or property
//	     sheet extension.
//
//  PARAMETERS:
//    pIDFolder - Specifies the parent folder
//    pDataObj  - Specifies the set of items selected in that folder.
//    hRegKey   - Specifies the type of the focused item in the selection.
//
//  RETURN VALUE:
//
//    NOERROR in all cases.
//
//  COMMENTS:   Note that at the time this function is called, we don't know
//		(or care) what type of shell extension is being initialized.
//		It could be a context menu or a property sheet.
//
:Initialize(LPCITEMIDLIST, LPDATAOBJECT, HKEY)
PURPOSE: Called by the shell when initializing a context menu or property
sheet extension.

Specifies the parent folder
pDataObj  - Specifies the set of items selected in that folder.
hRegKey   - Specifies the type of the focused item in the selection.

RETURN VALUE.

NOERROR in all cases.

Note that at the time this function is called, we don't know
(or care) what type of shell extension is being initialized.
It could be a context menu or a property sheet.
: Initialize ( LPCITEMIDLIST LPDATAOBJECT HKEY ) PURPOSE : Called by the shell when initializing a context menu or property sheet extension . Specifies the parent folder pDataObj - Specifies the set of items selected in that folder . hRegKey - Specifies the type of the focused item in the selection . RETURN VALUE . NOERROR in all cases . Note that at the time this function is called we don ' t know ( or care ) what type of shell extension is being initialized . It could be a context menu or a property sheet .
STDMETHODIMP CShellExt::Initialize(LPCITEMIDLIST  ,
				   LPDATAOBJECT pDataObj,
				   HKEY  )
{
    if (m_pDataObj)
	m_pDataObj->Release();
    if (pDataObj)
    {
	m_pDataObj = pDataObj;
	pDataObj->AddRef();
    }
    return NOERROR;
}
STDMETHODIMP CShellExt :: Initialize ( LPCITEMIDLIST , LPDATAOBJECT pDataObj , HKEY ) { if ( m_pDataObj ) m_pDataObj -> Release ( ) ; if ( pDataObj ) { m_pDataObj = pDataObj ; pDataObj -> AddRef ( ) ; } return NOERROR ; }
FUNCTION: CShellExt::Initialize(LPCITEMIDLIST, LPDATAOBJECT, HKEY)
PURPOSE: Called by the shell when initializing a context menu or property
sheet extension.
FUNCTION : CShellExt :: Initialize ( LPCITEMIDLIST LPDATAOBJECT HKEY ) PURPOSE : Called by the shell when initializing a context menu or property sheet extension .
/* pIDFolder */ /* hRegKey */ // Initialize can be called more than once // duplicate the object pointer and registry handle