|
-
June 3rd, 2009, 09:52 AM
#1
marshalling structure
[VS 2005 , Vista]
Hi
I am having a bit of difficulty marshalling a structure which is the parameter in a unmanaged function call.
The structure is
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public struct FilterParams
{
public Int32 param1;
public Int32 param2;
public Int32 focus;
public bool show;
public bool contrast_stretch;
public bool sharpen;
}
and the com object function being called is:
[Guid("03556EB9-9BE8-4503-B788-ADC730A901B9"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IECFilterInterface
{
int get_DShowFilter([In,Out] ref FilterParams rnValue);
}
The function is getting called ( I have checked this in the com object) , and should modify the values of the members of the structure passed, however when it is passed back the values of the structure are not modified.
Any ideas what i might be doing wrong
any help/comments would be appreciated
simon
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|