home *** CD-ROM | disk | FTP | other *** search
/ PC World Plus! (NZ) 2001 June / HDC50.iso / Runimage / Delphi50 / Bin / DCLSTD50.BPL / 0 / RCDATA / CPPSERVICE next >
Text File  |  1999-08-11  |  2KB  |  67 lines

  1. #include <SysUtils.hpp>
  2. #include <SvcMgr.hpp>
  3. #pragma hdrstop
  4. #define Application Svcmgr::Application
  5. USERES("%s.res");
  6. //---------------------------------------------------------------------------
  7. WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
  8. {
  9.     try
  10.     {
  11.         Application->Initialize();
  12.         Application->Run();
  13.     }
  14.     catch (Exception &exception)
  15.     {
  16.         Sysutils::ShowException(&exception, Sysutils::ExceptAddr());
  17.     }
  18.     return 0;
  19. }
  20. |//---------------------------------------------------------------------------
  21. #include "%s.h"
  22. //---------------------------------------------------------------------------
  23. #pragma package(smart_init)
  24. #pragma resource "*.dfm"
  25.  
  26. T%s *%1:s;
  27. //---------------------------------------------------------------------------
  28. __fastcall T%1:s::T%1:s(TComponent* Owner)
  29.     : T%s(Owner)
  30. {
  31. }
  32.  
  33. PServiceController __fastcall T%1:s::GetServiceController(void)
  34. {
  35.     return (PServiceController) ServiceController;
  36. }
  37.  
  38. void __stdcall ServiceController(unsigned CtrlCode)
  39. {
  40.     %1:s->Controller(CtrlCode);
  41. }
  42. //---------------------------------------------------------------------------
  43. |//---------------------------------------------------------------------------
  44. #ifndef %sH
  45. #define %0:sH
  46. //---------------------------------------------------------------------------
  47. #include <SysUtils.hpp>
  48. #include <Classes.hpp>
  49. #include <SvcMgr.hpp>
  50. #include <vcl.h>
  51. //---------------------------------------------------------------------------
  52. class T%s : public T%s
  53. {
  54. __published:    // IDE-managed Components
  55. private:        // User declarations
  56. public:         // User declarations
  57.     __fastcall T%1:s(TComponent* Owner);
  58.     PServiceController __fastcall GetServiceController(void);
  59.  
  60.     friend void __stdcall ServiceController(unsigned CtrlCode);
  61. };
  62. //---------------------------------------------------------------------------
  63. extern PACKAGE T%1:s *%1:s;
  64. //---------------------------------------------------------------------------
  65. #endif
  66. |
  67.