468,758 Members | 2,050 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,758 developers. It's quick & easy.

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

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Phil | last post: by
5 posts views Thread by lefterist | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.