CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    Join Date
    Jan 2003
    Posts
    38

    Question Cannot remove .Net DLL from memory.

    hi,

    Recently, I upgraded VB6 project to VB.Net. After that I can sucessfully compile the project and generate a DLL file in the bin folder, but when I try to use regsvr32 command to register the DLL, I got error saying "DllRegister Server Entry Point is not found".

    And I cannot remove it from memory, if I want to use my old DLL.

    Can anyone help me ?
    Last edited by cobraeye; February 3rd, 2003 at 10:51 AM.

  2. #2
    Join Date
    Jun 2001
    Location
    MO, USA
    Posts
    2,868
    .NET DLLs don't need to be registered.

  3. #3
    Join Date
    Jan 2003
    Posts
    38
    thanks for replying, but I cannot call the classes i defined in DLL from ASP any more, like I used to use Server.CreateObject("***") to create those server objects, but now my asp doesnt recognize this any more.

  4. #4
    Join Date
    Jun 2001
    Location
    MO, USA
    Posts
    2,868
    Ok, you'll have to register your DLL for com-interop then (build a COM wrapper for your .NET DLL). Under Project... Properties... Configuration Properties... Build, make sure the "Register For COM Interop" Checkbox is chosen.

  5. #5
    Join Date
    Jan 2003
    Posts
    38
    yes I did that. Then What should i do ? Register the DLL in Bin folder? I tried that as well. Still same error msg as I described in my original post. I checked boxes for Generating debug info, register for interop, enable build warnings and debug constant,

  6. #6
    Join Date
    Jun 2001
    Location
    MO, USA
    Posts
    2,868
    One the developement machine this should happen automatically, but on other machines you'll need to copy the DLL and .TLB file to the machine and then register (with regsvr32) the TLB file, NOT the DLL.

  7. #7
    Join Date
    Jan 2003
    Posts
    38
    ok, it does have a TLB file and when I use regsvr32, it says "XXXXX" is not an executable file and no registration helper is registered for this file type.

    Thanks

  8. #8
    Join Date
    Jun 2001
    Location
    MO, USA
    Posts
    2,868
    Oops... been a while since I did this. Take a look at RegAsm.exe in the help. I believe you run this on the DLL file.

  9. #9
    Join Date
    Jan 2003
    Posts
    38
    I really appreciate your helps, I tried regasm as you instructed, and I can register that DLL now. But none of my class is available to be call from ASP. Meanwhile I am spending on this, I was wondering why Microsoft made things so complex for us?

  10. #10
    Join Date
    Jun 2001
    Location
    MO, USA
    Posts
    2,868
    Well, they're moving away from COM. If you ditched ASP and went with ASP.NET then you'd have no trouble calling the original .NET DLL.

  11. #11
    Join Date
    Jan 2003
    Posts
    38
    Thanks, and now I want to go back to VB6 with my old DLL, I can compile it, but I cannot register my old DLL now. I think the .Net Version of DLL is residing in the memory. Do you know how to remove it? It says in the popbox when i did regsvr32 ... /u to use pview to detect and remove it, But I cannot find anything from pview.

    Any idea?

  12. #12
    Join Date
    Apr 2003
    Posts
    3
    You can try unregistering it with Regasm.exe /unregister

  13. #13
    Join Date
    Jan 2003
    Posts
    38
    thanks for the reply, I used that to remove the DLL from the memory finally. But do u know after I upgrade the DLL to .Net, how can I make my ASP to use that DLL? Because when I do server.createobject it doesnt seems to be able to location my DLL

    thanks

  14. #14
    Join Date
    Apr 2003
    Posts
    3
    No, I am trying to do the same thing. I can make it work on my Developer Machine, but not on my clients. I will post another reply when I figure it out. Please let me know if you figure it out.

    My guess is that I need to use the GacUtil.exe but it is not on my client machines. I copied it over and it says that it is missing a dll.

    MSvcrt70.dll I think is the one it told me it was missing.

    Thanks

  15. #15
    Join Date
    Jun 2002
    Location
    Central/Upstate NY, USA
    Posts
    137
    hey, i think i am having a similar problem with my program

    i tried doing the Properties->Build Checkbox for register for COM Interop, but it is disabled so I can't check it.

    When I run my program I get this popbox:

    -----------------------------
    An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in system.windows.forms.dll

    Additional information: Unable to get the window handle for the 'AxTextBox' control. Windowless ActiveX controls are not supported.
    -----------------------------

    The code that is highlighted green is:

    <code>
    Friend Class frmXXXXX
    </code>

    I dont even know where to start!

    Thank you,

    IpSteal
    Man, I really want my name to be IPSteal, not ipsteal but i can't find out how to change it!!!

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured