Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Tue, 15 Nov 2005 19:32:32 +0530,    group: microsoft.public.platformsdk.networking        back       


Rpc Program..   
Hi All,
    I have written a RPC server. Which call the export of an Interface. Here 
is the code which makes a call to that.
I am running that in VisualStudio .Net. Interfaces are not getting exported 
saying that the export call returns me 1737
which a happens to be UNSUPPORTED_NAME_SYNTAX. Would somebody please tell me 
as to what is wrong with the code.
Code snippet follows.

Thanks  & regards
Ravi

status = RpcServerUseProtseq((unsigned char *)pszProtocolSequence, 
cMaxCalls, pszSecurity) ;
if(status) exit(status) ;

// Register the interface with the RPC run time.

status = RpcServerRegisterIf(INTERFACENAME_v1_0_s_ifspec, NULL, NULL) ;

if(status) exit(status) ;

// Collect the bindings provided by the RPC run time.

status = RpcServerInqBindings(&pBindingVec) ;

if(status) exit(status) ;

// Clear the endpoints out of the binding handles.

// This forces the clients through the Endpoint Mapper and

// reduces the volatility of the namespace entry for this

// service.

for (int i = 0; i < pBindingVec->Count; i++)

RpcBindingReset(pBindingVec->BindingH[i]);


// Create the entry in the name service for this service.

status = RpcNsBindingExport( RPC_C_NS_SYNTAX_DCE, (unsigned char 
*)pszEntryName, INTERFACENAME_v1_0_s_ifspec,  pBindingVec,  NULL );

if(status) exit(status);

// Register the interface with the Endpoint Mapper.

// There are no Object UUIDs or Annotation strings in this example.

status = RpcEpRegister(INTERFACENAME_v1_0_s_ifspec, pBindingVec, NULL, 
NULL);

// Start the server. RpcServerListen returns when the server shuts down.

if (status) exit(status) ;
date: Tue, 15 Nov 2005 19:32:32 +0530   author:   RAVI

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us