dll created with perlctrl doesn't contain methods

Posted by danor on 2013-05-08 03:34
Forums: PDK discussion | OS: Windows 7

Hello,

I'm trying to make a dll file from *.pm with perlctrl. After running "perlctrl tempadd.pm" I registered the output dll file with "regsvr32 tempadd.dll". Unfortunately I can't execute the method from my test vbs script. Can anyone tell me, what I'm doing wrong ?

I'm thankful for help.

The used code is the following :

tempadd.pm :

package tempadd;

sub testme {
                 
        return "test";
}

1;
=pod

=begin PerlCtrl

    %TypeLib = (
        PackageName     => 'MyPackage::MyName',
       
        TypeLibGUID     => '{5C8152FB-C0A3-4995-B261-4C251483399A}', # do NOT edit this line
        ControlGUID     => '{544E0BCC-8223-49CC-9525-1B6D65577422}', # do NOT edit this line either
        DispInterfaceIID=> '{16021151-69DE-4DC1-B092-5F66DA6B3A90}', # or this one
       
       
        ControlName     => 'tempaddin',
        ControlVer      => 1,  
        ProgID          => 'temp.add',
        DefaultMethod   => '',
       
        Methods         => {
                'testme' => {
                        RetType             =>  VT_BSTR,
                        TotalParams         =>  0,
                        NumOptionalParams   =>  0,
                        ParamList           =>[ ]
                },
        },  # end of 'Methods'
        Properties        => {
           
        },  # end of 'Properties'
    );  # end of %TypeLib

=end PerlCtrl

=cut

test.vbs :

    Dim objMyControl
       
    Set objMyControl = CreateObject("temp.add")
 
        MsgBox objMyControl.testme