This content has been marked as final. Show 11 replies
I only create package DLL's for the beans I need exposed. The supporting classes are still accesible from the bean, just not directly from COM.
So, I package MyCustomBean to create MyCustomBean.dll and register that. I can do a CreateObject on the MyCustomBean and if it references some other class in it's constructor or methods, those classes are still accessible from the bean's JVM, just not from COM.
Hope this helps.
I created a dll for myBean and had my other dependent classes dir in my classpath. But somehow the bean doesn't run and gives me
Runtime Error 438: Object doesn't support this property or method from the VB.
The error occurs at calling the method.
Dim objBean As Object
Set objBean = CreateObject("CustomLabelBean.Bean.1")
Dim btArray() As Byte
Dim bg As String
Dim ft As String
bg = "file"
ft = "type"
btArray = objBean.Render(bagname, filetype)
You create one bean class and one jar package with other java classes the bean object can return to activeX. If a bean object method returns another class X object than in the activeX simple use the Set command, i.e late binding.
i.e Set classObj = bean.getAnotherClassObj(param1, param<n>)
Set classObj = Nothing
Sounds not like a class path problem or even really a registration problem.
I see that the method you're trying to call is supposed to return an array of bytes. I've had problems in the past returning arrays of objects to COM. However, I was always returning arrays of objects not primitives like byte.
I wonder if it's a mismatch between the java-to-COM type mapping between the method's signature and the signature of the variable you're trying to update.
Yeah, try using Set for sure. You might also want to think about
1. Looking up the byte-Byte mapping from/to Java
2. Changing your methods signature to return a count and then an indexed value (could be expensive if that array is large).