-------
void __ fastcall TForm1 :: N2Click (TObject * Sender)
{-> Click ();
}
/ / --------------------------------------------------------------------------- __fastcall TForm1 :: N3Click (TObject * Sender)
{();
}
/ / --------------------------------------------------------------------------- __fastcall TForm1 :: N4Click (TObject * Sender)
{(«Виконав Крюков П.Г., ВМКСС - 326»);
}
/ / ---------------------------------------------------------------------------
Вихідний код клієнта ActiveX Form:
# include
# pragma hdrstop
# include
# include «MyCourseProjectImpl1. h »(« MyCourseProjectImpl1. cpp », MyCourseProject);/* TActiveForm: File Type * / / * MyCourseProject: CoClass * /
/ / ---------------------------------------------------------------------------
# pragma package (smart_init) MyCourseProjectProj1Module; & _Module=MyCourseProjectProj1Module;
/ / The ATL Object map holds an array of _ATL_OBJMAP_ENTRY structures that
/ / described the objects of your OLE server. The MAP is handed to your
/ / project's CComModule-derived _Module object via the Init method.
/ / _OBJECT_MAP (ObjectMap) _ENTRY (CLSID_MyCourseProject, TMyCourseProjectImpl) _OBJECT_MAP ()
/ / Entry point of your Server invoked by Windows for processes or threads are
/ / initialized or terminated.
/ / WINAPI DllEntryPoint (HINSTANCE hinst, unsigned long reason, void *)
{(reason == DLL_PROCESS_ATTACH)
{
_Module. Init (ObjectMap, hinst); (hinst);
} TRUE;
}
/ / _Module. Term is typically invoked from the DLL_PROCESS_DETACH of your
/ / DllEntryPoint. However, this may result in an incorrect shutdown sequence.
/ / Instead an Exit routine is setup to invoke the cleanup routine
/ / CComModule :: Term.
/ / ModuleTerm (void)
{
_Module. Term ();
}
# pragma exit ModuleTerm 63
/ / Entry point of your Server invoked to inquire whether the DLL is no
/ / longer in use and should be unloaded.
/ / __ export DllCanUnloadNow (void)
{(_Module. GetLockCount () == 0)? S_OK: S_FALSE;
}
/ / Entry point of your Server allowing OLE to retrieve a class object from
/ / your Server
/ / __ export DllGetClassObject (REFCLSID rclsid, REFIID riid, LPVOID * ppv)
{_Module. GetClassObject (rclsid, riid, ppv);
}
/ / Entry ...