i recently inherited a visual studio 6 application and was asked to make some changes. i loaded the application in vs6 and tried a compile just to make sure it would compile. it did. but then.....when i tried to run it again in debug.....i got an error:
class does not support automation or does not support expected interface
i did a little research and was surprised to see some articles which state that if you change from dll to exe, you have to manually unregister the old exe. i sure don't remember ever doing this before.
does anyone know why compiling a vb app in vs6 into an exe......why does that then cause a problem when trying run the app again in debug moed?
it seems like my problem is somehow related to me creating the exe
ever since then....i get this error
i've seen some mention on the internet about this:
<div class=majorTitle>Visual Basic Reference: Error Messages </div> <div class=title>Class does not support Automation or does not support expected interface </div> <div id=mainSection> <div id=mainBody>
Either the class you specified in the GetObject or CreateObject function call has not exposed a programmability interface, or you changed a project from .dll to .exe, or vice versa.
To correct this error
<div class=subSection>
Check the documentation of the application that created the object for limitations on the use of automation with this class of object.
If you changed a project from .dll to .exe or vice versa, you must manually unregister the old .dll or .exe.
threeo
Participant
1156 Points
539 Posts
can't fix inherited code
Feb 12, 2008 07:48 PM|LINK
off topic i know but....i'm desperate....
i recently inherited a visual studio 6 application and was asked to make some changes. i loaded the application in vs6 and tried a compile just to make sure it would compile. it did. but then.....when i tried to run it again in debug.....i got an error:
class does not support automation or does not support expected interface
i did a little research and was surprised to see some articles which state that if you change from dll to exe, you have to manually unregister the old exe. i sure don't remember ever doing this before.
does anyone know why compiling a vb app in vs6 into an exe......why does that then cause a problem when trying run the app again in debug moed?
nikki_doer_o...
Contributor
6863 Points
1097 Posts
Re: can't fix inherited code
Feb 12, 2008 08:17 PM|LINK
Did you ask in the WindowsClient community? (see top link) They focus in windows forms apps.
"If we learn from our mistakes, I should be brilliant by now."
MCTS - .NET Framework 2.0: Web Applications
threeo
Participant
1156 Points
539 Posts
Re: can't fix inherited code
Feb 12, 2008 08:30 PM|LINK
problem occurs at this line:
oServer.SetCredentials "corp/auser", "userpassword"
nikki_doer_o...
Contributor
6863 Points
1097 Posts
Re: can't fix inherited code
Feb 12, 2008 08:46 PM|LINK
Is oServer a COM object?
"If we learn from our mistakes, I should be brilliant by now."
MCTS - .NET Framework 2.0: Web Applications
threeo
Participant
1156 Points
539 Posts
Re: can't fix inherited code
Feb 12, 2008 09:39 PM|LINK
it's a reference to a third-part dll:
Public oServer As New IESAP.Server
i tried re-grabbing the dll from an archive and re-installing it and re-registering it
but i still get the error
threeo
Participant
1156 Points
539 Posts
Re: can't fix inherited code
Feb 12, 2008 09:42 PM|LINK
it seems like my problem is somehow related to me creating the exe
ever since then....i get this error
i've seen some mention on the internet about this:
<div class=majorTitle>Visual Basic Reference: Error Messages </div> <div class=title>Class does not support Automation or does not support expected interface </div> <div id=mainSection> <div id=mainBody>Either the class you specified in the GetObject or CreateObject function call has not exposed a programmability interface, or you changed a project from .dll to .exe, or vice versa.
To correct this error
<div class=subSection>-
-
</div></div></div>Check the documentation of the application that created the object for limitations on the use of automation with this class of object.
If you changed a project from .dll to .exe or vice versa, you must manually unregister the old .dll or .exe.
threeo
Participant
1156 Points
539 Posts
Re: can't fix inherited code
Feb 12, 2008 10:11 PM|LINK
ahhhh......
ok...i tried creating a new exe program in vs6
i include the reference to the third-party dll
i put in just two lines of code:
Dim oServer As New IFSAP.Server
oServer.SetCredentials "corp\fejmx", "fejmx"
and as soon as the code tries to execute the second line....i get the exact same error as before
so i guess i have a more general question: if you have a thrid party dll and you try to set a valid property to some value and you get:
"error 430 - Class does not support automation or does not support expected interface"
what does that mean? (this same dll worked fine on friday)
nikki_doer_o...
Contributor
6863 Points
1097 Posts
Re: can't fix inherited code
Feb 13, 2008 05:51 PM|LINK
Did you register it for Everyone (nor just you)?
"If we learn from our mistakes, I should be brilliant by now."
MCTS - .NET Framework 2.0: Web Applications
threeo
Participant
1156 Points
539 Posts
Re: can't fix inherited code
Feb 13, 2008 06:52 PM|LINK
not sure what you mean
i did a regsvr32 thedll.dll
nikki_doer_o...
Contributor
6863 Points
1097 Posts
Re: can't fix inherited code
Feb 13, 2008 09:00 PM|LINK
Go to command line, CD to where your dll file is located, and do
cacls yourDll.dll
You should get a list of groups and permissions, like so
C:\WINDOWS>cacls twain.dll
C:\WINDOWS\twain.dll BUILTIN\Users:R
BUILTIN\Power Users:R
BUILTIN\Administrators:F
NT AUTHORITY\SYSTEM:F
Verify that for your dll, every account that needs access, has it. If you're not sure what you're looking at, just post it here.
"If we learn from our mistakes, I should be brilliant by now."
MCTS - .NET Framework 2.0: Web Applications