Index   Commented   Search   About

HELLO

SAMPLE: HELLO: Simple OLE Automation Server

HELLO is a simple OLE Automation server application. This is a good sample to use to learn to create your first OLE Automation server. This has one object that supports the following properties and methods:

Hello Object:

Properties
HelloMessage
Methods
SayHello

The sample the following features:

  • Supports dual interfaces which allows access of automation properties and methods through vtable binding and through IDispatch.
    · Provides Rich Error information for vtable-binding controllers. This is does by implementing ISupportErrorInfo and using IErrorInfo.
    · Implements active object registration using RegisterActiveObject and RevokeActiveObject. · Implements correct shut-down behavior. · Includes a .reg file which contains Hello.Application and Hello.Application.2 as progIDs. · When created for automation, is invisible initially.

To compile: -----------

Requires OLE 2.02 or later. Use the external makefile called makefile to compile. In Win16, run the WXSRVER.EXE from \OLE2\BIN before running the makefile. The makefile invokes mktyplib.exe that reads hello.odl and creates the type library, hello.tlb. It then compliles the source files.

To run: -------

Change hello.reg to provide the full path of hello.exe and hello.tlb. Register hello.reg in the registration database by double-clicking it. The HELLCTRL directory contains a controller that will control HELLO using vtable-binding.

Files: ------

HELLO.ODL Object description language that describes the property and method that HELLO exposes.
TLB.H Header file generated by mktyplib.exe MAKEFILE Makefile for project.

Other files implement the HELLO automation server. ================================================================================

Related Links

Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
TMS Scripter Studio Pro components for Delphi/C++Builder

More Online Helps

Win32 Programmer's Reference (win32.hlp)
Win32 Multimedia Programmer's Reference (mmedia.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (sock2.hlp)
Unix Manual Pages

Free Tech Secrets ;) Copyright © 2008 Free Tect Secrets ;) greatis just4fun network just4fun