Click here to Skip to main content
16,009,728 members
Home / Discussions / C#
   

C#

 
AnswerRe: Anyone gone the Microsoft Route..... Pin
LongRange.Shooter17-Jul-07 7:26
LongRange.Shooter17-Jul-07 7:26 
QuestionNeed help in tree view... Pin
Dotnetkanna17-Jul-07 4:15
Dotnetkanna17-Jul-07 4:15 
AnswerRe: Need help in tree view... Pin
Manas Bhardwaj17-Jul-07 4:24
professionalManas Bhardwaj17-Jul-07 4:24 
AnswerRe: Need help in tree view... Pin
Nxorable17-Jul-07 4:30
Nxorable17-Jul-07 4:30 
QuestionNetwork Discovery Pin
originSH17-Jul-07 4:00
originSH17-Jul-07 4:00 
AnswerRe: Network Discovery Pin
Manas Bhardwaj17-Jul-07 4:28
professionalManas Bhardwaj17-Jul-07 4:28 
GeneralRe: Network Discovery Pin
originSH17-Jul-07 4:32
originSH17-Jul-07 4:32 
QuestionSoapException in C# Web Service that references COM object Pin
Nxorable17-Jul-07 2:56
Nxorable17-Jul-07 2:56 
I have created a ActiveX DLL in Visual Basic 6.0 SP5 with one function that returns a String of "Hello World From VB6 DLL". I then register the DLL using RegSvr32 <path and file name of VB6 DLL>. Next, I create a new WebService project in C# using Visual Studio 2005 .NET. In this project, I do an Add Reference, choose the COM tab, and select the DLL I just created in VB6. I add a using directive (using VB6ComTest;) to my Web Service class then proceed to add WebMethod that will call that VB6 function:

[WebMethod]
public string GetTestString()
{
VB6ComTest.MyVBTestClassClass test = new MyVBTestClassClass();
string a = test.HelloWorld();

return a;
}

I'm new to Web Services and using Interop in .NET. I've read that Interop uses interfaces so that may explain why the "Class" is named "MyVBTestClassClass". The intellisense is showing me three (3) items within VB6ComTest and they are: _MyVBTestClass (an interface), MyVBTestClass (an interface), and finally MyVBTestClassClass (a class).

When calling the this GetTestString() WebMethod from Internet Explorer (using the .asmx) or from a console application I have created in the same solution, I get this error every single time without fail:

System.Web.Services.Protocols.SoapException was unhandled
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.InvalidCastException: Unable to cast COM object of type 'VB6ComTest.MyVBTestClassClass' to interface type 'VB6ComTest._MyVBTestClass'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{9F789AFC-7C61-4D4F-8EDF-35866D18EEEE}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).\n at VB6ComTest.MyVBTestClassClass.HelloWorld()

I've been battling this for three full work days now and would great appreciate any assistance.

Thank you.


Jason
AnswerRe: SoapException in C# Web Service that references COM object Pin
led mike17-Jul-07 4:38
led mike17-Jul-07 4:38 
GeneralRe: SoapException in C# Web Service that references COM object Pin
Nxorable17-Jul-07 4:47
Nxorable17-Jul-07 4:47 
GeneralRe: SoapException in C# Web Service that references COM object Pin
led mike17-Jul-07 5:04
led mike17-Jul-07 5:04 
Questionhow to embed word in windows form Pin
lockepeak17-Jul-07 2:53
lockepeak17-Jul-07 2:53 
AnswerRe: how to embed word in windows form Pin
originSH17-Jul-07 2:55
originSH17-Jul-07 2:55 
GeneralRe: how to embed word in windows form Pin
lockepeak17-Jul-07 3:06
lockepeak17-Jul-07 3:06 
GeneralRe: how to embed word in windows form Pin
Colin Angus Mackay17-Jul-07 3:11
Colin Angus Mackay17-Jul-07 3:11 
AnswerRe: how to embed word in windows form Pin
Bert delaVega17-Jul-07 4:14
Bert delaVega17-Jul-07 4:14 
AnswerRe: how to embed word in windows form Pin
Dan Neely17-Jul-07 4:58
Dan Neely17-Jul-07 4:58 
GeneralRe: how to embed word in windows form Pin
lockepeak17-Jul-07 20:32
lockepeak17-Jul-07 20:32 
QuestionChanging the background Pin
razanabanu17-Jul-07 2:33
razanabanu17-Jul-07 2:33 
AnswerRe: Changing the background Pin
Malcolm Smart17-Jul-07 3:05
Malcolm Smart17-Jul-07 3:05 
AnswerRe: Changing the background Pin
Vasudevan Deepak Kumar17-Jul-07 4:41
Vasudevan Deepak Kumar17-Jul-07 4:41 
QuestionThreading ??? Pin
Software_Specialist17-Jul-07 2:31
Software_Specialist17-Jul-07 2:31 
AnswerRe: Threading ??? Pin
originSH17-Jul-07 2:41
originSH17-Jul-07 2:41 
GeneralRe: Threading ??? Pin
Software_Specialist17-Jul-07 3:31
Software_Specialist17-Jul-07 3:31 
GeneralRe: Threading ??? Pin
Bekjong17-Jul-07 3:46
Bekjong17-Jul-07 3:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.