RpcNsBindingLookupBegin SOMETIMES fails 
Author Message
 RpcNsBindingLookupBegin SOMETIMES fails

I need to fix with some legacy code that uses RPC calls. When server
program is first started it sometimes fails in the following code:

EntryName[MAX_COMPUTERNAME_LENGTH + 5] = {"/.:/"};
GetComputerName(szCompName,  &nSize))
strcat(EntryName, szCompName);
status = RpcNsBindingLookupBegin(RPC_C_NS_SYNTAX_DEFAULT,
EntryName, Recipe_Transfer_ServerIfHandle, NULL, 0, &LookupContext);

If the call fails status will be RPC_S_NAME_SERVICE_UNAVAILABLE or
RPC_S_ENTRY_NOT_FOUND. I have checked and the computer name looks good.
In frustration I substituted a nonsense name after the call to
GetComputerName it seemed to word better.

I can find no rhyme or reason to when or why RpcNsBindingLookupBegin
fails. If the program gets past this call every thing works fine.

Thanks In Advance.

Chris



Mon, 07 Jun 2004 12:26:17 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. DCOM Proxy stub DLL fails to register - SOMETIMES ...

2. SetCooperativeLevel fails SOMETIMES...why?

3. CreateProcess() sometimes fails to start QuickWin application

4. Socket Error: WSAGetOverlappedResult fails sometimes

5. debug version works, release version sometimes fails

6. ICON fails to load sometimes

7. LoadFrame sometimes fails on NT, then requires reboot to fix

8. RegQueryValueEx failing sometimes.

9. GetMethod() sometimes fails in recursive call

10. MFC Serialize: sometimes OK, sometimes not!

11. Listbox: Sometimes allowing multiple selection and sometimes not ?

12. Update to DataRow sometimes works and sometimes not

 

 
Powered by phpBB® Forum Software