The first function called in client.dll that you should override is CHLClient::Init() in cdll_client_int.cpp
(The actual first function called is CreateInterface but I wouldn't go no-where near that function, it's better to do stuff in CHLClient::Init()) Sadly, it is not possible to do anything before IDirect3DDevice9 is initialized (Doesn't that happen when the Window opens? It is at least impossible to do anything before the Window opens). The CHLClient::Init() is the first function called, but it is not called until a few moments after client.dll is loaded into memory. If you need something to be called early on (note the environment is not entirely safe at this point), you can create a class with a constructor and globally instance one copy of this class; the constructor will then be called when client.dll is loaded into memory. The good thing abourt using CHLClient::Init() is that you can return false, if you don't want the game to launch (note this makes hl2.exe quite unstable, it might also be wise to call a function that terminates the process, like PostQuitMessage(0) or something). I hook into CHLClient::Init() with my Maxsi Distribution system to initialize it at run-time. Like Tom said, _DllMainCRTStartup() is also called, but I wouldn't touch that either - The Windows environment is also very unstable at this time. What is it that you are trying to do? Brent Lewis skrev: > I'd like to know what places in the client.dll are called as part of the > initialization phase. I'd rather not have to set breakpoints at every > function header in every file to see what's going on when the game starts. > Any info available on this? > > I'd like to know this partly for curiosities sake, but I'd also like to do > some work before the IDirect3DDevice9 gets created. > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, please > visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders