Re: Working with a VB COM Component

Tech-Archive recommends: Speed Up your PC by fixing your registry



"David C" <profnachos@xxxxxxxxx> wrote in message news:1174809711.795443.311750@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
This is my first time having to integrate a COM component into my
dotnet project. The COM component is from a VB developer, so I have
no control over his code.

I am having the following issues after importing the COM object into
Visual Studio (2003, not 2005).

When I create an instance of a class (Jobs jobs = new Jobs()), I get
the following error message.

COM object with CLSID {6FC1CF2C-BC59-4B78-AF18-B162F2D12CA6} is either
not valid or not registered.

Also, I expected the property I needed (Let's call this UserID) to be
a string. But its datatype is System.IntPtr. Huh? What is that?
But then when I force a string and compile just to see, I get the
following compilation error.

Property, indexer, or event 'UserId' is not supported by the language;
try directly calling accessor method
'OdysseyCO._PetroToolsJobs.set_UserId(ref string)'

Now that's interesting. So I followed the recommendation and
tried .set_UserId(ref string). .set_UserId does not show up in my
intellisense, but the code compiles!

So unless there are other things I should try (can't imagine there are
any), what should I tell the VB developer?



How does the COM interface and coclass definition looks like when using oleview.exe on the typelib?
Are you sure you have registered the correct dll before importing? Try to re-register the dll using regsvr32.exe

Willy.

.



Relevant Pages

  • Re: Working with a VB COM Component
    ... The COM component is from a VB developer, ... But then when I force a string and compile just to see, ... Property, indexer, or event 'UserId' is not supported by the language; ...
    (microsoft.public.dotnet.languages.csharp)
  • Working with a VB COM Component
    ... The COM component is from a VB developer, ... But then when I force a string and compile just to see, ... Property, indexer, or event 'UserId' is not supported by the language; ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: PRODUCT calculation in queries
    ... The Microsoft Jet database engine could not find the input table or query ... After pasting it into the code window, choose Compile on the Debug menu. ... Function Product(strField As String, strTable As String, _ ... Dim dblResult As Double ...
    (microsoft.public.access.queries)
  • Re: Help a beginner - simple lowercase to uppercase and so on function
    ... can understand everything but it should take shape with more practice ... it compiles and returns uppercase letters ... in this string!" ... to compile on both. ...
    (comp.lang.c)
  • Re: UserControl und ShouldSerializeXXXX - Problem
    ... Public Property Developer as String ... Immer noch das gleiche Verhalten (Das NewUserControl ... Der Reset Befehl im Property Editor stellt den Standardwert ...
    (microsoft.public.de.german.entwickler.dotnet.vb)