🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Staged Peer !? How TO??

Started by
1 comment, last by Jonoson 22 years, 7 months ago
Does any one studied the sample StagedPeer in DX8 SDK? I''m not really understand what the structure of this sample which was like the RTS Game Room.. It used the Critical Section to create some thread, any one give some idea about this? and another strange thing was the UXutil.h/cpp. This sample called some function at beginning which shows following: RegCreateKeyEx( HKEY_CURRENT_USER, DPLAY_SAMPLE_KEY, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hDPlaySampleRegKey, NULL ); DXUtil_ReadStringRegKey( hDPlaySampleRegKey, TEXT("Player Name"), g_strLocalPlayerName, MAX_PATH, TEXT("TestPlayer") ); DXUtil_ReadStringRegKey( hDPlaySampleRegKey, TEXT("Session Name"), g_strSessionName, MAX_PATH, TEXT("TestGame") ); DXUtil_ReadStringRegKey( hDPlaySampleRegKey, TEXT("Preferred Provider"), g_strPreferredProvider, MAX_PATH, TEXT("DirectPlay8 TCP/IP Service Provider") ); uh, what are they? what for? someone help me please .. Thanks anyway
Advertisement
Jonoson,

Those lines you posted are just function calls to grab values
from your registry for the application...

It''s looking for the registry key specified in the hDplaySampleRegKey...if it''s not there, it''ll create it...

So your first call to readstringregkey is grabbing the player name, with a default value of "TestPlayer"...(ie. if the key
isn''t found in the registry, it''ll return "TestPlayer" as the default name)

Same thing with the next two calls, only they''re for grabbing the session name and preferred provider..

hth
Learn about game programming!Games Programming in C++: Start to Finish
Thanks for your reply.

but there''s another question: is this kind of problem ( DirectPlay ) performing with the Multi-thread necessary?

This topic is closed to new replies.

Advertisement