Home > Archive > Visual Basic > November 2005 > newbie help
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Bob Cummings 2005-11-27, 6:55 pm |
| Greetings
I am out of school for about a year now. I have been given an assignment
to create some sort of middle ware to operate between our core system
and theirs. This is sort of my purpose in the grand scheme of things
and usually I can figure out how to do it. But this one is giving me fits.
First question is:
Usually when using the third party object I would declare it at the top
of am module Private objMyPlugIn as X then in the class initialize I
write Set objMyPlugIn = New X and then I can use is any where in the
class module and even pass references of it to a form or what ever.
This object I have been given to work with blows up on the Set
objMyPlugIn = New X line with errors about class factory unable to
create the object. However in the supplied documentation provided by
the customer they show instantiation as Dim objMyPlugIn as New X, which
seems to work for me.
So can some one tell me what it going on that makes Declaring an
instance of and then instantiating it later different from declaring and
instantiating in one line?
Maybe that will help me understand what is going on
cheers
bob cummings
| |
| J French 2005-11-27, 6:55 pm |
| On Sun, 27 Nov 2005 08:34:01 -0600, Bob Cummings
<rcummings@wausaufs.com> wrote:
>Greetings
>
>I am out of school for about a year now. I have been given an assignment
> to create some sort of middle ware to operate between our core system
>and theirs. This is sort of my purpose in the grand scheme of things
>and usually I can figure out how to do it. But this one is giving me fits.
>
>First question is:
>Usually when using the third party object I would declare it at the top
> of am module Private objMyPlugIn as X then in the class initialize I
>write Set objMyPlugIn = New X and then I can use is any where in the
>class module and even pass references of it to a form or what ever.
>
>This object I have been given to work with blows up on the Set
>objMyPlugIn = New X line with errors about class factory unable to
>create the object. However in the supplied documentation provided by
>the customer they show instantiation as Dim objMyPlugIn as New X, which
>seems to work for me.
>
>So can some one tell me what it going on that makes Declaring an
>instance of and then instantiating it later different from declaring and
>instantiating in one line?
>
>Maybe that will help me understand what is going on
Sounds to me like a badly written COM Object written in Delphi
- have you tried late binding
eg:
Dim X as Object
... Yada
Set X = New Thing
It is not so bad, as one can wrap the mess in a Class
| |
| Bob Cummings 2005-11-28, 7:55 am |
| J French wrote:
> On Sun, 27 Nov 2005 08:34:01 -0600, Bob Cummings
> <rcummings@wausaufs.com> wrote:
>
>
>
>
> Sounds to me like a badly written COM Object written in Delphi
> - have you tried late binding
>
> eg:
> Dim X as Object
> ... Yada
> Set X = New Thing
>
> It is not so bad, as one can wrap the mess in a Class
>
>
Thanks a bunch that works. I shall have to read up on late binding and
try to figure out why this particular object needs it. So I can
recognize the situation in future.
cheers and thanks for your time
bob
|
|
|
|
|