Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Generate the Template

April 3, 2000

Part Three of Introduction to Perl on Windows takes the simple component and uses the Active State package to actually register your COM component with the Win32 registry so that you can start to use it from any COM-aware program.

Generate the template by typing "PerlCtrl.pl -t" at the command line. The result ought to look something like this:

=POD
=BEGIN PerlCtrl
  %TypeLib = (
    PackageName     => 
	'MyPackage::MyName',
    TypeLibGUID     => 
	'{32E6513E-DF20-11D3-B454-00805F9BDE4A}', #do NOT edit line
    ControlGUID     => 
	'{32E6513F-DF20-11D3-B454-00805F9BDE4A}', #do NOT edit line
    DispInterfaceIID=> 
	'{32E65140-DF20-11D3-B454-00805F9BDE4A}', #or this one
    ControlName     => 
	'MyApp.MyObject',
    ControlVer      => 
		1,  # increment if new object with same ProgID
                               # create new GUIDs as well
    ProgID          => 'MyApp.MyObject',
    DefaultMethod   => 'MyMethodName1',
    Methods         => {
            'MyMethodName1' => {
                RetType             =>  VT_I4,
                TotalParams         =>  5,
                NumOptionalParams   =>  2,
                ParamList           =>[ 'ParamName1' => VT_I4,
                                        'ParamName2' => VT_BSTR,
                                        'ParamName3' => VT_BOOL,
                                        'ParamName4' => VT_I4,
                                        'ParamName5' => VT_UI1 ]
            },
            'MyMethodName2' => {
                RetType             =>  VT_I4,
                TotalParams         =>  2,
                NumOptionalParams   =>  0,
                ParamList           =>[ 'ParamName1' => VT_I4,
                                        'ParamName2' => VT_BSTR ]
            },
    },  # end of 'Methods'
    Properties      => {
            'MyIntegerProp' => {
                Type                => VT_I4,
                ReadOnly            => 0,
            },
            'MyStringProp' => {
                Type                => VT_BSTR,
                ReadOnly            => 0,
            },
            'Color' => {


                Type                => VT_BSTR,
                ReadOnly            => 0,
            },
            'MyReadOnlyIntegerProp' => {
                Type                => VT_I4,
                ReadOnly            => 1,
            },
      },  # end of 'Properties'
    );  # end of %TypeLib
=END PerlCtrl
=cut

Looks nastier than it really is. The most important thing to remember is that ALL the above is generated automatically, and you actually must modify very little in order to make the standard template reflect the functionality of the WebMail class.

The Perl Code
Introduction to Perl on Windows - Table of Contents
The Steps Needed to Customize the Template


Up to => Home / Authoring / Languages / Perl / Windows




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers