这几天学习RPC,系统是XP SP2,想测试一下一个简单的例子,但是无论如何都不能连接服务不可达信息。哪位对这方面有经验的指导一下。服务端是:RPC_IF_ALLOW_CALLBACKS_WITH_NO_AUTH. 协议基本都试了一下,连接不上。部分代码如下:server : 
// Add End Point , protocal : named pipe.
rpc_status = RpcServerUseProtseqEp(reinterpret_cast<RPC_WSTR>(const_cast<WCHAR*>(REMOTE_RPC_PROTOCAL)),
RPC_C_PROTSEQ_MAX_REQS_DEFAULT,
reinterpret_cast<RPC_WSTR>(const_cast<WCHAR*>(L"\\pipe\\pp_namedpipe")),
NULL);
cout<<"RpcServerUseProtseqEp return : "<<rpc_status<<endl;
if(rpc_status){
exit(rpc_status);
} // register server interface : first function call
//rpc_status = RpcServerRegisterIf(RPC_SERVER_v1_0_s_ifspec,NULL,NULL);
rpc_status = RpcServerRegisterIfEx(RPC_SERVER_v1_0_s_ifspec,NULL,NULL,
RPC_IF_ALLOW_CALLBACKS_WITH_NO_AUTH,RPC_C_LISTEN_MAX_CALLS_DEFAULT,NULL);
cout<<"RpcServerRegisterIf return : "<<rpc_status<<endl;
if(rpc_status){
exit(rpc_status);
}

// listen until stopped
rpc_status = RpcServerListen(1, RPC_C_LISTEN_MAX_CALLS_DEFAULT, FALSE); // min,max call and start now
cout<<"RpcServerListen return : "<<rpc_status<<endl;
if(rpc_status){
exit(rpc_status);
}client:
// compose a binding string such as printf
rpc_status = RpcStringBindingCompose(NULL,
reinterpret_cast<RPC_WSTR>(const_cast<WCHAR*>(REMOTE_RPC_PROTOCAL)), // protocal
reinterpret_cast<RPC_WSTR>(const_cast<WCHAR*>(L"localhost")), // host ip
reinterpret_cast<RPC_WSTR>(const_cast<WCHAR*>(L"\\pipe\\pp_namedpipe")), // end point
NULL,
&pStringBinding);
cout<<"RpcStringBindingCompose return : "<<rpc_status<<endl;
if (rpc_status)
{
exit(rpc_status);
} // binding from string to implicit handle in idl.
rpc_status = RpcBindingFromStringBinding(pStringBinding,&rpc_IfHandle);
cout<<"RpcBindingFromStringBinding return : "<<rpc_status<<endl;
if (rpc_status)
{
exit(rpc_status);
} // author info : LOCAL RPC
ULONG ulSecurityLevel = RPC_C_AUTHN_LEVEL_NONE;
ULONG ulAuthService = RPC_C_AUTHN_WINNT;


RpcTryExcept // rpc try
{
SendRequest(rpc_IfHandle,strlen(reinterpret_cast<const char*>(pSendString)),pSendString);
}
RpcExcept(1)
{
cout<<"RPC reported exception : "<<RpcExceptionCode()<<endl;
}
RpcEndExcept
PS : 哪位有这方面资料的可以介绍一下。