Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
Hi All,
 
Is there any alternative for using MSWINSCK.OCX in WPF, as we can't directly use MSWINSCK.OCX in WPF, we have created Winform control using MSWINSCK.OCX and then used same in WPF project. Its worked on our development platform but while deploying it on client's environment its giving me error as :
 
System.ComponentModel.LicenseException: You must have a license to use this ActiveX control.
at System.Windows.Forms.AxHost.CreateInstance()
 
Thanks in advance,
 
Kunal
Posted 19-Feb-13 0:35am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Or you could just drop the OCX entirely and rewrite using the built in Socket classes in the System.Net namespace in the .NET Framework.
  Permalink  
Comments
Mike Meinz at 19-Feb-13 11:10am
   
Excellent suggestion!
Kunal_Daud at 26-Feb-13 6:45am
   
Thanks for Suggestion, I have created my own component using System.Net.Socket :) Regards Kunal Daud
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Maybe this will help:
OstroSoft Winsock Component[^]
Download oswinsck.exe (The version that works with .NET).
 
OstroSoft Winsock Component
 
Licensing
Can be used in any version of Visual Basic and in any language, supporting COM
 
Distribution
Requires only oswinsck.dll and VB runtimes
 
Usage
Doesn't require visual interface, can be used in class modules
 
Scripting
Provides blocking calls for scripting
  Permalink  
Comments
Kunal_Daud at 20-Feb-13 1:52am
   
Thanks for OSWINSCK.exe. But unfortunately data arrived from OSWINSK.dll (0109040910) and MSWINSK.OCX (0904091001018) does not match with each other so we cant use this component. Any suggestion?
Mike Meinz at 20-Feb-13 7:25am
   
Two suggestions 1. Develop your own component using System.Net.Sockets which is part of .NET Framework. 2. Figure out why OSWINSCK.DLL is yielding different results. It's always worked correctly for me. It may be timing if data is arriving in small packets, OSWINSCK.DLL delivers what it has got when you make the call to get data just like any sockets-based software. Without looking at your code and fully understanding your application's data flow, it is difficult to tell what is wrong.
Kunal_Daud at 26-Feb-13 6:46am
   
Thanks for Suggestion, I have created my own component using System.Net.Socket :) Regards Kunal Daud
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

I have created my own component using System.Net.Socket
Smile | :)
 
Regards
 
Kunal Daud
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 840
1 OriginalGriff 437
2 Abhinav S 303
3 thatraja 215
4 Emre Ataseven 200
0 Sergey Alexandrovich Kryukov 8,122
1 OriginalGriff 4,520
2 Peter Leow 3,744
3 Maciej Los 3,515
4 Er. Puneet Goel 3,107


Advertise | Privacy | Mobile
Web02 | 2.8.140415.2 | Last Updated 26 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid