I''ve noticed that when I have a class that implements IMouseController, PEVerify returns seven errors. I''m using VS .NET 2003 (.NET 1.1) to create my assembly - here''s what the resulting code looks like.
Public Class TestClass
Implements IMyMouseController
Public ReadOnly Property Cursor() As System.Windows.Forms.Cursor Implements IMyMouseController.Cursor
Get
End Get
End Property
Public Function HitTest(ByVal mouseEventArgs As System.Windows.Forms.MouseEventArgs, ByVal controller As IMyMouseController) As Integer Implements IMyMouseController.HitTest
End Function
Public Sub MouseDown(ByVal e As System.Windows.Forms.MouseEventArgs) Implements IMyMouseController.MouseDown
End Sub
Public Sub MouseHover(ByVal e As System.Windows.Forms.MouseEventArgs) Implements IMyMouseController.MouseHover
End Sub
Public Sub MouseHoverEnter() Implements IMyMouseController.MouseHoverEnter
End Sub
Public Sub MouseHoverLeave(ByVal e As System.EventArgs) Implements IMyMouseController.MouseHoverLeave
End Sub
Public Sub MouseMove(ByVal e As System.Windows.Forms.MouseEventArgs) Implements IMyMouseController.MouseMove
End Sub
Public Sub MouseUp(ByVal e As System.Windows.Forms.MouseEventArgs) Implements IMyMouseController.MouseUp
End Sub
Public ReadOnly Property Name() As String Implements IMyMouseController.Name
Get
End Get
End Property
Public Sub CancelMode() Implements IMyMouseController.CancelMode
End Sub
End Class
Here are the errors that are returned from PEVerify:
[MD](0x801312F4): Error: MethodImpl''s Decl and Body method signatures do not match. [token:0x0000000C]
[MD](0x801312F4): Error: MethodImpl''s Decl and Body method signatures do not match. [token:0x0000000E]
[MD](0x801312F4): Error: MethodImpl''s Decl and Body method signatures do not match. [token:0x0000000F]
[MD](0x801312F4): Error: MethodImpl''s Decl and Body method signatures do not match. [token:0x00000010]
[MD](0x801312F4): Error: MethodImpl''s Decl and Body method signatures do not match. [token:0x00000011]
[MD](0x801312F4): Error: MethodImpl''s Decl and Body method signatures do not match. [token:0x00000012]
[MD](0x801312F4): Error: MethodImpl''s Decl and Body method signatures do not match. [token:0x00000014]
I''m not sure why this is happening. I looked in ILDasm at the corresponding method declaration and body tokens, and the method signatures seem to look the same. While this isn''t causing my application to fail, I find it a bit disconcerting that PEVerify doesn''t like this. Note that this doesn''t happen with all of the interfaces from Syncfusion.Shared.dll, but I also noticed that this happens for classes that implement IDynamicSplitterFrame.
Is there any reason why this is happening?
Regards,
Jason
JB
Jason Bock
December 31, 2003 12:57 PM
Oops!
My previous post uses IMyMouseController. Ignore that ;). I was trying to see if the errors had anything to do with the interface definition, so I created my own interface. Just replace IMyMouseController with IMouseController and you''ll get the error.
AD
Administrator
Syncfusion Team
January 2, 2004 08:09 AM
Hi Jason,
Thanks for your feedback on this issue. Please refer to the MouseControllerDemo sample in the folder ...\Syncfusion\Essential Suite\Shared\Samples\MouseControllerDemo. In this sample BothBarsController.cs, HorizontalBarController.cs, and VerticalBarController.cs classes use the IMouseController interface and I did not encounter any of the above errors when I tested for this issue (in v2.0.1.0) using peverify here. Try this sample and let me know if you continue to experience this problem. Also let me know the version of Essential Suite that your using. Thanks for your cooperation.
Regards,
Guru Patwal
Syncfusion, Inc.
JB
Jason Bock
January 5, 2004 07:50 AM
Guru,
I noticed that you''re using C# for your example (at least you mentioned .cs files, so I''m assuming you tested using C#). Did you try doing this in VB .NET? It may be an issue with the compilers - i.e. csc.exe doesn''t manifest the problem, but vbc.exe does.
We''re currently using 1.6.1.0 of Syncfusion.Shared.DLL.
Regards,
Jason
>Hi Jason,
>
>Thanks for your feedback on this issue. Please refer to the MouseControllerDemo sample in the folder ...\Syncfusion\Essential Suite\Shared\Samples\MouseControllerDemo. In this sample BothBarsController.cs, HorizontalBarController.cs, and VerticalBarController.cs classes use the IMouseController interface and I did not encounter any of the above errors when I tested for this issue (in v2.0.1.0) using peverify here. Try this sample and let me know if you continue to experience this problem. Also let me know the version of Essential Suite that your using. Thanks for your cooperation.
>
>Regards,
>Guru Patwal
>Syncfusion, Inc.
AD
Administrator
Syncfusion Team
January 5, 2004 04:14 PM
Hi Jason,
Thanks for the update. I could see the above errors when I tested the MouseControllerDemo sample in VB.NET with PEverify. I have notified the development team regarding this problem and will keep you informed on this. I would appreciate if you could open an incident in Direct Trac in this regard so that I could update you there from now on. I will also update with download instructions for our latest 1.6 release - v1.6.1.8 in Direct Trac. Thanks for your cooperation, and we appreciate your feedback very much.
Regards,
Guru Patwal
Syncfusion, Inc.
JB
Jason Bock
January 7, 2004 08:31 AM
Guru,
Cool! I''m glad you''re able to reproduce it. I''ll log a Direct Trac incident ASAP.
Regards,
Jason
>Hi Jason,
>
>Thanks for the update. I could see the above errors when I tested the MouseControllerDemo sample in VB.NET with PEverify. I have notified the development team regarding this problem and will keep you informed on this. I would appreciate if you could open an incident in Direct Trac in this regard so that I could update you there from now on. I will also update with download instructions for our latest 1.6 release - v1.6.1.8 in Direct Trac. Thanks for your cooperation, and we appreciate your feedback very much.
>
>Regards,
>Guru Patwal
>Syncfusion, Inc.
AD
Administrator
Syncfusion Team
January 7, 2004 09:31 AM
Hi Jason,
Thanks for the update. I will respond to your incident on Direct Trac. We request you to address all your concerns through Direct Trac in future, since it is the best and the fastest way to receive technical support. Thanks for your cooperation.
Regards,
Guru Patwal
Syncfusion, Inc.