Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ Windows VC9.0 VC10.0
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 26-Apr-11 4:07am
Edited 26-Apr-11 22:31pm
v3
Comments
CPallini at 26-Apr-11 9:09am
   
Uh?!
SAKryukov at 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 at 27-Apr-11 3:31am
   
Edited for Grammar and Readability.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

"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.
  Permalink  
Comments
Dalek Dave at 27-Apr-11 3:32am
   
Good Link
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Comments
ryan20fun at 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)

  Print Answers RSS
0 George Jonsson 215
1 Kornfeld Eliyahu Peter 169
2 OriginalGriff 120
3 PIEBALDconsult 110
4 Zoltán Zörgő 99
0 OriginalGriff 6,165
1 DamithSL 4,658
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,649
4 Sergey Alexandrovich Kryukov 3,294


Advertise | Privacy | Mobile
Web02 | 2.8.141220.1 | Last Updated 27 Apr 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100