Today's Smalltalk Daily looks at using the COM Connect package in VisualWoks.
The workspace code used in the screencast is at the bottom of this post
To watch, click on the viewer below:
If you have trouble viewing that directly, you can click here to download the video directly
You can also watch it on YouTube:
ref := COMRegistryInterface extTypeLibraryIDMap associations
detect: [:each | each value name notNil and: ['*iTunes *Type Library' match: each value name]]
ifNone: [nil].
ref ifNotNil: [ref := ref value].
descs := ref containedTypeDescriptions.
ifc := descs
detect: [:each | 'iTunesApp' match: each name]
ifNone: [nil].
guid := ifc guid.
driver := AdvancedDispatchDriver
on:
(IClassFactory createInstance: guid iid: External.COMConstants.IID_IDispatch context: External.COMConstants.CLSCTX_SERVER).
"now use the driver"
driver Play.
driver NextTrack.
driver Stop
Technorati Tags:
smalltalk, COM, visualworks, windows