开发者

interface of dll

I heard people talking about changing the interface of a dll. What is a change in the interface 开发者_如何学Pythonof the dll, and how would you do that?


Changing a dll's interface would mean to change how the dll and the calling code interacts. This could mean changing the signatures of the dll's exporting functions, or changing to a different set of functions entirely, or it could mean passing different data from the calling code. A dll's interface is generally all it's exported and imported items (both functions and data), or in other words, the parts of the dll that you have access to when you use it.

Often you will want to change the behaviour of your dll without changing its interface. This is because changing the interface often will break code that uses it.

Imagine my dll exporting function foo:

void foo(int i)
{
   // Does thing with integer
}  

Changing the interface could mean changing foo's signature into

void foo(int, float);

Now, all the code that used foo previously has to be rewritten to use the new signature, which could be a bad thing.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜