Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Ole stuff

Posted on 1998-02-16
3
Medium Priority
?
248 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 200 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Loops Section Overview
Suggested Courses

824 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