Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RpcMgmtIsServerListening results in RPC_S_ACCESS_DENIED

356 views
Skip to first unread message

Gero Gerber

unread,
Apr 30, 2007, 7:01:03 AM4/30/07
to
Hello,

I'm trying to check if a remote RCP-server is listening via
'RpcMgmtIsServerListening'. For the parameter I pass a binding-handle to
the remote server (binding-string is "ncacn_ip_tcp:localhost[4747]").

If I then start the remote RPC-server on the same machine
'RpcMgmtIsServerListening' returns 'RPC_S_ACCESS_DENIED'.

Calling functions on the remote-server works fine.

Does anybody know why this error is happening?

Thanks a lot
Gero

Franky...@discussions.microsoft.com

unread,
May 1, 2007, 4:11:00 PM5/1/07
to
Guess you are running on xp sp2 or win2k

When you call RpcMgmt* APIs, you are making a call on the managment
interface (provided by the rpc runtime)To allow calls to the management
interface, you
have to relax the RestrictRemoteClients policy.
You find it under
HKEY_LOCAL_MACHINE\ SOFTWARE\Policies\ Microsoft\Windows NT\RPC
setting 0 : none 1 default 2 high
guess you'll have to set it to 0 to allow the Mgmt functions to work properly

btw do you know of a good in debt guide to rpc programming? Can' seem to
find one.

Regards
Frank

Gero Gerber

unread,
May 2, 2007, 3:19:45 PM5/2/07
to
Hi Frank,

I do not have such a registry-entry. Do I have to create a new one to make
this functions work?

Well, I'd also like to get a whole book about RPC-programming. The only ones
I found at amazon were about 8 years old :-(

Gero

"Fra...@home.com" <Franky...@discussions.microsoft.com> schrieb im
Newsbeitrag news:C4CCAE68-7569-4C4B...@microsoft.com...

Gero Gerber

unread,
May 2, 2007, 3:31:24 PM5/2/07
to
You are right! Adding this key makes the routine work. So I think that the
documentation is wrong. Here

http://technet.microsoft.com/en-us/library/209d02c4-877c-4128-8e22-30bcd4aae6d3.aspx

they wrote that a missing key means default behavior
(RPC_RESTRICT_REMOTE_CLIENT_NONE). This seems definitely wrong.

Thanks a lot
Gero

"Fra...@home.com" <Franky...@discussions.microsoft.com> schrieb im
Newsbeitrag news:C4CCAE68-7569-4C4B...@microsoft.com...

Franky...@discussions.microsoft.com

unread,
May 3, 2007, 12:06:06 PM5/3/07
to
that used to be the default behaviour changed since xp sp2.
Gues we are talking about the same book Microsoft rpc programming from
O'reilly
they don't even publish it nomore.
And it doesn't cover all topics like asynch rpc

Gero Gerber

unread,
May 3, 2007, 1:06:55 PM5/3/07
to
Is there a new 'standard' on how to implement RPC (beside some open-source
XML-RPC libs) in a C++ application? Or differently: why is RPC so badly
documented in books? Does no one use it anymore?
The 'only' thing I want to do is to call (sync) functions in a remote C++
application and vice versa. Am I missing something?

Gero

"Fra...@home.com" <Franky...@discussions.microsoft.com> schrieb im
Newsbeitrag news:ADB0F45F-4776-46EC...@microsoft.com...

Alexander Nickolov

unread,
May 3, 2007, 1:50:03 PM5/3/07
to
RPC has long ago been superceded by COM (COM is also
called object RPC or RPC 2.0). 15 years ago to be precise.

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnic...@mvps.org
MVP VC FAQ: http://vcfaq.mvps.org
=====================================

"Gero Gerber" <gerog...@gmx.de> wrote in message
news:f1d4pu$41c$1...@tamarack.fernuni-hagen.de...

Gero Gerber

unread,
May 3, 2007, 5:59:24 PM5/3/07
to
So what's the way to go today? COM, COM+ or DCOM? I just want to call
functions (synchronously) between two C++ applications.

Gero

"Alexander Nickolov" <agnic...@mvps.org> schrieb im Newsbeitrag
news:Oa6b7taj...@TK2MSFTNGP04.phx.gbl...

Alexander Nickolov

unread,
May 4, 2007, 1:23:44 PM5/4/07
to
Well, DCOM is COM between machines, and COM+ is
considered COM 2.0, but limits you to only DLLs. I'd suggest
COM, with DCOM being part of it if you ever need it. COM
is very close to RPC in terms of interfacing, but it operates on
objects. Going from RPC to COM is the interface equivalent
of migrating code from C to C++.

Here's an introductory book on COM:

"Inside COM" by Dale Rogerson, MS Press

If you find it too light a reading, consider going straight to the
COM "bible":

"Essential COM" by Don Box, Addison Wesley

And here's the COM newsgroup:

microsoft.public.win32.programmer.ole

Now you should understand that COM is a not the latest and
greatest technology from Microsoft. It is a mature technology,
well understood and well supported in the Microsoft community.
It has its quirks too of course... :) Finally, since it is a higher level
technology than RPC, be prepared to lose some control over
the communication.

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnic...@mvps.org
MVP VC FAQ: http://vcfaq.mvps.org
=====================================

"Gero Gerber" <gerog...@gmx.de> wrote in message

news:f1dlua$q8b$1...@tamarack.fernuni-hagen.de...

Gero Gerber

unread,
May 4, 2007, 4:06:02 PM5/4/07
to
Thanks a lot for your extensive answer. This helps me very much!

Gero

"Alexander Nickolov" <agnic...@mvps.org> schrieb im Newsbeitrag

news:%23Ov64Dn...@TK2MSFTNGP03.phx.gbl...

0 new messages