Solved

Ole stuff

Posted on 1998-02-16
3
238 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
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

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…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
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…

770 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