Archived

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

DirectPlay odd HRESULT

This topic is 5124 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

Hello, I have been working for quite some time with some directX code, but lately ran into a weird (bug?) Whats odd is, the fact that i have no idea where to start diagnosing it, DirectX is not returning a proper error code. I stuck an exit(hr) at the end of the statement, and got a weird return.... -2146073984.... if anyone has any idea (this code is giving me major headaches). Thanks in advance, if(FAILED(hr =(this->aircraft[hangerspot-1].dPlay->Connect(this->app_desc, this->dPlayHostAddress, this->aircraft[my_hanger].dPlayAddress, NULL, NULL, NULL, 0, NULL, NULL, NULL, DPNCONNECT_SYNC)))) { switch(hr) { case DPNERR_HOSTREJECTEDCONNECTION: debug->AddString(" DPNERR_HOSTREJECTEDCONNECTION"); break; case DPNERR_INVALIDAPPLICATION: debug->AddString(" DPNERR_INVALIDAPPLICATION"); break; case DPNERR_INVALIDDEVICEADDRESS: debug->AddString(" DPNERR_INVALIDDEVICEADDRESS"); break; case DPNERR_INVALIDFLAGS: debug->AddString(" DPNERR_INVALIDFLAGS"); break; case DPNERR_INVALIDHOSTADDRESS: debug->AddString(" DPNERR_INVALIDHOSTADDRESS"); break; case DPNERR_INVALIDINSTANCE: debug->AddString(" DPNERR_INVALIDINSTANCE"); break; case DPNERR_INVALIDINTERFACE: debug->AddString(" DPNERR_INVALIDINTERFACE"); break; case DPNERR_INVALIDPASSWORD: debug->AddString(" DPNERR_INVALIDPASSWORD"); break; case DPNERR_NOCONNECTION: debug->AddString(" DPNERR_NOCONNECTION"); break; case DPNERR_NOTHOST: debug->AddString(" DPNERR_NOTHOST"); break; case DPNERR_SESSIONFULL: debug->AddString(" DPNERR_SESSIONFULL"); break; case DPNSUCCESS_PENDING: debug->AddString(" RESULTS PENDING"); break; case S_OK: debug->AddString(" This is weird, we are actual OK"); break; default: debug->AddString(" UNKNOWN ERROR"); }; this->debug->AddString("Failed to connect plane (dPlay->connect)"); exit(hr); }; EDIT: Didnt properly thank people [edited by - paulcesar on November 30, 2003 11:27:14 PM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
The error code is DPNERR_INCOMPLETEADDRESS. You can use the IDirectPlay8Address::GetURLA() call to download the address string and examine its contents to see if the address is indeed complete and valid. If push comes to shove, you could add the DPNCONNECT_OKTOQUERYFORADDRESSING flag so that if DX feels the address is imcomplete, you can fill in the missing items (and find out *which* missing item it''s yelling about).

Share this post


Link to post
Share on other sites
Hello,

Sorry for having a question so soon, but I ran into a similar problem again, so I decided its probably in the dplay8.h file. Anyway i was trying to use the .h file to figure out the actual number, but am having problems going through microsoft''s code. mainly what the number should be after MAKE_HRESULT code. Is there any formulae availiable for me to figure this out? (i cant seem to debug and parse the file like I was hoping, so anything is a great help)

Sincerly
Richard

Share this post


Link to post
Share on other sites