home *** CD-ROM | disk | FTP | other *** search
- //----------------------------------------------------------------------------
- //Borland C++ Builder
- //Copyright (c) 1987 Borland International Inc. All Rights Reserved.
- //----------------------------------------------------------------------------
- //---------------------------------------------------------------------------
- #include <vcl.h>
- #pragma hdrstop
-
- #include "maintest.h"
- #include <OleAuto.hpp>
- //---------------------------------------------------------------------------
- #pragma resource "*.dfm"
- TForm1 *Form1;
- //---------------------------------------------------------------------------
- __fastcall TForm1::TForm1(TComponent* Owner)
- : TForm(Owner)
- {
- }
- //---------------------------------------------------------------------------
- void __fastcall TForm1::bRunAutoClick(TObject *Sender)
- {
- Variant V;
-
- try{
- V = CreateOleObject("AutoProj.MyAuto");
- V.OleProcedure("ShowDialog");
- V.OlePropertySet("MyProp",
- "This string was passed to the MyProp "
- "property of AutoProj by TestAp");
- V.OleProcedure("ShowDialog");
- }
- catch(EOleSysError& e){
- char buf[256];
- sprintf(buf, "%s.\n\n%s", e.Message,
- "Make sure you compile AutoProj first and run it either from\n"
- "the commmand line with the /regserver switch or from C++ Builder\n"
- "after you set the Run|Parameters dialog to /regserver.");
- ShowMessage(buf);
- }
- }
- //---------------------------------------------------------------------
-