Link to home
Start Free TrialLog in
Avatar of negreteo
negreteoFlag for United States of America

asked on

Problem installing a VB.net COM+

Hi,

I have a problem trying to install a COM+, I have one class in my library with a function which returns an Object value but when I try to register my dll I get the error: Bad Variable Type.

C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\regsvcs DataAccessNet.dll

I have others functions in the library but they return integers and datasets values but I get no errors on these ones only with the one that return Object type

I am trying to do this installation on a server with Windows 2000 Advanced Server OS in a terminal server

Hope you can help me
Thanks in advance
Avatar of caball88
caball88

you said this was a com object right? this was object is not a .net assembly. you are suppose to use regsvr32 to register com components.
oops never mind spazed for a minute this is com+ component i am guessing.
Avatar of negreteo

ASKER

Yes this is a COM+

Is there another way to declare my function that returns an Object type

The problem is the Object type
if you use Visual Studio then right click on the project name > Add Refference > Browse > locate your DLL and click Select

and you should be able to use your DLL like so

Dim myDLL as WhateverTheDLLWas=New WhateverTheDLLWas
myDLL.MyFunction(...)
you can also use Type Library Importer, open visual studio command prompt window and execute following following line

tblimp c:\mydir\DataAccessNet.dll /out:c:\myotherdir\NetDataAccessNet.dll

ASKER CERTIFIED SOLUTION
Avatar of davidlars99
davidlars99
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks for the A, but which option did you wind up with..?
This one

tblimp c:\mydir\DataAccessNet.dll /out:c:\myotherdir\NetDataAccessNet.dll

Thanks