Click here to Skip to main content
11,933,854 members (57,033 online)
Rate this:
Please Sign up or sign in to vote.
See more: VB8.0 VB VB.NET
i want to use this project in my application


it working with C# but when try to use it in 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
                is_trial = False
            End If
        End If

    End Sub
End Module

i just want to integrate above project in my application
Posted 10-Mar-13 22:31pm
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web03 | 2.8.151126.1 | Last Updated 11 Mar 2013
Copyright © CodeProject, 1999-2015
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