Jump to content
Xtreme .Net Talk

Scott

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by Scott

  1. I don't think you mis-understood me, perhaps my last post was a bit confusing. I have no problem to close down my App, I used Application.Exit and Environment.Exit only because I thought when I close down the App in this way the objects would perhaps be released and the license would be available again so that another workstation can use it. Perhaps I reference a COM object that accidentally does not release yet another COM object properly. So when I release a COM object, it continues to stay in memory because it doesn't release the second COM object. Thanks for the help
  2. I have now tried this: Private Sub LogIn() Dim objLogin As ACDB.Login Dim objRuntimeSession As ACDB.RuntimeSession objLogin = New ACDB.Login() objLogin.Login("", "") objLogin.ValidateUser("Module.Finish") objRuntimeSession = objLogin.RuntimeSession Dim proc As Process = proc.GetCurrentProcess Marshal.ReleaseComObject(objRuntimeSession) Marshal.ReleaseComObject(objLogin) objRuntimeSession = Nothing objLogin = Nothing GC.Collect() GC.WaitForPendingFinalizers() GC.Collect() GC.WaitForPendingFinalizers() proc.Kill() End Sub The 2 methods don't return an object. Public Sub Login(Optional ByVal strRes1 As String = "", Optional ByVal strRes2 As String = "") Public Sub ValidateUser(ByVal strUniqueID As String) I had the idea to write a DLL in VB6 with a function 'Login' which contains the code to login and returns the 'RuntimeSession' object and a method 'Logout' in which I set everything to Nothing but it doesn't work too. I have also tried Application.Exit and Environment.Exit. It seems that the objects are only released when the code is written with VB6 and the application is terminated because even in VB6 when I set everything to Nothing, it doesn't change anything. Perhaps the developers didn't consider the possibility that someone could use .Net because I contacted the support and they also seem rather helpless. But I can't use VB6 because I don't have a valid license. :confused:
  3. I tried it, see my first post.
  4. My COM object doesn't have a .Close or .Quit method. I tried : MyCOMObject = Nothing CG.Collect GC.WaitForPendingFinalizers() GC.Collect() GC.WaitForPendingFinalizers() but with the same result. I'm wondering why the objects aren't released in .Net when I terminate the program because in VB6 they are.
  5. HI I have a program where I use the following code to login. Dim objLogin As ACDB.Login Dim objRuntimeSession As ACDB.RuntimeSession objLogin = New ACDB.Login() objLogin.Login("", "") objLogin.ValidateUser("Module.ABC") objRuntimeSession = objLogin.RuntimeSession After the last command, the number of the available licenses is decremented by 1. But when I terminate my program, it lasts about 40 minutes until the license is available again. But in VB6 the license is available immediately after terminating the program, when I use the same methods to login. A special method to logoff does not exist. I tried to release the objects with Marshal.ReleaseComObject(objLogin) and Marshal.ReleaseComObject(objRuntimeSession). The reference counter of the 2 RCW's is then 0, but it doesn't change anything. Can anyone help me ? Thanks
×
×
  • Create New...