Ole4D Plug-in presentation Author: CLS Data Pro mailto:[email protected].

11
Ole4D Plug-in Ole4D Plug-in presentation presentation Author: CLS Data Pro Author: CLS Data Pro http://www.clsdatapro.com http://www.clsdatapro.com mailto:[email protected] mailto:[email protected]

Transcript of Ole4D Plug-in presentation Author: CLS Data Pro mailto:[email protected].

Page 1: Ole4D Plug-in presentation Author: CLS Data Pro  mailto:support@clsdatapro.com.

Ole4D Plug-in presentationOle4D Plug-in presentation

Author: CLS Data ProAuthor: CLS Data Pro

http://www.clsdatapro.comhttp://www.clsdatapro.com

mailto:[email protected]:[email protected]

Page 2: Ole4D Plug-in presentation Author: CLS Data Pro  mailto:support@clsdatapro.com.

Ole4D overviewOle4D overview

What is Ole4D?What is Ole4D?

BBridge between 4D ridge between 4D enviroment enviroment andand ActiveX/Ole objectsActiveX/Ole objects

Embeds ActiveX/Ole objects in a 4D Embeds ActiveX/Ole objects in a 4D form form

Page 3: Ole4D Plug-in presentation Author: CLS Data Pro  mailto:support@clsdatapro.com.

Introducing ActiveX Controls Introducing ActiveX Controls

ActiveX controls are reusable software components ActiveX controls are reusable software components

Can quicklyCan quickly add add specialized functionality to specialized functionality to applications applications

Are based on an Are based on an architecture for developing architecture for developing programmable software componentsprogrammable software components

ActiveX controls are small, fast, and powerful, and ActiveX controls are small, fast, and powerful, and make it easy to integrate and reuse software make it easy to integrate and reuse software componentscomponents

Page 4: Ole4D Plug-in presentation Author: CLS Data Pro  mailto:support@clsdatapro.com.

How Ole4D worksHow Ole4D works

ActiveX/OleObject

4th DimensionApplication

Ole4DPlug-in

Ole4D methods

4D events/notifications

Plug-in API calls

Calls to the object functions

Calls to the plug-in functions

4D plug-in API

OLE specifications

Page 5: Ole4D Plug-in presentation Author: CLS Data Pro  mailto:support@clsdatapro.com.

ComCommmunication between 4D unication between 4D and ActiveX/Oleand ActiveX/Ole

4D methods calls and notifications are 4D methods calls and notifications are dispatched to the Ole objectdispatched to the Ole object by the plug-inby the plug-in

When an event occurs the Ole object When an event occurs the Ole object notifiesnotifies the plug-in to call the plug-in to call thethe 4D method 4D method associated to the event, if anyassociated to the event, if any

Page 6: Ole4D Plug-in presentation Author: CLS Data Pro  mailto:support@clsdatapro.com.

How comunication worksHow comunication works

Interaction between the plug-in and Interaction between the plug-in and the Ole object is defined by thethe Ole object is defined by the OLE OLE specificationsspecifications

4D and the plug-in comunicate using 4D and the plug-in comunicate using 4D plug-in API4D plug-in API

Page 7: Ole4D Plug-in presentation Author: CLS Data Pro  mailto:support@clsdatapro.com.

EExamplexample

4D Enviroment

Read a property of the Ole object by calling

OCGetLongProperty

Ole4Dplug-in

ActiveX/OleObject

Call IDispatch:Invoke to retrieve the value of the property

4D Plug-in API Ole Interfaces

Page 8: Ole4D Plug-in presentation Author: CLS Data Pro  mailto:support@clsdatapro.com.

Plug-in featuresPlug-in features

Create and embed OLE objects Create and embed OLE objects Allow in place activation saving the object to blob Allow in place activation saving the object to blob Positioning of the OLE object toolbar Positioning of the OLE object toolbar Assign 4D functions as event handlers Assign 4D functions as event handlers forfor OLE OLE

object object events, providing access to parametersevents, providing access to parameters EnableEnable//disable showing ole object menu disable showing ole object menu Run VB Script from 4D using an interpreter Run VB Script from 4D using an interpreter Retrieve value of VB Script variables in 4D create Retrieve value of VB Script variables in 4D create

OLE objects linked to a file OLE objects linked to a file

Page 9: Ole4D Plug-in presentation Author: CLS Data Pro  mailto:support@clsdatapro.com.

Adding special Adding special functionalityfunctionality to to a 4D applicationa 4D application

UUse a plugse a plug--in designed only for that in designed only for that featurefeature

UUse the Ole4D plug-in se the Ole4D plug-in

Page 10: Ole4D Plug-in presentation Author: CLS Data Pro  mailto:support@clsdatapro.com.

Why Why useuse Ole4D Ole4D ? ?

1. ActiveX/Ole objects are widelly available1. ActiveX/Ole objects are widelly available

There are a lot of ActiveX objects installed by There are a lot of ActiveX objects installed by Windows that can be used to access OS featuresWindows that can be used to access OS features

Many applications have a corresponding ActiveX/Ole Many applications have a corresponding ActiveX/Ole object that can be included using the plug-in in a 4th object that can be included using the plug-in in a 4th Dimension formDimension form

Due to the large market, the Due to the large market, the ActiveX/OleActiveX/Ole objects objects uusually sually have low costshave low costs

Page 11: Ole4D Plug-in presentation Author: CLS Data Pro  mailto:support@clsdatapro.com.

Why Why useuse Ole4D Ole4D ? ?

2. Other development advantages2. Other development advantages

There are ActiveX/Ole objects for solving a There are ActiveX/Ole objects for solving a wide range of problemswide range of problems

Saves development effort for a custom plug-Saves development effort for a custom plug-inin

Control applications from 4D environmentControl applications from 4D environment