By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,569 Members | 1,386 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,569 IT Pros & Developers. It's quick & easy.

Error : "Object does not match target type."

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a


"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 discussion thread is closed

Replies have been disabled for this discussion.