C# Integration -...

13
Sponsored by Powered by Moving at the Speed of Change May 2015 Charlotte PowerBuilder Conference C# Integration

Transcript of C# Integration -...

Sponsored by Powered by

Moving at the Speed of Change May 2015

Charlotte PowerBuilder Conference

C# Integration

Charlotte PowerBuilder Conference Moving at the Speed of Change May 2015

2 Kyle Griffis

Sponsored by Powered by

Moving at the Speed of Change May 2015

Charlotte PowerBuilder Conference

Walk-through using Microsoft Visual C#

Visual Studio Community 2013

Create custom control using Windows Forms Control Library

Integrate custom control into PowerBuilder Classic

Charlotte PowerBuilder Conference Moving at the Speed of Change May 2015

4 Visual Studio Community 2013

Charlotte PowerBuilder Conference Moving at the Speed of Change May 2015

5

Charlotte PowerBuilder Conference Moving at the Speed of Change May 2015

6

Charlotte PowerBuilder Conference Moving at the Speed of Change May 2015

7 Framework

Charlotte PowerBuilder Conference Moving at the Speed of Change May 2015

8 Let’s get Started!

Charlotte PowerBuilder Conference Moving at the Speed of Change May 2015

9 GUID

• Short for Globally Unique Identifier

• Used by the Windows registry to identify COM DLLs

• Knowing where to look in the registry and having the correct GUID yields a lot information about a COM object (i.e., information in the type library, its physical location, etc.)

Charlotte PowerBuilder Conference Moving at the Speed of Change May 2015

10 InterfaceType

• Interfaces add a plug and play like architecture into your applications. Interfaces help define a contract between your application and other objects. It indicates what sort of methods, properties and events are exposed by the object.

Charlotte PowerBuilder Conference Moving at the Speed of Change May 2015

11 ComInterfaceType

• Identifies how to expose an interface to COM. • InterfaceIsIDispatch - Indicates an interface is exposed to COM as a

dispinterface, which enables late binding only.

• InterfaceIsDual is the default value.

• InterfaceIsIUnknown.

Charlotte PowerBuilder Conference Moving at the Speed of Change May 2015

12 Delegate

• A delegate is a type that represents references to methods with a particular parameter list and return type.

• Delegates are used to pass methods as arguments to other methods.

• Event handlers are nothing more than methods that are invoked through delegates.

Charlotte PowerBuilder Conference Moving at the Speed of Change May 2015

13