开发者

Has anyone written a .NET wrapper for Lantronix's CprIf.dll?

We are thinking about using开发者_如何学运维 an XPORT serial to ethernet adapter for one of our products. Lantronix provides an SDK that contains an unmanaged dll that can be used to communicate with its devices. All our software is developed in .NET so I'm in need of a wrapper. If someone else has already gone through the pain it would be great to not have to reinvent the wheel. I know this is a long shot but I thought I'd try.


You don't really need a wrapper per say, you just need to do the p/Invoke calls in to the dll. If you are having trouble figuring out how to do them I recommend the tool P/Invoke Interop Assistant. Go to the translate tab and paste the function you would have used from the c++ code and it will give you the code to call it from either C# or VB

If you are dealing with type libraries instead of dlls you can also use another tool they have Type Library Importer in Managed Code to create wrappers for them.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜