Solved

Ole stuff

Posted on 1998-02-16
3
240 Views
Last Modified: 2010-05-18
Hi there,

I want to make my app an ole server like msword (word.basic) so users can use my app within other programs

now the question: how do i do this, i have looked in the manuals but i don't get it. all i ask is an simple example.

something like:

an application that can be closed, restored, minimized, and execute a function using ole BUT also normal buttons.

Best regards,

Arijan
0
Comment
Question by:aluiken
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 8

Expert Comment

by:ZifNab
ID: 1359319
Some thing from the net :

OLE Tester

From: johan@lindgren.pp.se

This is a VERY simple test that I made myself to get started with OLE. I was asked to add OLE support to a program I made and this is what I did to have a
program to test that my own OLE server worked.

This creates the oleobject upon creation and then whenever you press a button it calls a procedure in the oleserver.



unit oletestu;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
     ttsesed : variant;
  end;

var
  Form1: TForm1;


implementation
uses oleauto;
{$R *.DFM}

procedure TForm1.FormCreate(Sender: TObject);
begin
  ttsesed := createoleobject('ttdewed.ttsesole');
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  ttsesed.openeditfile;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  ttsesed.appshow;
end;

end.

Is this good enough, or do you need more? I don't think it can be simpler.
0
 
LVL 1

Author Comment

by:aluiken
ID: 1359320
I have the idea this is an ole client i want to create a server.
0
 
LVL 4

Accepted Solution

by:
d003303 earned 100 total points
ID: 1359321
In D2, say File->New->Automation Object and go through the wizard. In the automated section of the created object you put all procedures that can be called from an OLE client. Register your app by running it once.
In the client, you call your OLE server by CreateOLEObject with the ProgID in the Register procedure of the server. Use the methods in the automated section, that's it.

In D3, the process is mainly the same, but you have to write your own type library. This is documented in the Developers Guide.

Slash/d003303
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question