Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 310537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:50:33+00:00 2026-05-12T07:50:33+00:00

I have an InteropUserControl in a .NET assembly that works fine in other operating

  • 0

I have an InteropUserControl in a .NET assembly that works fine in other operating systems such as Windows XP and Windows 2000. My company sells hardware along with the software we develop, and we get different types of all-in-one touchscreen workstations. Some All of one particular brand installed with Windows Embedded for Point of Sale are demonstrating a strange problem.

On the InteropUserControl, I expose an event in this way:

[ComVisible( true )]
[Guid( OrdCtl.EventsId )]
[InterfaceType( ComInterfaceType.InterfaceIsIDispatch )]
public interface __IControlEvents {
    [DispId( 1 )]
    void ItemSelected( int someid1, int someid2 );
}

And the event delegate and main control (including raising the event) look like this:

[ComVisible( false )]
public delegate void ItemSelectedEventHandler( int someid1, int someid2 );

[Guid( MyControl.ClassId )]
[ClassInterface( ClassInterfaceType.None )]
[ComSourceInterfaces( "MyInteropControl.__IControlEvents" )]
[ComClass( MyControl.ClassId, MyControl.InterfaceId, MyControl.EventsId )]
public partial class MyControl : UserControl, _IMyControl {
    public const string ClassId = "... guid ...";
    public const string InterfaceId = "... guid ...";
    public const string EventsId = "... guid ...";

    public event ItemSelectedEventHandler ItemSelected;

    void OnItemSelected( int someid1, int someid2 ) {
        var del = this.ItemSelected;

        if ( del != null ) {
            del( someid1, someid2 );
        }
    }

    ...
}

This control is used in a VB6 app, and the event handler there is also as one would expect:

Private Sub MyControl_ItemSelected(ByVal someid1 As Long, ByVal someid2 As Long)
    'react to item selection event
End Sub

However, on the machine’s demonstrating incorrect behavior, the ItemSelected event is null in the control’s code, and so can’t be raised. So I know when it won’t work and could use a workaround instead.

The event works correctly on Windows XP and Windows 2000, with .NET 2.0 Framework or .NET 3.5 Framework (the project targets 2.0). I had one XP machine demonstrating the same behavior but it had a wonky installation of .NET 3.5. Reinstalling .NET fixed that machine. I thought that was the cause, so I decided to reinstall on the faulty machines.

On one of the faulty machines with Embedded for POS, I ran the 2.0 setup (OS not supported by the 3.5) and selected Repair. This did not fix the problem. Tomorrow morning I plan to try an actual uninstall and reinstall, just to be sure. Some of the machines with this OS work fine, some do not. I suspect the tech who did the setup of these machines did something different on this most recent batch of machines. The information I was given is wrong. I checked myself and all machines with this strange version of Windows are demonstrating the same problem.

What probably (or even just possible) causes could be at fault for the event not getting ‘wired up’ correctly through the COM-callable wrapper? Added: How might I get it to work on Windows Embedded for Point of Sale?

I’m also taking suggestions for workarounds, hoping to hear one that sounds decent.

  • 1 1 Answer
  • 3 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T07:50:33+00:00Added an answer on May 12, 2026 at 7:50 am

    It turns out that there is a Service Pack 3 for WEPOS. After installing this, .NET Framework 3.5 would install. After installing that, the event worked fine.

    The Lesson: Make sure everything is up-to-date.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have a fun issue with sharepoint calendar view filtering. That code works fine: SPSecurity.RunWithElevatedPrivileges(delegate()
I have a .net project (MySolution.Common) that uses the app.config. I am using the
Have a bunch of WCF REST services hosted on Azure that access a SQL
Have a look at one of my websites: moskah.com The problem is that it
Have a simple contact us XPage created. Have server side validation in place that
Have a network location that shows paths in the 8.3 short format. I need
Have data that has this kind of structure. Will be in ascending order by
Have data that has this kind of structure: $input = [ { animal: 'cat',
Have some dates in my local Oracle 11g database that are in this format:
Have a WCF service in a Services directory in my asp.net web app. In

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.