Commit ec2f5136 authored by Damjan Jovanovic's avatar Damjan Jovanovic Committed by Alexandre Julliard

rpcrt4: Implement RpcNetworkInqProtseqs.

parent 2fe9f14b
...@@ -825,24 +825,6 @@ static RPC_STATUS RPCRT4_use_protseq(RpcServerProtseq* ps, const char *endpoint) ...@@ -825,24 +825,6 @@ static RPC_STATUS RPCRT4_use_protseq(RpcServerProtseq* ps, const char *endpoint)
} }
/*********************************************************************** /***********************************************************************
* 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.@)
*/ */
RPC_STATUS WINAPI RpcServerInqBindings( RPC_BINDING_VECTOR** BindingVector ) RPC_STATUS WINAPI RpcServerInqBindings( RPC_BINDING_VECTOR** BindingVector )
......
...@@ -3160,3 +3160,68 @@ RPC_STATUS WINAPI RpcProtseqVectorFreeW(RPC_PROTSEQ_VECTORW **protseqs) ...@@ -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;
}
...@@ -562,6 +562,12 @@ RPCRTAPI RPC_STATUS RPC_ENTRY ...@@ -562,6 +562,12 @@ RPCRTAPI RPC_STATUS RPC_ENTRY
#define RpcNetworkIsProtseqValid WINELIB_NAME_AW(RpcNetworkIsProtseqValid) #define RpcNetworkIsProtseqValid WINELIB_NAME_AW(RpcNetworkIsProtseqValid)
RPCRTAPI RPC_STATUS RPC_ENTRY 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
RpcProtseqVectorFreeA( RPC_PROTSEQ_VECTORA** protseqs ); RpcProtseqVectorFreeA( RPC_PROTSEQ_VECTORA** protseqs );
RPCRTAPI RPC_STATUS RPC_ENTRY RPCRTAPI RPC_STATUS RPC_ENTRY
RpcProtseqVectorFreeW( RPC_PROTSEQ_VECTORW** protseqs ); RpcProtseqVectorFreeW( RPC_PROTSEQ_VECTORW** protseqs );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment