469,332 Members | 6,678 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,332 developers. It's quick & easy.

RunningObjectTable problem

Hi,

I am using COM with RunningObjectTable, take in mind the following points:

1. I have a server that runs as a service this service register an object in
ROT, the object should be accesible to usermode applications
2. I have a user mode application trying to get the interface pointer to the
objsect registered by thye service in ROT

spROT->GetObjectW failes with 0x800401e3 on the user mode application

when running my server as an application ( and not as a service ) the
interface is retrieved successfully.

Enumerating all the ROT objects by the app didn’t show the object registered
by the service.

It seems as if there is a different context per desktop ( such as with named
kernel objects ), is there any special namespace I cane use ( such as
‘Global’ ) that will enable a non service app to resolve objects registered
by a service?

Why does this happen? Why objects registered in ROT by a service are not
accessible to non service applications?

Any help would be appreciated.

--
Nadav
http://www.sophin.com
Mar 4 '07 #1
8 2113
"Nadav" <Na***@discussions.microsoft.comwrote in message
news:27**********************************@microsof t.com...
Hi,

I am using COM with RunningObjectTable, take in mind the following points:

1. I have a server that runs as a service this service register an object in
ROT, the object should be accesible to usermode applications
2. I have a user mode application trying to get the interface pointer to the
objsect registered by thye service in ROT

spROT->GetObjectW failes with 0x800401e3 on the user mode application

when running my server as an application ( and not as a service ) the
interface is retrieved successfully.

Enumerating all the ROT objects by the app didn’t show the object registered
by the service.

It seems as if there is a different context per desktop ( such as with named
kernel objects ), is there any special namespace I cane use ( such as
‘Global’ ) that will enable a non service app to resolve objects registered
by a service?

Why does this happen? Why objects registered in ROT by a service are not
accessible to non service applications?

Any help would be appreciated.

--
Nadav
http://www.sophin.com


Have you register the object with the ROTFLAGS_ALLOWANYCLIENT flag set?

Willy.

Mar 4 '07 #2
Hi Willy,

Thanks for your immediate response, I have tried to use
ROTFLAGS_ALLOWANYCLIENT, this results: 0x80004015 The class is configured to
run as a security id different from the caller

Some background:
My "server" is an AtlComModule DLL loaded by snmp.exe on the entry point (
SnmpExtensionInit ) a specialized thread is created, this thread instentiate
the COM object and register it on the ROT, when using ROTFLAGS_ALLOWANYCLIENT
I get the error described above.

How can I resolve this problem ( 0x80004015 )how can I configure the class
security id? is there any COM specific configuration I should do ?

--
Nadav
http://www.sophin.com
"Willy Denoyette [MVP]" wrote:
"Nadav" <Na***@discussions.microsoft.comwrote in message
news:27**********************************@microsof t.com...
Hi,

I am using COM with RunningObjectTable, take in mind the following points:

1. I have a server that runs as a service this service register an object in
ROT, the object should be accesible to usermode applications
2. I have a user mode application trying to get the interface pointer to the
objsect registered by thye service in ROT

spROT->GetObjectW failes with 0x800401e3 on the user mode application

when running my server as an application ( and not as a service ) the
interface is retrieved successfully.

Enumerating all the ROT objects by the app didn’t show the object registered
by the service.

It seems as if there is a different context per desktop ( such as with named
kernel objects ), is there any special namespace I cane use ( such as
‘Global’ ) that will enable a non service app to resolve objects registered
by a service?

Why does this happen? Why objects registered in ROT by a service are not
accessible to non service applications?

Any help would be appreciated.

--
Nadav
http://www.sophin.com

Have you register the object with the ROTFLAGS_ALLOWANYCLIENT flag set?

Willy.

Mar 4 '07 #3
Read the documentation carefully:

http://msdn2.microsoft.com/en-us/library/ms680747.aspx

In particular:

"A server registered as either LocalService or RunAs can set the
ROTFLAGS_ALLOWANYCLIENT flag in its call to Register to allow any client to
connect to it. A server setting this bit must have its executable name in
the AppID section of the registry that refers to the AppID for the
executable."

HTH,

Brian

By the way, please don't multipost like this. It is considered bad
netiquette. You should be crossposting instead.
"Nadav" <Na***@discussions.microsoft.comwrote in message
news:85**********************************@microsof t.com...
Hi Willy,

Thanks for your immediate response, I have tried to use
ROTFLAGS_ALLOWANYCLIENT, this results: 0x80004015 The class is configured
to
run as a security id different from the caller

Some background:
My "server" is an AtlComModule DLL loaded by snmp.exe on the entry point
(
SnmpExtensionInit ) a specialized thread is created, this thread
instentiate
the COM object and register it on the ROT, when using
ROTFLAGS_ALLOWANYCLIENT
I get the error described above.

How can I resolve this problem ( 0x80004015 )how can I configure the class
security id? is there any COM specific configuration I should do ?
SnmpExtensionInit

>
--
Nadav
http://www.sophin.com
"Willy Denoyette [MVP]" wrote:
>"Nadav" <Na***@discussions.microsoft.comwrote in message
news:27**********************************@microso ft.com...
Hi,

I am using COM with RunningObjectTable, take in mind the following
points:

1. I have a server that runs as a service this service register an
object in
ROT, the object should be accesible to usermode applications
2. I have a user mode application trying to get the interface pointer
to the
objsect registered by thye service in ROT

spROT->GetObjectW failes with 0x800401e3 on the user mode application

when running my server as an application ( and not as a service ) the
interface is retrieved successfully.

Enumerating all the ROT objects by the app didn't show the object
registered
by the service.

It seems as if there is a different context per desktop ( such as with
named
kernel objects ), is there any special namespace I cane use ( such as
'Global' ) that will enable a non service app to resolve objects
registered
by a service?

Why does this happen? Why objects registered in ROT by a service are
not
accessible to non service applications?

Any help would be appreciated.

--
Nadav
http://www.sophin.com

Have you register the object with the ROTFLAGS_ALLOWANYCLIENT flag set?

Willy.


Mar 5 '07 #4
Hi Brian,

Thanks for your response, I have added the following:
HKCR
{
...
...
NoRemove AppID
{
ForceRemove 'ROTTester.DLL'
{
val AppId = s '%APPID%'
}
ForceRemove '%APPID%'
{
val RunAs = s 'Interactive User'
}
}
}

Unfortunetly, it didn't help I still get 0x80004015

Additional background:
1. I am writing an SNMP Extension Agent
2. The extension agent expose SNMP API and enclose a CAtlDllModule
3. During SNMP initialization ( SnmpExtensionInit ) I create the COM object
( implemented by the DLL ) and try to register it in ROT using
ROTFLAGS_ALLOWANYCLIENT, this returns 0x80004015

Taking the above in mind giving special attention to the fact that my DLL is
registered as a SnmpExtension DLL and is loaded by snmp.exe, is it somehow
possible to have an inproc COM object registered in ROT with
ROTFLAGS_ALLOWANYCLIENT ?

Any help would be appreciated

--
Nadav
http://www.sophin.com
"Brian Muth" wrote:
Read the documentation carefully:

http://msdn2.microsoft.com/en-us/library/ms680747.aspx

In particular:

"A server registered as either LocalService or RunAs can set the
ROTFLAGS_ALLOWANYCLIENT flag in its call to Register to allow any client to
connect to it. A server setting this bit must have its executable name in
the AppID section of the registry that refers to the AppID for the
executable."

HTH,

Brian

By the way, please don't multipost like this. It is considered bad
netiquette. You should be crossposting instead.
"Nadav" <Na***@discussions.microsoft.comwrote in message
news:85**********************************@microsof t.com...
Hi Willy,

Thanks for your immediate response, I have tried to use
ROTFLAGS_ALLOWANYCLIENT, this results: 0x80004015 The class is configured
to
run as a security id different from the caller

Some background:
My "server" is an AtlComModule DLL loaded by snmp.exe on the entry point
(
SnmpExtensionInit ) a specialized thread is created, this thread
instentiate
the COM object and register it on the ROT, when using
ROTFLAGS_ALLOWANYCLIENT
I get the error described above.

How can I resolve this problem ( 0x80004015 )how can I configure the class
security id? is there any COM specific configuration I should do ?

SnmpExtensionInit


--
Nadav
http://www.sophin.com
"Willy Denoyette [MVP]" wrote:
"Nadav" <Na***@discussions.microsoft.comwrote in message
news:27**********************************@microsof t.com...
Hi,

I am using COM with RunningObjectTable, take in mind the following
points:

1. I have a server that runs as a service this service register an
object in
ROT, the object should be accesible to usermode applications
2. I have a user mode application trying to get the interface pointer
to the
objsect registered by thye service in ROT

spROT->GetObjectW failes with 0x800401e3 on the user mode application

when running my server as an application ( and not as a service ) the
interface is retrieved successfully.

Enumerating all the ROT objects by the app didn't show the object
registered
by the service.

It seems as if there is a different context per desktop ( such as with
named
kernel objects ), is there any special namespace I cane use ( such as
'Global' ) that will enable a non service app to resolve objects
registered
by a service?

Why does this happen? Why objects registered in ROT by a service are
not
accessible to non service applications?

Any help would be appreciated.

--
Nadav
http://www.sophin.com

Have you register the object with the ROTFLAGS_ALLOWANYCLIENT flag set?

Willy.



Mar 5 '07 #5
IMHO you haven't followed instructions. You must use an executable to
register the COM object in the ROT, and the executable must outlive the
registration period. A DLL is not an executable.

Unfortunately, I know nothing about SNMP extensions, but I reckon the AppID
must be the name of the SNMP service.

This is admittedly on the fringe of my expertise but hopefully this will be
of some help.

Brian
Mar 5 '07 #6
IMHO you haven't followed instructions. You must use an executable to
register the COM object in the ROT, and the executable must outlive the
registration period. A DLL is not an executable.

Unfortunately, I know nothing about SNMP extensions, but I reckon the AppID
must be the name of the SNMP service.

This is admittedly on the fringe of my expertise but hopefully this will be
of some help.

Brian
"Nadav" <Na***@discussions.microsoft.comwrote in message
news:11**********************************@microsof t.com...
Hi Brian,

Thanks for your response, I have added the following:
HKCR
{
...
...
NoRemove AppID
{
ForceRemove 'ROTTester.DLL'
{
val AppId = s '%APPID%'
}
ForceRemove '%APPID%'
{
val RunAs = s 'Interactive User'
}
}
}

Unfortunetly, it didn't help I still get 0x80004015

Additional background:
1. I am writing an SNMP Extension Agent
2. The extension agent expose SNMP API and enclose a CAtlDllModule
3. During SNMP initialization ( SnmpExtensionInit ) I create the COM
object
( implemented by the DLL ) and try to register it in ROT using
ROTFLAGS_ALLOWANYCLIENT, this returns 0x80004015

Taking the above in mind giving special attention to the fact that my DLL
is
registered as a SnmpExtension DLL and is loaded by snmp.exe, is it somehow
possible to have an inproc COM object registered in ROT with
ROTFLAGS_ALLOWANYCLIENT ?

Any help would be appreciated

--
Nadav
http://www.sophin.com
"Brian Muth" wrote:
>Read the documentation carefully:

http://msdn2.microsoft.com/en-us/library/ms680747.aspx

In particular:

"A server registered as either LocalService or RunAs can set the
ROTFLAGS_ALLOWANYCLIENT flag in its call to Register to allow any client
to
connect to it. A server setting this bit must have its executable name in
the AppID section of the registry that refers to the AppID for the
executable."

HTH,

Brian

By the way, please don't multipost like this. It is considered bad
netiquette. You should be crossposting instead.
"Nadav" <Na***@discussions.microsoft.comwrote in message
news:85**********************************@microso ft.com...
Hi Willy,

Thanks for your immediate response, I have tried to use
ROTFLAGS_ALLOWANYCLIENT, this results: 0x80004015 The class is
configured
to
run as a security id different from the caller

Some background:
My "server" is an AtlComModule DLL loaded by snmp.exe on the entry
point
(
SnmpExtensionInit ) a specialized thread is created, this thread
instentiate
the COM object and register it on the ROT, when using
ROTFLAGS_ALLOWANYCLIENT
I get the error described above.

How can I resolve this problem ( 0x80004015 )how can I configure the
class
security id? is there any COM specific configuration I should do ?

SnmpExtensionInit

>
--
Nadav
http://www.sophin.com
"Willy Denoyette [MVP]" wrote:

"Nadav" <Na***@discussions.microsoft.comwrote in message
news:27**********************************@microso ft.com...
Hi,

I am using COM with RunningObjectTable, take in mind the following
points:

1. I have a server that runs as a service this service register an
object in
ROT, the object should be accesible to usermode applications
2. I have a user mode application trying to get the interface
pointer
to the
objsect registered by thye service in ROT

spROT->GetObjectW failes with 0x800401e3 on the user mode
application

when running my server as an application ( and not as a service )
the
interface is retrieved successfully.

Enumerating all the ROT objects by the app didn't show the object
registered
by the service.

It seems as if there is a different context per desktop ( such as
with
named
kernel objects ), is there any special namespace I cane use ( such
as
'Global' ) that will enable a non service app to resolve objects
registered
by a service?

Why does this happen? Why objects registered in ROT by a service are
not
accessible to non service applications?

Any help would be appreciated.

--
Nadav
http://www.sophin.com

Have you register the object with the ROTFLAGS_ALLOWANYCLIENT flag
set?

Willy.




Mar 5 '07 #7
Hi Brian,

Thanks for your help, unfortunetly, my application must be implemneted as a
DLL and not as EXEcutable, creating an AppId ( that reference the COM DLL )
for snmp.exe doesn't help...

--
Nadav
http://www.sophin.com
"Brian Muth" wrote:
IMHO you haven't followed instructions. You must use an executable to
register the COM object in the ROT, and the executable must outlive the
registration period. A DLL is not an executable.

Unfortunately, I know nothing about SNMP extensions, but I reckon the AppID
must be the name of the SNMP service.

This is admittedly on the fringe of my expertise but hopefully this will be
of some help.

Brian
"Nadav" <Na***@discussions.microsoft.comwrote in message
news:11**********************************@microsof t.com...
Hi Brian,

Thanks for your response, I have added the following:
HKCR
{
...
...
NoRemove AppID
{
ForceRemove 'ROTTester.DLL'
{
val AppId = s '%APPID%'
}
ForceRemove '%APPID%'
{
val RunAs = s 'Interactive User'
}
}
}

Unfortunetly, it didn't help I still get 0x80004015

Additional background:
1. I am writing an SNMP Extension Agent
2. The extension agent expose SNMP API and enclose a CAtlDllModule
3. During SNMP initialization ( SnmpExtensionInit ) I create the COM
object
( implemented by the DLL ) and try to register it in ROT using
ROTFLAGS_ALLOWANYCLIENT, this returns 0x80004015

Taking the above in mind giving special attention to the fact that my DLL
is
registered as a SnmpExtension DLL and is loaded by snmp.exe, is it somehow
possible to have an inproc COM object registered in ROT with
ROTFLAGS_ALLOWANYCLIENT ?

Any help would be appreciated

--
Nadav
http://www.sophin.com
"Brian Muth" wrote:
Read the documentation carefully:

http://msdn2.microsoft.com/en-us/library/ms680747.aspx

In particular:

"A server registered as either LocalService or RunAs can set the
ROTFLAGS_ALLOWANYCLIENT flag in its call to Register to allow any client
to
connect to it. A server setting this bit must have its executable name in
the AppID section of the registry that refers to the AppID for the
executable."

HTH,

Brian

By the way, please don't multipost like this. It is considered bad
netiquette. You should be crossposting instead.
"Nadav" <Na***@discussions.microsoft.comwrote in message
news:85**********************************@microsof t.com...
Hi Willy,

Thanks for your immediate response, I have tried to use
ROTFLAGS_ALLOWANYCLIENT, this results: 0x80004015 The class is
configured
to
run as a security id different from the caller

Some background:
My "server" is an AtlComModule DLL loaded by snmp.exe on the entry
point
(
SnmpExtensionInit ) a specialized thread is created, this thread
instentiate
the COM object and register it on the ROT, when using
ROTFLAGS_ALLOWANYCLIENT
I get the error described above.

How can I resolve this problem ( 0x80004015 )how can I configure the
class
security id? is there any COM specific configuration I should do ?

SnmpExtensionInit

--
Nadav
http://www.sophin.com
"Willy Denoyette [MVP]" wrote:

"Nadav" <Na***@discussions.microsoft.comwrote in message
news:27**********************************@microsof t.com...
Hi,

I am using COM with RunningObjectTable, take in mind the following
points:

1. I have a server that runs as a service this service register an
object in
ROT, the object should be accesible to usermode applications
2. I have a user mode application trying to get the interface
pointer
to the
objsect registered by thye service in ROT

spROT->GetObjectW failes with 0x800401e3 on the user mode
application

when running my server as an application ( and not as a service )
the
interface is retrieved successfully.

Enumerating all the ROT objects by the app didn't show the object
registered
by the service.

It seems as if there is a different context per desktop ( such as
with
named
kernel objects ), is there any special namespace I cane use ( such
as
'Global' ) that will enable a non service app to resolve objects
registered
by a service?

Why does this happen? Why objects registered in ROT by a service are
not
accessible to non service applications?

Any help would be appreciated.

--
Nadav
http://www.sophin.com

Have you register the object with the ROTFLAGS_ALLOWANYCLIENT flag
set?

Willy.




Mar 6 '07 #8
Time to explore alternatives. What about splitting your code
into a COM service and your original SNMP extension DLL
talking to it?

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

"Nadav" <Na***@discussions.microsoft.comwrote in message
news:6A**********************************@microsof t.com...
Hi Brian,

Thanks for your help, unfortunetly, my application must be implemneted as
a
DLL and not as EXEcutable, creating an AppId ( that reference the COM
DLL )
for snmp.exe doesn't help...

--
Nadav
http://www.sophin.com
"Brian Muth" wrote:
>IMHO you haven't followed instructions. You must use an executable to
register the COM object in the ROT, and the executable must outlive the
registration period. A DLL is not an executable.

Unfortunately, I know nothing about SNMP extensions, but I reckon the
AppID
must be the name of the SNMP service.

This is admittedly on the fringe of my expertise but hopefully this will
be
of some help.

Brian
"Nadav" <Na***@discussions.microsoft.comwrote in message
news:11**********************************@microso ft.com...
Hi Brian,

Thanks for your response, I have added the following:
HKCR
{
...
...
NoRemove AppID
{
ForceRemove 'ROTTester.DLL'
{
val AppId = s '%APPID%'
}
ForceRemove '%APPID%'
{
val RunAs = s 'Interactive User'
}
}
}

Unfortunetly, it didn't help I still get 0x80004015

Additional background:
1. I am writing an SNMP Extension Agent
2. The extension agent expose SNMP API and enclose a CAtlDllModule
3. During SNMP initialization ( SnmpExtensionInit ) I create the COM
object
( implemented by the DLL ) and try to register it in ROT using
ROTFLAGS_ALLOWANYCLIENT, this returns 0x80004015

Taking the above in mind giving special attention to the fact that my
DLL
is
registered as a SnmpExtension DLL and is loaded by snmp.exe, is it
somehow
possible to have an inproc COM object registered in ROT with
ROTFLAGS_ALLOWANYCLIENT ?

Any help would be appreciated

--
Nadav
http://www.sophin.com
"Brian Muth" wrote:

Read the documentation carefully:

http://msdn2.microsoft.com/en-us/library/ms680747.aspx

In particular:

"A server registered as either LocalService or RunAs can set the
ROTFLAGS_ALLOWANYCLIENT flag in its call to Register to allow any
client
to
connect to it. A server setting this bit must have its executable name
in
the AppID section of the registry that refers to the AppID for the
executable."

HTH,

Brian

By the way, please don't multipost like this. It is considered bad
netiquette. You should be crossposting instead.
"Nadav" <Na***@discussions.microsoft.comwrote in message
news:85**********************************@microso ft.com...
Hi Willy,

Thanks for your immediate response, I have tried to use
ROTFLAGS_ALLOWANYCLIENT, this results: 0x80004015 The class is
configured
to
run as a security id different from the caller

Some background:
My "server" is an AtlComModule DLL loaded by snmp.exe on the entry
point
(
SnmpExtensionInit ) a specialized thread is created, this thread
instentiate
the COM object and register it on the ROT, when using
ROTFLAGS_ALLOWANYCLIENT
I get the error described above.

How can I resolve this problem ( 0x80004015 )how can I configure the
class
security id? is there any COM specific configuration I should do ?

SnmpExtensionInit

--
Nadav
http://www.sophin.com
"Willy Denoyette [MVP]" wrote:

"Nadav" <Na***@discussions.microsoft.comwrote in message
news:27**********************************@microso ft.com...
Hi,

I am using COM with RunningObjectTable, take in mind the
following
points:

1. I have a server that runs as a service this service register
an
object in
ROT, the object should be accesible to usermode applications
2. I have a user mode application trying to get the interface
pointer
to the
objsect registered by thye service in ROT

spROT->GetObjectW failes with 0x800401e3 on the user mode
application

when running my server as an application ( and not as a service )
the
interface is retrieved successfully.

Enumerating all the ROT objects by the app didn't show the object
registered
by the service.

It seems as if there is a different context per desktop ( such as
with
named
kernel objects ), is there any special namespace I cane use (
such
as
'Global' ) that will enable a non service app to resolve objects
registered
by a service?

Why does this happen? Why objects registered in ROT by a service
are
not
accessible to non service applications?

Any help would be appreciated.

--
Nadav
http://www.sophin.com

Have you register the object with the ROTFLAGS_ALLOWANYCLIENT flag
set?

Willy.





Mar 6 '07 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Bruce Davis | last post: by
11 posts views Thread by Kostatus | last post: by
9 posts views Thread by Sudesh Sawant | last post: by
117 posts views Thread by Peter Olcott | last post: by
28 posts views Thread by Jon Davis | last post: by
6 posts views Thread by Ammar | last post: by
2 posts views Thread by Mike Collins | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by haryvincent176 | last post: by
reply views Thread by Marylou17 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.