Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
VB
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
Comments
Mehdi Gholam 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900