Hello everyone.
I started coding around 2 months ago. I´m currently working on a shader system
for hl1.
I want to load my dlls from my own folder cause i dont want other mods to screw
up cause of them.
This is my Function i´ve now.
void LoadLibrarys(void)
{
HINSTANCE m_hcgdll;
HINSTANCE m_hcggldll;
HINSTANCE m_hopengl;
char cgdll[256];
char cggldll[256];
char opengldll[256];
sprintf( cgdll, "%s/lib/cg.dll", gEngfuncs.pfnGetGameDirectory());
// replace forward slashes with backslashes
for( int i=0; i < 256; i++ )
if( cgdll[i] == '/' ) cgdll[i] = '\\';
m_hcgdll = LoadLibrary( cgdll );
sprintf( cggldll, "%s/lib/cgGL.dll", gEngfuncs.pfnGetGameDirectory());
// replace forward slashes with backslashes
for( int j=0; j < 256; j++ )
if( cggldll[j] == '/' ) cggldll[j] = '\\';
m_hcggldll = LoadLibrary( cggldll );
sprintf( opengldll, "%s/lib/opengl32.dll", gEngfuncs.pfnGetGameDirectory());
// replace forward slashes with backslashes
for( int k=0; k < 256; k++ )
if( opengldll[k] == '/' ) opengldll[k] = '\\';
m_hopengl = LoadLibrary( opengldll );
}
Now the Problem/Question.
Where should i call this function. I trued in cdll_int.cpp in vidinit,
intialize and in init function but still the cg.dlls aren´t loaded.
I´m using msvc++ 6 for coding and compiling.
Is there another way for loading the cg dlls from inside the modfolder?
regards
_________________________________________________________________
Hol dir 30 kostenlose Emoticons für deinen Windows Live Messenger
http://www.livemessenger-emoticons.com/funfamily/de-at/
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders