如何将对象作为参数传递给dll [英] how to pass object as argument to a dll

查看:87
本文介绍了如何将对象作为参数传递给dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 

我需要将包含数据的对象传递给dll方法.在单独的Visual Studio解决方案文件中,对象与DLL是分开的.怎么可能?

I need to pass an object containing data to a dll method. the object is separate from the DLL, in a separate visual studio solution file. How is it possible?

 

我传递对象的原因是,因为我不想在DLL类库中的方法定义中单独列出所有对象属性作为参数.

The reason I am passing object is , because I don't want to list all object attributes as parameters individually in the method definition within the dll class library.

请帮助我

谢谢!

推荐答案

您可以使用结构.许多Windows API都希望使用POINT,RECT,OPENFILENAME和LOGFONT之类的结构.
You can use structures. A lot of Windows APIs expect structures such as POINT, RECT, OPENFILENAME and LOGFONT.


这篇关于如何将对象作为参数传递给dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆