EDN Admin
Well-known member
HELP!!
I am dire need for a solution to update XP targetted legacy code being ported to Windows 7. The legacy code uses Remote Procedure Call (RPC) name service series of functions (e.g. RpcNsBindImport(), RpcNsBinding Export()) which are noted in documentation
as "function is not supported on Windows Vista and later operating systems."
With me being new with RPC, what in the heck do I use in their replacements instead? I have not found a solution yet.
***ANY HELP OR DIRECTION WOULD BE GREATLY APPRECIATED.***
<span style="text-decoration:underline XP targetted Code sample of incompatiable code for Windows 7 ( Bold text
denotes problem functions):
<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
RPC_STATUS DbNameServiceLogin(
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small const<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small char<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small unsigned<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small char<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small if<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small char<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
ucRemote[60]; <span style="font-family:Consolas; color:#008000; font-size:x-small
<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
strcpy(ucRemote, remoteDomain);
_strupr(ucRemote);
<span style="font-family:Consolas; font-size:x-small
strcpy((
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small char<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small char<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small
<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
strcpy((
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small char<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small char<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#008000; font-size:x-small
<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#008000; font-size:x-small
<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small if<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small
<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
{
iStatus = RpcNsBindingImportNext (nsHandle, &dHandle);
<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small if<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
(iStatus == RPC_S_NO_MORE_BINDINGS) <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small break<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small if<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
(iStatus != RPC_S_OK) <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small continue<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small while<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small if<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small return<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small
void
<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small DBSetBindingInfo(<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small const<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small char<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small const<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small char<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small const<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small char<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small char<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small char<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small char<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; font-size:x-small *)RPC_PROTOCOL, protocol);
}
<span style="font-family:Consolas; font-size:x-small *)RPC_ENDPOINT, endpoint);<span style="font-family:Consolas; font-size:x-small
strcpy((
<span style="font-family:Consolas; font-size:x-small *)RPC_SERVADDR, servAddr);<span style="font-family:Consolas; font-size:x-small
strcpy((
<span style="font-family:Consolas; font-size:x-small *endpoint)
{
useBinding = TRUE;
<span style="font-family:Consolas; font-size:x-small
strcpy((
<span style="font-family:Consolas; font-size:x-small *protocol, <span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; font-size:x-small *servAddr, <span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; font-size:x-small iStatus;
}
<span style="font-family:Consolas; font-size:x-small (iStatus == RPC_S_OK) iStatus = 0;<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; font-size:x-small (!connected);
RpcNsBindingImportDone (&nsHandle);
}
<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; font-size:x-small ;
RpcBindingSetAuthInfo(dHandle, 0, RPC_C_AUTHN_LEVEL_NONE,
RPC_C_AUTHN_WINNT, 0, 0);
DBPing();
<span style="font-family:Consolas; font-size:x-small
}
<span style="font-family:Consolas; font-size:x-small ;<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small do
<span style="font-family:Consolas; font-size:x-small (iStatus == RPC_S_OK)
{
<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#008000; font-size:x-small
<span style="font-family:Consolas; color:#008000; font-size:x-small /* and unusable binding handlers. This is part of the DCE design. */
<span style="font-family:Consolas; color:#008000; font-size:x-small
<span style="font-family:Consolas; color:#008000; font-size:x-small /* The loop is present because the name service may contain "stale" */
<span style="font-family:Consolas; font-size:x-small *)nsEntry, PIP_DBI_NAME);
RpcTryExcept
{
iStatus = RpcNsBindingImportBegin (RPC_C_NS_SYNTAX_DEFAULT,
nsEntry, PIP_DATABASE_v1_0_c_ifspec,
NULL, &nsHandle);
}
RpcExcept(1)
{
iStatus = RpcExceptionCode();
}
RpcEndExcept
<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; font-size:x-small *)nsEntry, PIP_DBI_LOC);<span style="font-family:Consolas; font-size:x-small
strcat((
<span style="font-family:Consolas; color:#0000ff; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small else
<span style="font-family:Consolas; font-size:x-small *)nsEntry, ucRemote);
}
<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; font-size:x-small *)nsEntry, PIP_DBI_RMT);<span style="font-family:Consolas; font-size:x-small
strcat((
<span style="font-family:Consolas; color:#008000; font-size:x-small
<span style="font-family:Consolas; color:#008000; font-size:x-small // Make sure the remote domain name is upper case
<span style="font-family:Consolas; font-size:x-small (remoteDomain != NULL)
{
<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; font-size:x-small nsEntry[60];<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; font-size:x-small * remoteDomain)
{
RPC_STATUS iStatus = (-1);
RPC_NS_HANDLE nsHandle;
<span style="font-family:Consolas; font-size:x-small
View the full article
I am dire need for a solution to update XP targetted legacy code being ported to Windows 7. The legacy code uses Remote Procedure Call (RPC) name service series of functions (e.g. RpcNsBindImport(), RpcNsBinding Export()) which are noted in documentation
as "function is not supported on Windows Vista and later operating systems."
With me being new with RPC, what in the heck do I use in their replacements instead? I have not found a solution yet.
***ANY HELP OR DIRECTION WOULD BE GREATLY APPRECIATED.***
<span style="text-decoration:underline XP targetted Code sample of incompatiable code for Windows 7 ( Bold text
denotes problem functions):
<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
RPC_STATUS DbNameServiceLogin(
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small const<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small char<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small unsigned<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small char<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small if<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small char<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
ucRemote[60]; <span style="font-family:Consolas; color:#008000; font-size:x-small
<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
strcpy(ucRemote, remoteDomain);
_strupr(ucRemote);
<span style="font-family:Consolas; font-size:x-small
strcpy((
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small char<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small char<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small
<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
strcpy((
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small char<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small char<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#008000; font-size:x-small
<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#008000; font-size:x-small
<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small if<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small
<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
{
iStatus = RpcNsBindingImportNext (nsHandle, &dHandle);
<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small if<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
(iStatus == RPC_S_NO_MORE_BINDINGS) <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small break<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small if<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
(iStatus != RPC_S_OK) <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small continue<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small while<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small if<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small return<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small
void
<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small DBSetBindingInfo(<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small const<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small char<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small const<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small char<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small const<span style="font-family:Consolas; font-size:x-small <span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small char<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small char<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small char<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small <span style="font-family:Consolas; color:#0000ff; font-size:x-small char<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; font-size:x-small *)RPC_PROTOCOL, protocol);
}
<span style="font-family:Consolas; font-size:x-small *)RPC_ENDPOINT, endpoint);<span style="font-family:Consolas; font-size:x-small
strcpy((
<span style="font-family:Consolas; font-size:x-small *)RPC_SERVADDR, servAddr);<span style="font-family:Consolas; font-size:x-small
strcpy((
<span style="font-family:Consolas; font-size:x-small *endpoint)
{
useBinding = TRUE;
<span style="font-family:Consolas; font-size:x-small
strcpy((
<span style="font-family:Consolas; font-size:x-small *protocol, <span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; font-size:x-small *servAddr, <span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; font-size:x-small iStatus;
}
<span style="font-family:Consolas; font-size:x-small (iStatus == RPC_S_OK) iStatus = 0;<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; font-size:x-small (!connected);
RpcNsBindingImportDone (&nsHandle);
}
<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; font-size:x-small ;
RpcBindingSetAuthInfo(dHandle, 0, RPC_C_AUTHN_LEVEL_NONE,
RPC_C_AUTHN_WINNT, 0, 0);
DBPing();
<span style="font-family:Consolas; font-size:x-small
}
<span style="font-family:Consolas; font-size:x-small ;<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small do
<span style="font-family:Consolas; font-size:x-small (iStatus == RPC_S_OK)
{
<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; color:#008000; font-size:x-small
<span style="font-family:Consolas; color:#008000; font-size:x-small /* and unusable binding handlers. This is part of the DCE design. */
<span style="font-family:Consolas; color:#008000; font-size:x-small
<span style="font-family:Consolas; color:#008000; font-size:x-small /* The loop is present because the name service may contain "stale" */
<span style="font-family:Consolas; font-size:x-small *)nsEntry, PIP_DBI_NAME);
RpcTryExcept
{
iStatus = RpcNsBindingImportBegin (RPC_C_NS_SYNTAX_DEFAULT,
nsEntry, PIP_DATABASE_v1_0_c_ifspec,
NULL, &nsHandle);
}
RpcExcept(1)
{
iStatus = RpcExceptionCode();
}
RpcEndExcept
<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; font-size:x-small *)nsEntry, PIP_DBI_LOC);<span style="font-family:Consolas; font-size:x-small
strcat((
<span style="font-family:Consolas; color:#0000ff; font-size:x-small
<span style="font-family:Consolas; color:#0000ff; font-size:x-small else
<span style="font-family:Consolas; font-size:x-small *)nsEntry, ucRemote);
}
<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; font-size:x-small *)nsEntry, PIP_DBI_RMT);<span style="font-family:Consolas; font-size:x-small
strcat((
<span style="font-family:Consolas; color:#008000; font-size:x-small
<span style="font-family:Consolas; color:#008000; font-size:x-small // Make sure the remote domain name is upper case
<span style="font-family:Consolas; font-size:x-small (remoteDomain != NULL)
{
<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; font-size:x-small nsEntry[60];<span style="font-family:Consolas; font-size:x-small
<span style="font-family:Consolas; font-size:x-small * remoteDomain)
{
RPC_STATUS iStatus = (-1);
RPC_NS_HANDLE nsHandle;
<span style="font-family:Consolas; font-size:x-small
View the full article