Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB8.0 VB.NET
i want to use this project in my vb.net application

[Application-Trial-Maker]
 
it working with C# but when try to use it in vb.net it gives me an error
"ContextSwitchDeadlock was detected
Message: The CLR has been unable to transition from COM context 0x3cefc0 to COM context 0x3cf130 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations.
"
 
This code i am using
Imports System.Data.OleDb
Imports SoftwareLocker
Module CommonFunctions
 

    Sub main()
        Dim _trial As New TrialMaker("Advocate Billing", Application.StartupPath + "\RegFile.reg", Application.StartupPath + "\TMSetp.dbf", "Phone: +90 21 093504 Mobile: +93 2628 5045", 5, 20, "810")
 
        'Dim _trial As New TrialMaker("Advocate Billing", "RegFile.reg", "TMSetp.dbf", "Phone: +90 21 093504 Mobile: +93 2628 5045", 5, 20, "810")

 
        Dim MyOwnKey As Byte() = {97, 250, 1, 5, 84, 21, 7, 63, 4, 54, 87, 56, 123, 10, 3, 62, 7, 9, 20, 36, 37, 21, 101, 57}
 
        _trial.TripleDESKey = MyOwnKey
        Dim rt As New TrialMaker.RunTypes
        rt = _trial.ShowDialog
 
        Dim is_trial As Boolean
 
        If Not rt = TrialMaker.RunTypes.Expired Then
            If rt = TrialMaker.RunTypes.Full Then
                is_trial = True
            Else
                is_trial = False
            End If
 
        End If
        Login.Show()
 

    End Sub
End Module
 

i just want to integrate above project in my vb.net application
Posted 10-Mar-13 22:31pm
Comments
Mehdi Gholam at 11-Mar-13 4:06am
   
Contact the original author about this problem, use the forum at the bottom of the article's page.

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 485
1 BillWoodruff 330
2 OriginalGriff 310
3 Shweta N Mishra 244
4 Mathew Soji 225
0 OriginalGriff 6,153
1 Sergey Alexandrovich Kryukov 5,638
2 DamithSL 4,958
3 Manas Bhardwaj 4,539
4 Maciej Los 3,710


Advertise | Privacy | Mobile
Web02 | 2.8.1411019.1 | Last Updated 11 Mar 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100