COM object either not initializing or not accepting method call
Hi all. First post here. Good to be a part of the community. :-)
I wrote a simple apllication that calls on a few COM objects. It basically just loads a configuration file, starts a few cameras, and calculates some 3d data. Well at least thats what its supposed to do. But im having a problem with one of the methods. As far as i know the configuration file loads ok but then once i get to a certain object method it not only crashes my application but VB6 as well. Ive triple checked the type library reference just to make sure, so i know thats ok. Is there something i could be missing? Is there a certain set of commands i need to add at the beginning to enable COM objects? This is obvisouly my first COM based project and im not really sure where to go next...
The error that i get is "object variable not set or with block statement not declared".
The declarations i used for that specific object are...
Option Explicit
Dim obj_PointCloud as PointCloud.NPPointCloud
Dim obj_Frame as PointCloud.NPPointCloudFrame
__________________________________________________
Sub Form_Load()
Set obj_PointCloud = New PointCloud.NPPointCloud
Set obj_Frame = New PointCloud.NPPointCloudFrame
__________________________________________________
...and this is where i get the error
Sub Timer_1()
Call obj_PointCloud.GetFrame(obj_Frame)
__________________________________________________
the GetFrame() method returns a NPPointCloudFrame object and puts it in to obj_Frame
any thoughts on what i might be missing or doing wrong?
Re: COM object either not initializing or not accepting method call
it seems as the object you are using raises the error. Since it is supposed to work right check its documkentation. Probably the prameters you pass are not correct or the initialization fails.
Re: COM object either not initializing or not accepting method call
Hi,
What is inside obj_PointCloud.GetFrame how and what are you returning from this function?
Regds,
AmolT.
Re: COM object either not initializing or not accepting method call
the company that wrote the com interface that im using has discovered an error on their side. all problems are fixed. thanks for everyones help.