rpcrt4: Implement RpcNetworkInqProtseqs.
This commit is contained in:
parent
2fe9f14b29
commit
ec2f513690
|
@ -824,24 +824,6 @@ static RPC_STATUS RPCRT4_use_protseq(RpcServerProtseq* ps, const char *endpoint)
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* RpcNetworkInqProtseqsA (RPCRT4.@)
|
|
||||||
*/
|
|
||||||
RPC_STATUS WINAPI RpcNetworkInqProtseqsA( RPC_PROTSEQ_VECTORA* ProtSeqVector )
|
|
||||||
{
|
|
||||||
FIXME("(%p): stub\n", ProtSeqVector);
|
|
||||||
return RPC_S_NO_PROTSEQS_REGISTERED;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* RpcNetworkInqProtseqsW (RPCRT4.@)
|
|
||||||
*/
|
|
||||||
RPC_STATUS WINAPI RpcNetworkInqProtseqsW( RPC_PROTSEQ_VECTORW* ProtSeqVector )
|
|
||||||
{
|
|
||||||
FIXME("(%p): stub\n", ProtSeqVector);
|
|
||||||
return RPC_S_NO_PROTSEQS_REGISTERED;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* RpcServerInqBindings (RPCRT4.@)
|
* RpcServerInqBindings (RPCRT4.@)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -3160,3 +3160,68 @@ RPC_STATUS WINAPI RpcProtseqVectorFreeW(RPC_PROTSEQ_VECTORW **protseqs)
|
||||||
}
|
}
|
||||||
return RPC_S_OK;
|
return RPC_S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* RpcNetworkInqProtseqsW (RPCRT4.@)
|
||||||
|
*/
|
||||||
|
RPC_STATUS WINAPI RpcNetworkInqProtseqsW( RPC_PROTSEQ_VECTORW** protseqs )
|
||||||
|
{
|
||||||
|
RPC_PROTSEQ_VECTORW *pvector;
|
||||||
|
int i = 0;
|
||||||
|
RPC_STATUS status = RPC_S_OUT_OF_MEMORY;
|
||||||
|
|
||||||
|
TRACE("(%p)\n", protseqs);
|
||||||
|
|
||||||
|
*protseqs = HeapAlloc(GetProcessHeap(), 0, sizeof(RPC_PROTSEQ_VECTORW)+(sizeof(unsigned short*)*ARRAYSIZE(protseq_list)));
|
||||||
|
if (!*protseqs)
|
||||||
|
goto end;
|
||||||
|
pvector = *protseqs;
|
||||||
|
pvector->Count = 0;
|
||||||
|
for (i = 0; i < ARRAYSIZE(protseq_list); i++)
|
||||||
|
{
|
||||||
|
pvector->Protseq[i] = HeapAlloc(GetProcessHeap(), 0, (strlen(protseq_list[i].name)+1)*sizeof(unsigned short));
|
||||||
|
if (pvector->Protseq[i] == NULL)
|
||||||
|
goto end;
|
||||||
|
MultiByteToWideChar(CP_ACP, 0, (CHAR*)protseq_list[i].name, -1,
|
||||||
|
(WCHAR*)pvector->Protseq[i], strlen(protseq_list[i].name) + 1);
|
||||||
|
pvector->Count++;
|
||||||
|
}
|
||||||
|
status = RPC_S_OK;
|
||||||
|
|
||||||
|
end:
|
||||||
|
if (status != RPC_S_OK)
|
||||||
|
RpcProtseqVectorFreeW(protseqs);
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* RpcNetworkInqProtseqsA (RPCRT4.@)
|
||||||
|
*/
|
||||||
|
RPC_STATUS WINAPI RpcNetworkInqProtseqsA(RPC_PROTSEQ_VECTORA** protseqs)
|
||||||
|
{
|
||||||
|
RPC_PROTSEQ_VECTORA *pvector;
|
||||||
|
int i = 0;
|
||||||
|
RPC_STATUS status = RPC_S_OUT_OF_MEMORY;
|
||||||
|
|
||||||
|
TRACE("(%p)\n", protseqs);
|
||||||
|
|
||||||
|
*protseqs = HeapAlloc(GetProcessHeap(), 0, sizeof(RPC_PROTSEQ_VECTORW)+(sizeof(unsigned char*)*ARRAYSIZE(protseq_list)));
|
||||||
|
if (!*protseqs)
|
||||||
|
goto end;
|
||||||
|
pvector = *protseqs;
|
||||||
|
pvector->Count = 0;
|
||||||
|
for (i = 0; i < ARRAYSIZE(protseq_list); i++)
|
||||||
|
{
|
||||||
|
pvector->Protseq[i] = HeapAlloc(GetProcessHeap(), 0, strlen(protseq_list[i].name)+1);
|
||||||
|
if (pvector->Protseq[i] == NULL)
|
||||||
|
goto end;
|
||||||
|
strcpy((char*)pvector->Protseq[i], protseq_list[i].name);
|
||||||
|
pvector->Count++;
|
||||||
|
}
|
||||||
|
status = RPC_S_OK;
|
||||||
|
|
||||||
|
end:
|
||||||
|
if (status != RPC_S_OK)
|
||||||
|
RpcProtseqVectorFreeA(protseqs);
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
|
@ -561,6 +561,12 @@ RPCRTAPI RPC_STATUS RPC_ENTRY
|
||||||
RpcNetworkIsProtseqValidW( RPC_WSTR protseq );
|
RpcNetworkIsProtseqValidW( RPC_WSTR protseq );
|
||||||
#define RpcNetworkIsProtseqValid WINELIB_NAME_AW(RpcNetworkIsProtseqValid)
|
#define RpcNetworkIsProtseqValid WINELIB_NAME_AW(RpcNetworkIsProtseqValid)
|
||||||
|
|
||||||
|
RPCRTAPI RPC_STATUS RPC_ENTRY
|
||||||
|
RpcNetworkInqProtseqsA( RPC_PROTSEQ_VECTORA** protseqs );
|
||||||
|
RPCRTAPI RPC_STATUS RPC_ENTRY
|
||||||
|
RpcNetworkInqProtseqsW( RPC_PROTSEQ_VECTORW** protseqs );
|
||||||
|
#define RpcNetworkInqProtseqs WINELIB_NAME_AW(RpcNetworkInqProtseqs)
|
||||||
|
|
||||||
RPCRTAPI RPC_STATUS RPC_ENTRY
|
RPCRTAPI RPC_STATUS RPC_ENTRY
|
||||||
RpcProtseqVectorFreeA( RPC_PROTSEQ_VECTORA** protseqs );
|
RpcProtseqVectorFreeA( RPC_PROTSEQ_VECTORA** protseqs );
|
||||||
RPCRTAPI RPC_STATUS RPC_ENTRY
|
RPCRTAPI RPC_STATUS RPC_ENTRY
|
||||||
|
|
Loading…
Reference in New Issue