-
using VB6 ActiveX Dll with C# 2010
hey,
my company wrote an activeX DLL in VB6 few years back, and now i've been asked to run some tests with it.
since i dont have VB6 environment anymore, i thought it'll be best to try and make a simple C# program that will call the registered COM Dll.
to do that i copied the DLL into c:\windows\system32, used regsrv32 to register the DLL, restarted the computer and referenced to it from my project.
from there i tried working like i use to:
mydll.cMain obj = new mydll.cMain();
int res;
res = obj.SetHttpServer("www.test.com", 80);
res = obj.PingServer();
with the first method call (SetHttpServer) Everything worked fine,
on the second method call (PingServer) i keep on getting Error# 429 " ActiveX component can't create object".
i looked over the original VB class, and it seems pretty simple, it creates an HttpWebRequest object and requests a string from the webserver defined with the SetHttpServer.
What am i doing wrong?
Thank you 
Alon
-
That VB6 DLL is unmanaged code and isn't going to work well in a managed environment.
Here is a fairly good little snippet that I hope will help you out.
I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
Please use [Code]your code goes in here[/Code] tags when posting code.
Before posting your question, did you look here?
Got a question on Linux? Visit our Linux sister site.
Modifications Required For VB6 Apps To Work On Vista
Similar Threads
-
By bkh_vb1 in forum VB Classic
Replies: 4
Last Post: 11-23-2011, 06:29 PM
-
By bkh_vb1 in forum VB Classic
Replies: 8
Last Post: 11-15-2011, 09:27 AM
-
By DavidG in forum VB Classic
Replies: 1
Last Post: 01-03-2003, 07:16 PM
-
By John K. in forum VB Classic
Replies: 0
Last Post: 02-19-2002, 04:27 PM
-
By Vincent in forum Enterprise
Replies: 1
Last Post: 07-29-2001, 11:46 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks