locked
Can't VB Create a Regular DLL? RRS feed

  • Question

  • I think it can't.

    VB create can create only Active X DLL, I think.

     

    Monday, January 23, 2012 5:18 AM

Answers

  • Hi,

    first of all, you have to specify, what a regular dll is iny our eyes.

    In .Net, you can only create assemblies. These assemblies are stored inside PE32 / PE32+ format and in case you created a class library, it will be a "regular" DLL. But it will always be a .Net assembly.

    Your .Net assembly can also act as a COM Component (What you meant with ActiveX DLL). But the DLL itself is not an ActiveX DLL. It simply does not have the required interfaces. But the .Net framework can act as a wrapper. So some .Net Framework DLL is offering the required interface and is calling / loading the assembly when required. Because of this fact, you cannot directly register the DLL (e.g. using regsrv32). You have to use .Net Framework tools e.g. regasm.exe.

    So in case you meant a win32 DLL you are correct: That cannot be done with .Net directly.

    With kind regards,

    Konrad

    • Proposed as answer by Cor Ligthert Monday, January 23, 2012 5:42 PM
    • Marked as answer by macho_daddy Tuesday, January 24, 2012 8:54 AM
    Monday, January 23, 2012 12:13 PM

All replies

  • Hi,

    first of all, you have to specify, what a regular dll is iny our eyes.

    In .Net, you can only create assemblies. These assemblies are stored inside PE32 / PE32+ format and in case you created a class library, it will be a "regular" DLL. But it will always be a .Net assembly.

    Your .Net assembly can also act as a COM Component (What you meant with ActiveX DLL). But the DLL itself is not an ActiveX DLL. It simply does not have the required interfaces. But the .Net framework can act as a wrapper. So some .Net Framework DLL is offering the required interface and is calling / loading the assembly when required. Because of this fact, you cannot directly register the DLL (e.g. using regsrv32). You have to use .Net Framework tools e.g. regasm.exe.

    So in case you meant a win32 DLL you are correct: That cannot be done with .Net directly.

    With kind regards,

    Konrad

    • Proposed as answer by Cor Ligthert Monday, January 23, 2012 5:42 PM
    • Marked as answer by macho_daddy Tuesday, January 24, 2012 8:54 AM
    Monday, January 23, 2012 12:13 PM
  • Thank you! Konrad,

    >So in case you meant a win32 DLL you are correct: That cannot be done with .Net directly.

    That's my case.

     

    Tuesday, January 24, 2012 8:53 AM
  • VB Express can't create a DLL written in C++ but C++ Express can and so can Visual studio. You have to be aware of wordlength, 32 or 64 bits. You cannot "mix and match".

    Renee


    "MODERN PROGRAMMING is deficient in elementary ways BECAUSE of problems INTRODUCED by MODERN PROGRAMMING." Me
    Friday, January 27, 2012 12:59 AM