如何制作自己的Micro Runtime,如C ++/DirectX/OpenGL [英] How to make my own Micro Runtime like C++ / DirectX / OpenGL

查看:107
本文介绍了如何制作自己的Micro Runtime,如C ++/DirectX/OpenGL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我想知道如何制作像C ++/DirectX/OpenGL这样的运行时,您可以在其中链接到该运行时,而不必将那些必需的文件放在同一目录中.

我正在看的东西更像DirectX/OpenGL的东西.

任何在正确方向上的帮助或指示都将非常有帮助.


在此先感谢.

---编辑---
好的,我的意思是更像DirectX和OpenGL.
我会在您链接到的库中提供功能,例如DirectX或OpenGL,但不必在apps目录中链接到的dll.
DirectX和OpenGL如何做到这一点?

我的意思是应用程序如何知道要加载dll,它必须检查System32?

Hi all,

I was wondering how I could make a Runtime like C++ / DirectX / OpenGL, where you link to it and you dont need to have those required files in the same directory.

What I am looking at is more like what DirectX / OpenGL does.

Any help or pointers in the right direction would be very helpful.


Thanks in Advance.

---edit---
OK, What I mean here is something more like what DirectX and OpenGL do.
I would provide functions in a library that you link to like DirectX or OpenGL, but dont have to have the dll''s you linked to in the apps directory.
How does DirectX and OpenGL do that?

I mean how does the application know that in order to load the dll it has to check System32?

推荐答案

好,我的意思是这里还有更多内容就像DirectX和OpenGL一样.
因此,我将在您可以链接到的库中提供功能,例如DirectX或OpenGL,但不必在apps目录中链接您的dll.那么DirectX和OpenGL如何做到这一点?我的意思是,应用程序如何知道要加载dll,它必须检查System32?."


对于这个问题,我给你答案.
检查链接,
动态链接库搜索顺序:
http://msdn.microsoft.com/en-us/library/ms682586%28v = vs.85%29.aspx [ ^ ]

您将了解LoadLibrary如何搜索dll的信息.如果您的dll放置在系统目录中,则它们将由负载库自动获取.
"ok, what i mean here is something more like what DirectX and OpenGL do.
so i would provide functions in a library that you link to like DirectX or OpenGL, but dont have to have the dll''s you linked to in the apps directory. so how does DirectX and OpenGL do that ?, i mean how does the applicaction know that in order to load the dll it has to check System32 ?."


For this question i am giving you the answer.
Check the link,
Dynamic-Link Library Search Order:
http://msdn.microsoft.com/en-us/library/ms682586%28v=vs.85%29.aspx[^]

you will get an idea of how LoadLibrary search for a dll.If your dll are placed in System directory then they are automatically fetched by the loadlibrary.


什么所需文件"您在说什么?你能举个例子吗?

如果您的意思是说,您有一组经常使用的功能,那么可以,您可以将它们放在静态或动态库中.
What "required files" are you talking about? Could you give an example?

If you mean, you have a set of functions that you use frequently, then yes, you can put them in a static or dynamic library.


这篇关于如何制作自己的Micro Runtime,如C ++/DirectX/OpenGL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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