简体   繁体   English

从python加载注册的dll

[英]Loading registered dll from python

I have registered the xceedzip.dll (admin cmd run -> regsvr32 xceedzip.dll) I would like to access the .net classes inside this dll from python. 我已经注册了xceedzip.dll(管理员cmd运行-> regsvr32 xceedzip.dll),我想从python访问此dll中的.net类。

In particular, I need to uncompress a continuous data stream from a multicast feed. 特别是,我需要从多播提要中解压缩连续的数据流。 The data comes in a xceedzip compressed form, and require the uncompress method to be executed on the data to unpackage it. 数据以xceedzip压缩形式出现,并且需要对数据执行uncompress方法以将其拆包。 for reference: http://doc.xceedsoft.com/products/XceedSco/ 供参考: http : //doc.xceedsoft.com/products/XceedSco/

Any pointers on how to achieve this would be appreciated. 任何有关如何实现这一目标的指针将不胜感激。 This won't have a 1-step ready ctypes solution to my understanding. 就我的理解而言,这将不会有1步就绪的ctypes解决方案。 This is because the Uncompress method lives in a class of a .net namespace. 这是因为Uncompress方法位于.net命名空间的类中。

I am informed that the win32com library might be able to achieve this, but would like some guidance before i put my nose to that grindstone. 我被告知,win32com库可能能够实现这一目标,但是在我对那个磨刀石nose之以鼻之前,我需要一些指导。

Thanks, 谢谢,

I downloaded the trial for it, and this seems to work: 我为此下载了试用版,这似乎可行:

import win32com.client
x=win32com.client.Dispatch('Xceed.StreamingCompression')
compressed = x.Compress(buffer('bork bork bork aaaaa bbbbbbbb'), True)
decompressed = x.Decompress(compressed, True)
print decompressed

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM