Click here to Skip to main content
15,892,161 members
Please Sign up or sign in to vote.
3.50/5 (2 votes)
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?
Posted
Updated 26-Apr-11 21:31pm
v3
Comments
CPallini 26-Apr-11 9:09am    
Uh?!
Sergey Alexandrovich Kryukov 26-Apr-11 17:08pm    
I guess I basically understand, but you need to explain: what kind of applications do you want to host under such run-time, what they are supposed to do (a domain of application tasks) and what the idea of the role of the run-time (why not Windows or .NET platform? What's the expected benefit?)?
What are the main goals?
--SA
Dalek Dave 27-Apr-11 3:31am    
Edited for Grammar and Readability.

"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.
 
Share this answer
 
Comments
Dalek Dave 27-Apr-11 3:32am    
Good Link
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.
 
Share this answer
 
Comments
ryan20fun 27-Apr-11 2:14am    
yes, that is kinda what i want but had no idea how to do it(google did not find me anything usefull).
so how do you dynamically link to a library so it does not have to
have it in the apps directory(i am fimiliar of the LoadLibrary command just have not used it, instead i use a reference to it)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900