py2exe to generate dlls?

后端 未结 5 1440
暗喜
暗喜 2020-12-14 10:58

Is there a way using py2exe or some other method to generate dll files instead of exe files?

I would want to basically create a normal win32 dll with normal function

5条回答
  •  醉酒成梦
    2020-12-14 11:33

    It looks like it is possible to generate a COM DLL from py2exe:

    http://www.py2exe.org/index.cgi/Py2exeAndCtypesComDllServer

      23     my_com_server_target = Target(
      24     description = "my com server",
      25     # use module name for ctypes.com dll server
      26     modules = ["dir.my_com_server"],
      27     # the following line embeds the typelib within the dll
      28     other_resources = [("TYPELIB", 1, open(r"dir\my_com_server.tlb", "rb").read())],
      29     # we only want the inproc (dll) server
      30     create_exe = False
      31     )
    

提交回复
热议问题