Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Staged Peer !? How TO??

This topic is 6146 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post

Link to post
Share on other sites

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..


Share this post

Link to post
Share on other sites
Thanks for your reply.

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

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!