// ************************************************************************ //
// WARNING                                                                    
// -------                                                                    
// The types declared in this file were generated from data read from a       
// Type Library. If this type library is explicitly or indirectly (via        
// another type library referring to this type library) re-imported, or the   
// 'Refresh' command of the Type Library Editor activated while editing the   
// Type Library, the contents of this file will be regenerated and all        
// manual modifications will be lost.                                         
// ************************************************************************ //

// $Rev: 5081 $
// File generated on 2016-04-07 ¿ÀÈÄ 3:06:37 from Type Library described below.

// ************************************************************************  //
// Type Lib: C:\Program Files\Hnc\Hwp80\HwpCtrl.ocx (1)
// LIBID: {86E6E883-3879-4514-A25B-81023981DA19}
// LCID: 0
// Helpfile: C:\Program Files\Hnc\Hwp80\HwpCtrl.hlp
// HelpString: HwpCtrl ActiveX Control module
// DepndLst: 
//   (1) v2.0 stdole, (C:\WINDOWS\system32\STDOLE2.TLB)
// ************************************************************************ //

#include <vcl.h>
#pragma hdrstop

#include <olectrls.hpp>
#include <oleserver.hpp>
#if defined(USING_ATL)
#include <atl\atlvcl.h>
#endif

#include "HWPCONTROLLib_OCX.h"

#if !defined(__PRAGMA_PACKAGE_SMART_INIT)
#define      __PRAGMA_PACKAGE_SMART_INIT
#pragma package(smart_init)
#endif

namespace Hwpcontrollib_tlb
{



// *********************************************************************//
// OCX PROXY CLASS IMPLEMENTATION
// (The following variables/methods implement the class THwpCtrl which
// allows "HwpCtrl Control" to be hosted in CBuilder IDE/apps).
// *********************************************************************//
int   THwpCtrl::EventDispIDs[3] = {
    0x00000001, 0x00000002, 0x00000003};

TControlData THwpCtrl::CControlData =
{
  // GUID of CoClass and Event Interface of Control
  {0xBD9C32DE, 0x3155, 0x4691,{ 0x89, 0x72, 0x09,0x7D, 0x53, 0xB1,0x00, 0x52} }, // CoClass
  {0x402995CB, 0xFF79, 0x4467,{ 0xB7, 0xD1, 0x4F,0xFA, 0x32, 0x59,0x2B, 0x21} }, // Events

  // Count of Events and array of their DISPIDs
  3, &EventDispIDs,

  // Pointer to Runtime License string
  NULL,  // HRESULT(0x80004005)

  // Flags for OnChanged PropertyNotification
  0x00000000,
  300,// (IDE Version)

  // Count of Font Prop and array of their DISPIDs
  0, Activex::PDispIDList(NULL),

  // Count of Pict Prop and array of their DISPIDs
  0, Activex::PDispIDList(NULL),
  0, // Reserved
  0, // Instance count (used internally)
  0, // List of Enum descriptions (internal)
};

GUID     THwpCtrl::DEF_CTL_INTF = {0x377C0BC8, 0xE22C, 0x45ED,{ 0x85, 0x1A, 0xFB,0xA0, 0x20, 0x8D,0xDC, 0x23} };
TNoParam THwpCtrl::OptParam;

static inline void ValidCtrCheck(THwpCtrl *)
{
   delete new THwpCtrl((TComponent*)(0));
};

void __fastcall THwpCtrl::InitControlData()
{
  ControlData = &CControlData;
};

void __fastcall THwpCtrl::CreateControl()
{
  if (!m_OCXIntf)
  {
    _ASSERTE(DefaultDispatch);
    DefaultDispatch->QueryInterface(DEF_CTL_INTF, (LPVOID*)&m_OCXIntf);
  }
};

_DHwpCtrlDisp __fastcall THwpCtrl::GetDefaultInterface()
{
  CreateControl();
  return m_OCXIntf;
};

LPDISPATCH __fastcall THwpCtrl::InsertCtrl(BSTR ctrlid, VARIANT initparam/*[opt]*/)
{
  return  GetDefaultInterface()->InsertCtrl(ctrlid, initparam/*[opt]*/);
}

void __fastcall THwpCtrl::PutFieldText(BSTR fieldlist, BSTR textlist)
{
  GetDefaultInterface()->PutFieldText(fieldlist, textlist);
}

VARIANT_BOOL __fastcall THwpCtrl::MoveToField(BSTR field, VARIANT text/*[opt]*/, 
                                              VARIANT start/*[opt]*/, VARIANT select/*[opt]*/)
{
  return  GetDefaultInterface()->MoveToField(field, text/*[opt]*/, start/*[opt]*/, select/*[opt]*/);
}

VARIANT_BOOL __fastcall THwpCtrl::InitScan(VARIANT option/*[opt]*/, VARIANT range/*[opt]*/, 
                                           VARIANT spara/*[opt]*/, VARIANT spos/*[opt]*/, 
                                           VARIANT epara/*[opt]*/, VARIANT epos/*[opt]*/)
{
  return  GetDefaultInterface()->InitScan(option/*[opt]*/, range/*[opt]*/, spara/*[opt]*/, 
                                          spos/*[opt]*/, epara/*[opt]*/, epos/*[opt]*/);
}

VARIANT_BOOL __fastcall THwpCtrl::Open(BSTR Path, VARIANT format/*[opt]*/, VARIANT arg/*[opt]*/)
{
  return  GetDefaultInterface()->Open(Path, format/*[opt]*/, arg/*[opt]*/);
}

VARIANT_BOOL __fastcall THwpCtrl::Insert(BSTR Path, VARIANT format/*[opt]*/, VARIANT arg/*[opt]*/)
{
  return  GetDefaultInterface()->Insert(Path, format/*[opt]*/, arg/*[opt]*/);
}

VARIANT_BOOL __fastcall THwpCtrl::CreatePageImage(BSTR Path, VARIANT pgno/*[opt]*/, 
                                                  VARIANT resolution/*[opt]*/, 
                                                  VARIANT depth/*[opt]*/, VARIANT format/*[opt]*/)
{
  return  GetDefaultInterface()->CreatePageImage(Path, pgno/*[opt]*/, resolution/*[opt]*/, 
                                                 depth/*[opt]*/, format/*[opt]*/);
}

void __fastcall THwpCtrl::RenameField(BSTR oldname, BSTR newname)
{
  GetDefaultInterface()->RenameField(oldname, newname);
}

VARIANT_BOOL __fastcall THwpCtrl::Save(VARIANT save_if_dirty/*[opt]*/)
{
  return  GetDefaultInterface()->Save(save_if_dirty/*[opt]*/);
}

void __fastcall THwpCtrl::Run(BSTR actid)
{
  GetDefaultInterface()->Run(actid);
}

VARIANT_BOOL __fastcall THwpCtrl::GetSelectedPosBySet(LPDISPATCH sset, LPDISPATCH eset)
{
  return  GetDefaultInterface()->GetSelectedPosBySet(sset, eset);
}

LPDISPATCH __fastcall THwpCtrl::MakeVersionDiffAll(VARIANT filepath/*[opt]*/)
{
  return  GetDefaultInterface()->MakeVersionDiffAll(filepath/*[opt]*/);
}

VARIANT __fastcall THwpCtrl::GetFormObjectAttr(BSTR formname, BSTR attrname)
{
  return  GetDefaultInterface()->GetFormObjectAttr(formname, attrname);
}

VARIANT_BOOL __fastcall THwpCtrl::MoveToFieldEx(BSTR field, VARIANT text/*[opt]*/, 
                                                VARIANT start/*[opt]*/, VARIANT select/*[opt]*/)
{
  return  GetDefaultInterface()->MoveToFieldEx(field, text/*[opt]*/, start/*[opt]*/, select/*[opt]*/);
}

VARIANT_BOOL __fastcall THwpCtrl::SetAutoSave(BSTR FileName, long saveinterval)
{
  return  GetDefaultInterface()->SetAutoSave(FileName, saveinterval);
}

VARIANT_BOOL __fastcall THwpCtrl::VersionSave(BSTR filepath, long overwirte, long infolock, 
                                              VARIANT writer/*[opt]*/, VARIANT description/*[opt]*/)
{
  return  GetDefaultInterface()->VersionSave(filepath, overwirte, infolock, writer/*[opt]*/, 
                                             description/*[opt]*/);
}

VARIANT_BOOL __fastcall THwpCtrl::VersionDelete(long index)
{
  return  GetDefaultInterface()->VersionDelete(index);
}

long __fastcall THwpCtrl::GetTableCellAddr(long type)
{
  return  GetDefaultInterface()->GetTableCellAddr(type);
}

LPDISPATCH __fastcall THwpCtrl::GetVersionInfo(long index)
{
  return  GetDefaultInterface()->GetVersionInfo(index);
}

long __fastcall THwpCtrl::GetVersionHistoryCount(void)
{
  return  GetDefaultInterface()->GetVersionHistoryCount();
}

LPDISPATCH __fastcall THwpCtrl::CreateAction(BSTR actid)
{
  return  GetDefaultInterface()->CreateAction(actid);
}

VARIANT_BOOL __fastcall THwpCtrl::SaveDocument(BSTR szFileName, BSTR szFileType)
{
  return  GetDefaultInterface()->SaveDocument(szFileName, szFileType);
}

VARIANT_BOOL __fastcall THwpCtrl::OpenDocument(BSTR szFileName, BSTR szFileType)
{
  return  GetDefaultInterface()->OpenDocument(szFileName, szFileType);
}

LPDISPATCH __fastcall THwpCtrl::InsertPicture(BSTR Path, VARIANT embedded/*[opt]*/, 
                                              VARIANT sizeOption/*[opt]*/, VARIANT reverse/*[opt]*/, 
                                              VARIANT watermark/*[opt]*/, VARIANT effect/*[opt]*/, 
                                              VARIANT width/*[opt]*/, VARIANT height/*[opt]*/)
{
  return  GetDefaultInterface()->InsertPicture(Path, embedded/*[opt]*/, sizeOption/*[opt]*/, 
                                               reverse/*[opt]*/, watermark/*[opt]*/, effect/*[opt]*/, 
                                               width/*[opt]*/, height/*[opt]*/);
}

VARIANT_BOOL __fastcall THwpCtrl::SetCurFieldName(BSTR fieldname, VARIANT option/*[opt]*/, 
                                                  VARIANT direction/*[opt]*/, VARIANT memo/*[opt]*/)
{
  return  GetDefaultInterface()->SetCurFieldName(fieldname, option/*[opt]*/, direction/*[opt]*/, 
                                                 memo/*[opt]*/);
}

BSTR __fastcall THwpCtrl::GetCurFieldName(VARIANT option/*[opt]*/)
{
  return  GetDefaultInterface()->GetCurFieldName(option/*[opt]*/);
}

VARIANT_BOOL __fastcall THwpCtrl::SetToolBar(long lToolBarID, VARIANT varID)
{
  return  GetDefaultInterface()->SetToolBar(lToolBarID, varID);
}

VARIANT_BOOL __fastcall THwpCtrl::PrintDocument(void)
{
  return  GetDefaultInterface()->PrintDocument();
}

VARIANT_BOOL __fastcall THwpCtrl::ShowToolBar(long bShow)
{
  return  GetDefaultInterface()->ShowToolBar(bShow);
}

VARIANT_BOOL __fastcall THwpCtrl::SaveAs(BSTR Path, VARIANT format/*[opt]*/, VARIANT arg/*[opt]*/)
{
  return  GetDefaultInterface()->SaveAs(Path, format/*[opt]*/, arg/*[opt]*/);
}

VARIANT_BOOL __fastcall THwpCtrl::InsertDocument(BSTR szFileName)
{
  return  GetDefaultInterface()->InsertDocument(szFileName);
}

BSTR __fastcall THwpCtrl::GetFieldList(VARIANT number/*[opt]*/, VARIANT option/*[opt]*/)
{
  return  GetDefaultInterface()->GetFieldList(number/*[opt]*/, option/*[opt]*/);
}

VARIANT_BOOL __fastcall THwpCtrl::FieldExist(BSTR field)
{
  return  GetDefaultInterface()->FieldExist(field);
}

BSTR __fastcall THwpCtrl::GetFieldText(BSTR fieldlist)
{
  return  GetDefaultInterface()->GetFieldText(fieldlist);
}

void __fastcall THwpCtrl::Clear(VARIANT option/*[opt]*/)
{
  GetDefaultInterface()->Clear(option/*[opt]*/);
}

LPDISPATCH __fastcall THwpCtrl::CreateSet(BSTR setid)
{
  return  GetDefaultInterface()->CreateSet(setid);
}

VARIANT_BOOL __fastcall THwpCtrl::SelectText(long spara, long spos, long epara, long epos)
{
  return  GetDefaultInterface()->SelectText(spara, spos, epara, epos);
}

VARIANT_BOOL __fastcall THwpCtrl::DeleteCtrl(LPDISPATCH ctrl)
{
  return  GetDefaultInterface()->DeleteCtrl(ctrl);
}

VARIANT_BOOL __fastcall THwpCtrl::CreateField(BSTR direction, VARIANT memo/*[opt]*/, 
                                              VARIANT name/*[opt]*/)
{
  return  GetDefaultInterface()->CreateField(direction, memo/*[opt]*/, name/*[opt]*/);
}

VARIANT_BOOL __fastcall THwpCtrl::MovePos(VARIANT moveID/*[opt]*/, VARIANT para/*[opt]*/, 
                                          VARIANT pos/*[opt]*/)
{
  return  GetDefaultInterface()->MovePos(moveID/*[opt]*/, para/*[opt]*/, pos/*[opt]*/);
}

void __fastcall THwpCtrl::SetClientName(BSTR szClient)
{
  GetDefaultInterface()->SetClientName(szClient);
}

VARIANT_BOOL __fastcall THwpCtrl::GetSelectedPos(long* slist, long* spara, long* spos, long* elist, 
                                                 long* epara, long* epos)
{
  return  GetDefaultInterface()->GetSelectedPos(slist, spara, spos, elist, epara, epos);
}

VARIANT_BOOL __fastcall THwpCtrl::IsCommandLock(BSTR actionID)
{
  return  GetDefaultInterface()->IsCommandLock(actionID);
}

VARIANT_BOOL __fastcall THwpCtrl::GetFilterList(BSTR* szfilterlist, VARIANT flags)
{
  return  GetDefaultInterface()->GetFilterList(szfilterlist, flags);
}

VARIANT_BOOL __fastcall THwpCtrl::ReplaceAction(BSTR OldActionID, BSTR NewActionID)
{
  return  GetDefaultInterface()->ReplaceAction(OldActionID, NewActionID);
}

BSTR __fastcall THwpCtrl::SaveState(BSTR FileName)
{
  return  GetDefaultInterface()->SaveState(FileName);
}

VARIANT_BOOL __fastcall THwpCtrl::LoadState(BSTR FileName)
{
  return  GetDefaultInterface()->LoadState(FileName);
}

void __fastcall THwpCtrl::LockCommand(BSTR actionID, long lock)
{
  GetDefaultInterface()->LockCommand(actionID, lock);
}

VARIANT_BOOL __fastcall THwpCtrl::SetPos(long list, long para, long pos)
{
  return  GetDefaultInterface()->SetPos(list, para, pos);
}

void __fastcall THwpCtrl::ReleaseScan(void)
{
  GetDefaultInterface()->ReleaseScan();
}

void __fastcall THwpCtrl::GetPos(long* list, long* para, long* pos)
{
  GetDefaultInterface()->GetPos(list, para, pos);
}

long __fastcall THwpCtrl::GetText(BSTR* text)
{
  return  GetDefaultInterface()->GetText(text);
}

VARIANT __fastcall THwpCtrl::InsertBackgroundPicture(BSTR bordertype, BSTR Path, 
                                                     VARIANT embedded/*[opt]*/, 
                                                     VARIANT filloption/*[opt]*/, 
                                                     VARIANT watermark/*[opt]*/, 
                                                     VARIANT effect/*[opt]*/, 
                                                     VARIANT brightness/*[opt]*/, 
                                                     VARIANT contrast/*[opt]*/)
{
  return  GetDefaultInterface()->InsertBackgroundPicture(bordertype, Path, embedded/*[opt]*/, 
                                                         filloption/*[opt]*/, watermark/*[opt]*/, 
                                                         effect/*[opt]*/, brightness/*[opt]*/, 
                                                         contrast/*[opt]*/);
}

long __fastcall THwpCtrl::SetFieldViewOption(long option)
{
  return  GetDefaultInterface()->SetFieldViewOption(option);
}

VARIANT_BOOL __fastcall THwpCtrl::ShowStatusBar(long Show)
{
  return  GetDefaultInterface()->ShowStatusBar(Show);
}

long __fastcall THwpCtrl::SetTextFile(VARIANT data, BSTR format, BSTR option)
{
  return  GetDefaultInterface()->SetTextFile(data, format, option);
}

LPDISPATCH __fastcall THwpCtrl::GetMousePos(long Xrelto, long Yrelto)
{
  return  GetDefaultInterface()->GetMousePos(Xrelto, Yrelto);
}

LPDISPATCH __fastcall THwpCtrl::GetViewStatus(long nType)
{
  return  GetDefaultInterface()->GetViewStatus(nType);
}

VARIANT_BOOL __fastcall THwpCtrl::RegisterModule(BSTR ModuleType, VARIANT ModuleData)
{
  return  GetDefaultInterface()->RegisterModule(ModuleType, ModuleData);
}

LPDISPATCH __fastcall THwpCtrl::GetMessageSet(void)
{
  return  GetDefaultInterface()->GetMessageSet();
}

VARIANT __fastcall THwpCtrl::GetTextFile(BSTR format, BSTR option)
{
  return  GetDefaultInterface()->GetTextFile(format, option);
}

LPDISPATCH __fastcall THwpCtrl::GetFileInfo(BSTR FileName)
{
  return  GetDefaultInterface()->GetFileInfo(FileName);
}

LPDISPATCH __fastcall THwpCtrl::GetPosBySet(void)
{
  return  GetDefaultInterface()->GetPosBySet();
}

long __fastcall THwpCtrl::ConvertPUAHangulToUnicode(VARIANT reverse/*[opt]*/)
{
  return  GetDefaultInterface()->ConvertPUAHangulToUnicode(reverse/*[opt]*/);
}

void __fastcall THwpCtrl::AboutBox(void)
{
  GetDefaultInterface()->AboutBox();
}

BSTR __fastcall THwpCtrl::GetBinDataPath(long binid)
{
  return  GetDefaultInterface()->GetBinDataPath(binid);
}

VARIANT_BOOL __fastcall THwpCtrl::InsertMenu(BSTR menuidx, BSTR menustr, BSTR actionstr, 
                                             long menutype)
{
  return  GetDefaultInterface()->InsertMenu(menuidx, menustr, actionstr, menutype);
}

long __fastcall THwpCtrl::GetMessageBoxMode(void)
{
  return  GetDefaultInterface()->GetMessageBoxMode();
}

VARIANT_BOOL __fastcall THwpCtrl::SetFormObjectAttr(BSTR formname, BSTR attrname, VARIANT value)
{
  return  GetDefaultInterface()->SetFormObjectAttr(formname, attrname, value);
}

VARIANT_BOOL __fastcall THwpCtrl::PreviewCommand(long previewmode)
{
  return  GetDefaultInterface()->PreviewCommand(previewmode);
}

VARIANT_BOOL __fastcall THwpCtrl::ImportStyle(LPDISPATCH styleset)
{
  return  GetDefaultInterface()->ImportStyle(styleset);
}

long __fastcall THwpCtrl::SetMessageBoxMode(long mode)
{
  return  GetDefaultInterface()->SetMessageBoxMode(mode);
}

VARIANT_BOOL __fastcall THwpCtrl::ExportStyle(LPDISPATCH styleset)
{
  return  GetDefaultInterface()->ExportStyle(styleset);
}

VARIANT_BOOL __fastcall THwpCtrl::GetActionCmdUIStatus(BSTR actid, long bWithKey, long* bEnabled, 
                                                       long* bChecked, long* bRadio, BSTR* szText)
{
  return  GetDefaultInterface()->GetActionCmdUIStatus(actid, bWithKey, bEnabled, bChecked, bRadio, 
                                                      szText);
}

long __fastcall THwpCtrl::ModifyFieldProperties(BSTR field, long remove, long add)
{
  return  GetDefaultInterface()->ModifyFieldProperties(field, remove, add);
}

VARIANT_BOOL __fastcall THwpCtrl::KeyIndicator(long* seccnt, long* secno, long* prnpageno, 
                                               long* colno, long* line, long* pos, short* over, 
                                               BSTR* ctrlname)
{
  return  GetDefaultInterface()->KeyIndicator(seccnt, secno, prnpageno, colno, line, pos, over, 
                                              ctrlname);
}

VARIANT_BOOL __fastcall THwpCtrl::SetPosBySet(LPDISPATCH pos)
{
  return  GetDefaultInterface()->SetPosBySet(pos);
}

long __fastcall THwpCtrl::GetTextBySet(LPDISPATCH text)
{
  return  GetDefaultInterface()->GetTextBySet(text);
}

BSTR __fastcall THwpCtrl::GetScriptSource(BSTR filepath)
{
  return  GetDefaultInterface()->GetScriptSource(filepath);
}

VARIANT_BOOL __fastcall THwpCtrl::RunScriptMacro(BSTR FunctionName, long uMacroType, 
                                                 long uScriptType)
{
  return  GetDefaultInterface()->RunScriptMacro(FunctionName, uMacroType, uScriptType);
}

VARIANT_BOOL __fastcall THwpCtrl::SetBarCodeImage(BSTR lpImagePath, long pgno, long index, long x, 
                                                  long y, VARIANT width/*[opt]*/, 
                                                  VARIANT height/*[opt]*/)
{
  return  GetDefaultInterface()->SetBarCodeImage(lpImagePath, pgno, index, x, y, width/*[opt]*/, 
                                                 height/*[opt]*/);
}

VARIANT_BOOL __fastcall THwpCtrl::RemoveMenu(BSTR menuidx, long menutype)
{
  return  GetDefaultInterface()->RemoveMenu(menuidx, menutype);
}

BSTR __fastcall THwpCtrl::GetPageText(long pgno, VARIANT option/*[opt]*/)
{
  return  GetDefaultInterface()->GetPageText(pgno, option/*[opt]*/);
}

LPDISPATCH __fastcall THwpCtrl::get_XHwpDocuments()
{
  return GetDefaultInterface()->get_XHwpDocuments();
}

void __fastcall THwpCtrl::set_XHwpDocuments(LPDISPATCH param)
{
  GetDefaultInterface()->set_XHwpDocuments(param);
}

LPDISPATCH __fastcall THwpCtrl::get_ScrollPosInfo()
{
  return GetDefaultInterface()->get_ScrollPosInfo();
}

void __fastcall THwpCtrl::set_ScrollPosInfo(LPDISPATCH param)
{
  GetDefaultInterface()->set_ScrollPosInfo(param);
}

LPDISPATCH __fastcall THwpCtrl::get_EngineProperties()
{
  return GetDefaultInterface()->get_EngineProperties();
}

void __fastcall THwpCtrl::set_EngineProperties(LPDISPATCH param)
{
  GetDefaultInterface()->set_EngineProperties(param);
}

LPDISPATCH __fastcall THwpCtrl::get_ViewProperties()
{
  return GetDefaultInterface()->get_ViewProperties();
}

void __fastcall THwpCtrl::set_ViewProperties(LPDISPATCH param)
{
  GetDefaultInterface()->set_ViewProperties(param);
}

LPDISPATCH __fastcall THwpCtrl::get_ParentCtrl()
{
  return GetDefaultInterface()->get_ParentCtrl();
}

void __fastcall THwpCtrl::set_ParentCtrl(LPDISPATCH param)
{
  GetDefaultInterface()->set_ParentCtrl(param);
}

LPDISPATCH __fastcall THwpCtrl::get_ParaShape()
{
  return GetDefaultInterface()->get_ParaShape();
}

void __fastcall THwpCtrl::set_ParaShape(LPDISPATCH param)
{
  GetDefaultInterface()->set_ParaShape(param);
}

LPDISPATCH __fastcall THwpCtrl::get_LastCtrl()
{
  return GetDefaultInterface()->get_LastCtrl();
}

void __fastcall THwpCtrl::set_LastCtrl(LPDISPATCH param)
{
  GetDefaultInterface()->set_LastCtrl(param);
}

LPDISPATCH __fastcall THwpCtrl::get_HeadCtrl()
{
  return GetDefaultInterface()->get_HeadCtrl();
}

void __fastcall THwpCtrl::set_HeadCtrl(LPDISPATCH param)
{
  GetDefaultInterface()->set_HeadCtrl(param);
}

LPDISPATCH __fastcall THwpCtrl::get_CharShape()
{
  return GetDefaultInterface()->get_CharShape();
}

void __fastcall THwpCtrl::set_CharShape(LPDISPATCH param)
{
  GetDefaultInterface()->set_CharShape(param);
}

LPDISPATCH __fastcall THwpCtrl::get_CellShape()
{
  return GetDefaultInterface()->get_CellShape();
}

void __fastcall THwpCtrl::set_CellShape(LPDISPATCH param)
{
  GetDefaultInterface()->set_CellShape(param);
}

DHwpActionPtr& THwpAction::GetDefaultInterface()
{
  if (!m_DefaultIntf)
    Connect();
  return m_DefaultIntf;
}

_di_IUnknown __fastcall THwpAction::GetDunk()
{
  _di_IUnknown diUnk;
  if (m_DefaultIntf) {
    IUnknownPtr punk = m_DefaultIntf;
    diUnk = LPUNKNOWN(punk);
  }
  return diUnk;
}

void __fastcall THwpAction::Connect()
{
  if (!m_DefaultIntf) {
    _di_IUnknown punk = GetServer();
    m_DefaultIntf = punk;
    if (ServerData->EventIID != GUID_NULL)
      ConnectEvents(GetDunk());
  }
}

void __fastcall THwpAction::Disconnect()
{
  if (m_DefaultIntf) {
    
    if (ServerData->EventIID != GUID_NULL)
      DisconnectEvents(GetDunk());
    m_DefaultIntf.Reset();
  }
}

void __fastcall THwpAction::BeforeDestruction()
{
  Disconnect();
}

void __fastcall THwpAction::ConnectTo(DHwpActionPtr intf)
{
  Disconnect();
  m_DefaultIntf = intf;
  if (ServerData->EventIID != GUID_NULL)
    ConnectEvents(GetDunk());
}

void __fastcall THwpAction::InitServerData()
{
  static Oleserver::TServerData sd;
  sd.ClassID = CLSID_HwpAction;
  sd.IntfIID = __uuidof(DHwpAction);
  sd.EventIID= GUID_NULL;
  ServerData = &sd;
}

long __fastcall THwpAction::Execute(LPDISPATCH param)
{
  return  GetDefaultInterface()->Execute(param);
}

LPDISPATCH __fastcall THwpAction::CreateSet(void)
{
  return  GetDefaultInterface()->CreateSet();
}

void __fastcall THwpAction::Run(void)
{
  GetDefaultInterface()->Run();
}

long __fastcall THwpAction::GetDefault(LPDISPATCH param)
{
  return  GetDefaultInterface()->GetDefault(param);
}

long __fastcall THwpAction::PopupDialog(LPDISPATCH param)
{
  return  GetDefaultInterface()->PopupDialog(param);
}

BSTR __fastcall THwpAction::get_setid()
{
  return GetDefaultInterface()->get_setid();
}

void __fastcall THwpAction::set_setid(BSTR param)
{
  GetDefaultInterface()->set_setid(param);
}

BSTR __fastcall THwpAction::get_actid()
{
  return GetDefaultInterface()->get_actid();
}

void __fastcall THwpAction::set_actid(BSTR param)
{
  GetDefaultInterface()->set_actid(param);
}

DHwpParameterSetPtr& THwpParameterSet::GetDefaultInterface()
{
  if (!m_DefaultIntf)
    Connect();
  return m_DefaultIntf;
}

_di_IUnknown __fastcall THwpParameterSet::GetDunk()
{
  _di_IUnknown diUnk;
  if (m_DefaultIntf) {
    IUnknownPtr punk = m_DefaultIntf;
    diUnk = LPUNKNOWN(punk);
  }
  return diUnk;
}

void __fastcall THwpParameterSet::Connect()
{
  if (!m_DefaultIntf) {
    _di_IUnknown punk = GetServer();
    m_DefaultIntf = punk;
    if (ServerData->EventIID != GUID_NULL)
      ConnectEvents(GetDunk());
  }
}

void __fastcall THwpParameterSet::Disconnect()
{
  if (m_DefaultIntf) {
    
    if (ServerData->EventIID != GUID_NULL)
      DisconnectEvents(GetDunk());
    m_DefaultIntf.Reset();
  }
}

void __fastcall THwpParameterSet::BeforeDestruction()
{
  Disconnect();
}

void __fastcall THwpParameterSet::ConnectTo(DHwpParameterSetPtr intf)
{
  Disconnect();
  m_DefaultIntf = intf;
  if (ServerData->EventIID != GUID_NULL)
    ConnectEvents(GetDunk());
}

void __fastcall THwpParameterSet::InitServerData()
{
  static Oleserver::TServerData sd;
  sd.ClassID = CLSID_HwpParameterSet;
  sd.IntfIID = __uuidof(DHwpParameterSet);
  sd.EventIID= GUID_NULL;
  ServerData = &sd;
}

LPDISPATCH __fastcall THwpParameterSet::CreateItemArray(BSTR itemid, long Count)
{
  return  GetDefaultInterface()->CreateItemArray(itemid, Count);
}

void __fastcall THwpParameterSet::RemoveAll(BSTR setid)
{
  GetDefaultInterface()->RemoveAll(setid);
}

LPDISPATCH __fastcall THwpParameterSet::Clone(void)
{
  return  GetDefaultInterface()->Clone();
}

LPDISPATCH __fastcall THwpParameterSet::CreateItemSet(BSTR itemid, BSTR setid)
{
  return  GetDefaultInterface()->CreateItemSet(itemid, setid);
}

void __fastcall THwpParameterSet::GetIntersection(LPDISPATCH srcset)
{
  GetDefaultInterface()->GetIntersection(srcset);
}

void __fastcall THwpParameterSet::RemoveItem(BSTR itemid)
{
  GetDefaultInterface()->RemoveItem(itemid);
}

VARIANT __fastcall THwpParameterSet::Item(BSTR itemid)
{
  return  GetDefaultInterface()->Item(itemid);
}

VARIANT_BOOL __fastcall THwpParameterSet::ItemExist(BSTR itemid)
{
  return  GetDefaultInterface()->ItemExist(itemid);
}

VARIANT_BOOL __fastcall THwpParameterSet::IsEquivalent(LPDISPATCH srcset)
{
  return  GetDefaultInterface()->IsEquivalent(srcset);
}

void __fastcall THwpParameterSet::SetItem(BSTR itemid, VARIANT value)
{
  GetDefaultInterface()->SetItem(itemid, value);
}

void __fastcall THwpParameterSet::Merge(LPDISPATCH srcset)
{
  GetDefaultInterface()->Merge(srcset);
}

BSTR __fastcall THwpParameterSet::get_setid()
{
  return GetDefaultInterface()->get_setid();
}

void __fastcall THwpParameterSet::set_setid(BSTR param)
{
  GetDefaultInterface()->set_setid(param);
}

VARIANT_BOOL __fastcall THwpParameterSet::get_IsSet()
{
  return GetDefaultInterface()->get_IsSet();
}

void __fastcall THwpParameterSet::set_IsSet(VARIANT_BOOL param)
{
  GetDefaultInterface()->set_IsSet(param);
}

long __fastcall THwpParameterSet::get_Count()
{
  return GetDefaultInterface()->get_Count();
}

void __fastcall THwpParameterSet::set_Count(long param)
{
  GetDefaultInterface()->set_Count(param);
}

DHwpParameterArrayPtr& THwpParameterArray::GetDefaultInterface()
{
  if (!m_DefaultIntf)
    Connect();
  return m_DefaultIntf;
}

_di_IUnknown __fastcall THwpParameterArray::GetDunk()
{
  _di_IUnknown diUnk;
  if (m_DefaultIntf) {
    IUnknownPtr punk = m_DefaultIntf;
    diUnk = LPUNKNOWN(punk);
  }
  return diUnk;
}

void __fastcall THwpParameterArray::Connect()
{
  if (!m_DefaultIntf) {
    _di_IUnknown punk = GetServer();
    m_DefaultIntf = punk;
    if (ServerData->EventIID != GUID_NULL)
      ConnectEvents(GetDunk());
  }
}

void __fastcall THwpParameterArray::Disconnect()
{
  if (m_DefaultIntf) {
    
    if (ServerData->EventIID != GUID_NULL)
      DisconnectEvents(GetDunk());
    m_DefaultIntf.Reset();
  }
}

void __fastcall THwpParameterArray::BeforeDestruction()
{
  Disconnect();
}

void __fastcall THwpParameterArray::ConnectTo(DHwpParameterArrayPtr intf)
{
  Disconnect();
  m_DefaultIntf = intf;
  if (ServerData->EventIID != GUID_NULL)
    ConnectEvents(GetDunk());
}

void __fastcall THwpParameterArray::InitServerData()
{
  static Oleserver::TServerData sd;
  sd.ClassID = CLSID_HwpParameterArray;
  sd.IntfIID = __uuidof(DHwpParameterArray);
  sd.EventIID= GUID_NULL;
  ServerData = &sd;
}

void __fastcall THwpParameterArray::SetItem(long index, VARIANT value)
{
  GetDefaultInterface()->SetItem(index, value);
}

LPDISPATCH __fastcall THwpParameterArray::Clone(void)
{
  return  GetDefaultInterface()->Clone();
}

void __fastcall THwpParameterArray::Copy(LPDISPATCH srcarray)
{
  GetDefaultInterface()->Copy(srcarray);
}

VARIANT __fastcall THwpParameterArray::Item(long index)
{
  return  GetDefaultInterface()->Item(index);
}

VARIANT_BOOL __fastcall THwpParameterArray::get_IsSet()
{
  return GetDefaultInterface()->get_IsSet();
}

void __fastcall THwpParameterArray::set_IsSet(VARIANT_BOOL param)
{
  GetDefaultInterface()->set_IsSet(param);
}

long __fastcall THwpParameterArray::get_Count()
{
  return GetDefaultInterface()->get_Count();
}

void __fastcall THwpParameterArray::set_Count(long param)
{
  GetDefaultInterface()->set_Count(param);
}

DHwpCtrlCodePtr& THwpCtrlCode::GetDefaultInterface()
{
  if (!m_DefaultIntf)
    Connect();
  return m_DefaultIntf;
}

_di_IUnknown __fastcall THwpCtrlCode::GetDunk()
{
  _di_IUnknown diUnk;
  if (m_DefaultIntf) {
    IUnknownPtr punk = m_DefaultIntf;
    diUnk = LPUNKNOWN(punk);
  }
  return diUnk;
}

void __fastcall THwpCtrlCode::Connect()
{
  if (!m_DefaultIntf) {
    _di_IUnknown punk = GetServer();
    m_DefaultIntf = punk;
    if (ServerData->EventIID != GUID_NULL)
      ConnectEvents(GetDunk());
  }
}

void __fastcall THwpCtrlCode::Disconnect()
{
  if (m_DefaultIntf) {
    
    if (ServerData->EventIID != GUID_NULL)
      DisconnectEvents(GetDunk());
    m_DefaultIntf.Reset();
  }
}

void __fastcall THwpCtrlCode::BeforeDestruction()
{
  Disconnect();
}

void __fastcall THwpCtrlCode::ConnectTo(DHwpCtrlCodePtr intf)
{
  Disconnect();
  m_DefaultIntf = intf;
  if (ServerData->EventIID != GUID_NULL)
    ConnectEvents(GetDunk());
}

void __fastcall THwpCtrlCode::InitServerData()
{
  static Oleserver::TServerData sd;
  sd.ClassID = CLSID_HwpCtrlCode;
  sd.IntfIID = __uuidof(DHwpCtrlCode);
  sd.EventIID= GUID_NULL;
  ServerData = &sd;
}

LPDISPATCH __fastcall THwpCtrlCode::GetAnchorPos(long type)
{
  return  GetDefaultInterface()->GetAnchorPos(type);
}

short __fastcall THwpCtrlCode::get_CtrlCh()
{
  return GetDefaultInterface()->get_CtrlCh();
}

void __fastcall THwpCtrlCode::set_CtrlCh(short param)
{
  GetDefaultInterface()->set_CtrlCh(param);
}

BSTR __fastcall THwpCtrlCode::get_ctrlid()
{
  return GetDefaultInterface()->get_ctrlid();
}

void __fastcall THwpCtrlCode::set_ctrlid(BSTR param)
{
  GetDefaultInterface()->set_ctrlid(param);
}

LPDISPATCH __fastcall THwpCtrlCode::get_Next()
{
  return GetDefaultInterface()->get_Next();
}

void __fastcall THwpCtrlCode::set_Next(LPDISPATCH param)
{
  GetDefaultInterface()->set_Next(param);
}

LPDISPATCH __fastcall THwpCtrlCode::get_Properties()
{
  return GetDefaultInterface()->get_Properties();
}

void __fastcall THwpCtrlCode::set_Properties(LPDISPATCH param)
{
  GetDefaultInterface()->set_Properties(param);
}

BSTR __fastcall THwpCtrlCode::get_UserDesc()
{
  return GetDefaultInterface()->get_UserDesc();
}

void __fastcall THwpCtrlCode::set_UserDesc(BSTR param)
{
  GetDefaultInterface()->set_UserDesc(param);
}

LPDISPATCH __fastcall THwpCtrlCode::get_Prev()
{
  return GetDefaultInterface()->get_Prev();
}

void __fastcall THwpCtrlCode::set_Prev(LPDISPATCH param)
{
  GetDefaultInterface()->set_Prev(param);
}


};     // namespace Hwpcontrollib_tlb


// *********************************************************************//
// The Register function is invoked by the IDE when this module is 
// installed in a Package. It provides the list of Components (including
// OCXes) implemented by this module. The following implementation
// informs the IDE of the OCX proxy classes implemented here.
// *********************************************************************//
namespace Hwpcontrollib_ocx
{

void __fastcall PACKAGE Register()
{
  // [1]
  TComponentClass cls_ocx[] = {
                              __classid(Hwpcontrollib_tlb::THwpCtrl)
                           };
  RegisterComponents("ActiveX", cls_ocx,
                     sizeof(cls_ocx)/sizeof(cls_ocx[0])-1);
  // [4]
  TComponentClass cls_svr[] = {
                              __classid(Hwpcontrollib_tlb::THwpAction), 
                              __classid(Hwpcontrollib_tlb::THwpParameterSet), 
                              __classid(Hwpcontrollib_tlb::THwpParameterArray), 
                              __classid(Hwpcontrollib_tlb::THwpCtrlCode)
                           };
  RegisterComponents("ActiveX", cls_svr,
                     sizeof(cls_svr)/sizeof(cls_svr[0])-1);
}

};     // namespace Hwpcontrollib_ocx
