473,387 Members | 1,705 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Call funtions of COM from within VB.NET

I had a COM component , which derived from IDispatch, so I could be used by
VB.NET(And yes, it could be used in VB6). but in fact I met with the
exception,
code was as following:
//////////////////////
Dim obj as new XXX.Obj
//////////////////////
error message was
QueryInterface for interface XXX.IObj failed.

I dont know why?
Nov 21 '05 #1
3 877
CT
How are you referencing the COM componet in your VB .NET project, did you
use Add Reference?

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk

"hangaround" <ha********@discussions.microsoft.com> wrote in message
news:30**********************************@microsof t.com...
I had a COM component , which derived from IDispatch, so I could be used by
VB.NET(And yes, it could be used in VB6). but in fact I met with the
exception,
code was as following:
//////////////////////
Dim obj as new XXX.Obj
//////////////////////
error message was
QueryInterface for interface XXX.IObj failed.

I dont know why?

Nov 21 '05 #2
I DID refence it.

"CT" wrote:
How are you referencing the COM componet in your VB .NET project, did you
use Add Reference?

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk

"hangaround" <ha********@discussions.microsoft.com> wrote in message
news:30**********************************@microsof t.com...
I had a COM component , which derived from IDispatch, so I could be used by
VB.NET(And yes, it could be used in VB6). but in fact I met with the
exception,
code was as following:
//////////////////////
Dim obj as new XXX.Obj
//////////////////////
error message was
QueryInterface for interface XXX.IObj failed.

I dont know why?


Nov 21 '05 #3
CT
I'd say that it's possibly that the COM component is dependant on another
component that hasn't been installed or registered?

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk

"hangaround" <ha********@discussions.microsoft.com> wrote in message
news:E2**********************************@microsof t.com...
I DID refence it.

"CT" wrote:
How are you referencing the COM componet in your VB .NET project, did you
use Add Reference?

--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk

"hangaround" <ha********@discussions.microsoft.com> wrote in message
news:30**********************************@microsof t.com...
>I had a COM component , which derived from IDispatch, so I could be used
>by
> VB.NET(And yes, it could be used in VB6). but in fact I met with the
> exception,
> code was as following:
> //////////////////////
> Dim obj as new XXX.Obj
> //////////////////////
> error message was
> QueryInterface for interface XXX.IObj failed.
>
> I dont know why?


Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: hykim | last post by:
I want to call a unmanaged dll's function returning some STRUCT's pointer. the next is definition of a STRUCT. ----------------------------------------------------------------------- typedef...
3
by: Giang Pham | last post by:
Dear all, I created a C# project. But there is a module that was created by C++ .NET (7.0), this module will load structure file and get information from that file. I heard that .NET environment...
21
by: Cottonwood | last post by:
I want to call a C module from a Fortran program. Whatever I tried - the linker could not find the C module. I know about the leading underscore and switched even that off. I abstracted everything...
6
by: pronerd | last post by:
Hi, I am trying to dynamically set an event handler across frames. I have no problems setting properties across frames doing something like parent.ToolMenuFrame.location.href =...
2
by: Darren.Ratcliffe | last post by:
Hi If I have functionX in my master page, how would I call the function from my .aspx page that has the master page assigned to it? Many thanks Darren
2
by: CFAN | last post by:
I have written a variable parameter function: APR_DECLARE_NONSTD(apr_status_t) sas_strcat(char *buffer,size_t * buffer_len ,... ) { char *cp, *argp; apr_size_t saved_lengths; apr_size_t...
3
by: deepthisoft | last post by:
hai, I have 2 javascript funtions.I want to call these 2 functions using one button. my code is like this, <input type="button" value="ok" onclick="validate(this),change()">
3
by: crater | last post by:
Today I ran into a problem that had me completely baffled. A function that I have just written, processes data in any one of 4 different data grids. Within a for() loop I need to call another...
0
by: ritter.bernhard | last post by:
Hi i am trying too call a soap function that expect to parameters. One is a complex type and one is xsd_long. Unfortunately i can't get anything working. The complex type is this: <complexType...
4
by: l.s.rockfan | last post by:
Hello, how do i have to call an inherited, templated class constructor from the initializer list of the inheriting, non-templated class constructor? example code: template<typename T>...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.