472,952 Members | 2,255 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Error : "Object does not match target type."

hi,

I am working on application in this i am using two files. In first
(consider A) file i am calling the function of other file (consider B). In
that function of file B i am calling the method of DLL.
i.e Method of file A -Method of file B -Method of DLL.

But in the file B's method while calling DLL's method it is giving me Error
"Object does not match target type.".

Can someone please tell me why this error is coming & Please tell the
solution for this error.
Jul 4 '08 #1
2 3874
Can you explain a further the structure of the calling DLL file, i mean
whether it is COM based or not.

Regards,
Mudassar Hassan
http://mudassarhassan.spaces.live.com/
"Swappy" wrote:
hi,

I am working on application in this i am using two files. In first
(consider A) file i am calling the function of other file (consider B). In
that function of file B i am calling the method of DLL.
i.e Method of file A -Method of file B -Method of DLL.

But in the file B's method while calling DLL's method it is giving me Error
"Object does not match target type.".

Can someone please tell me why this error is coming & Please tell the
solution for this error.
Jul 4 '08 #2


"Mudassar Hassan" wrote:
Can you explain a further the structure of the calling DLL file, i mean
whether it is COM based or not.

Regards,
Mudassar Hassan
http://mudassarhassan.spaces.live.com/
"Swappy" wrote:
hi,

I am working on application in this i am using two files. In first
(consider A) file i am calling the function of other file (consider B). In
that function of file B i am calling the method of DLL.
i.e Method of file A -Method of file B -Method of DLL.

But in the file B's method while calling DLL's method it is giving me Error
"Object does not match target type.".

Can someone please tell me why this error is coming & Please tell the
solution for this error.
Im running this code
public Boolean IsLayoutOpen(String strLayoutName)
{
Layout Layout_Obj = null;
try
{
Layouts layouts = instrumentation.Layouts; //This call is
through COM object
Layout_Obj = layouts.Item(strLayoutName);

layouts = null;
}
}

This code i am running in a thread but while calling the
instrumnetation.Layouts (it is From COM object) it gives me exception "Object
does not match target type."
Note :- This code is running in the thread of class B (i.e file B).
Jul 4 '08 #3

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

Similar topics

4
by: Danny | last post by:
Hi I don't understand why I keep getting "Error: Object expected" I tried different things and haven't been able to solve it. I'm a newbie so I'm not sure what I'm doing wrong. The debugger breaks...
0
by: Roman | last post by:
I'm trying to create the form which would allow data entry to the Client table, as well as modification and deletion of existing data rows. For some reason the DataGrid part of functionality stops...
18
by: Microsoft | last post by:
When I try this in my code I alwas get an errormessage: "Object reference not set to an instance of an object" Dim g As System.Drawing.Graphics g.DrawString("Test", New Font("Arial", 12,...
0
by: Martin Widmer | last post by:
Hello again! I have a datagridview control on my form and am using VS.Net 2005. One column is set up as combo box column, and when I try to set the datasource for that combobox column at design...
1
by: kamleshsharmadts | last post by:
I am using Ajax with struts in web application. from jsp i am calling a function of ajax.js onclick of a button. code of that call function which calling from jsp given as below:- ...
4
by: Phil | last post by:
Hi, This code gives an javascript error: "Object required" and never let see the Alert window. in code-behind: Protected Sub Button1_Click(ByVal sender As Object, ByVal e As...
10
RMWChaos
by: RMWChaos | last post by:
WinVista/IE7 I am getting some weird errors only in IE7, but not in FF2.0.0.8 or NN9. It even happens on this website when I click "Sign In". The error is: "A Runtime Error has occurred."...
5
by: lefterist | last post by:
Good afternoon, I 've got the followin code to validate a form, and get the "error:object expected (line 171 char. 1, line 172, char 2)" even if i tried to solve it (parentheses, function syntax...
5
by: dotnetnovice | last post by:
Hi everybody actually i was trying to insert some records in to SQL server through C# Wndows Aplication and during that i face an error "Object reference not set to an instance of an object." and...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...

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.