
Help: Pass object to VB DLL in VBScript
Sample code:
==========
Set objJob = CreateObject("PSTRJobPosting.JobPosting")
objJob.Load CLng(JobPostingID)
Set objProcessor = CreateObject("PSTRProcessor.Poster")
objProcessor.PerformProcessing objJob, 0
==========
VB Definition of Perform processing:
==========
Public Sub PerformProcessing(objJob As Variant, Action As Long)
==========
The error:
==========
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'PerformProcessing'
==========
PSTRJobPosting.JobPosting is defined in a VB DLL and can be accessed (all
properties and methods work) in VBScript. I can execute the sample code in
the VB IDE by pasting it into the immediate window, so I know the error is
not coming from inside the PerformProcessing method. Defining the second
parameter as CLng(0) also fails, as does changing the VB definition to
objJob As PSTRJobPosting.JobPosting.
How can I set things up so I can pass an object created in VBScript to a
method? Also, where can I look up the error numbers (e.g. '800a000d')?
Thanks
Colin Young