Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Creating NT Service with ATL

Posted on 2001-08-15
9
Medium Priority
?
392 Views
Last Modified: 2013-11-25
I am attempting to create an NT Service using the ATL Object Wizard.

Even with the simplest of objects, I can create the object (i.e. CoCreateInstance works), but any attempt to call any method on the created objects results in a 'Permission Denied' message.

Anybody have any ideas about what might be going wrong?
0
Comment
Question by:jasonclarke
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
  • +1
9 Comments
 
LVL 4

Expert Comment

by:IainHere
ID: 6387591
Does the user account you're using have full control permission in the registry for the object?

http://www.winntmag.com/Articles/Index.cfm?ArticleID=5375
0
 
LVL 7

Expert Comment

by:jimwasson
ID: 6389951
What OS are you using (NT or Win2K)?  You probably already know but you need to have Administrator privileges on NT (at least) Power User on Win2K to access a Service.  Also, you have to grant both launch and access permission to the object.
0
 
LVL 9

Author Comment

by:jasonclarke
ID: 6391817
Sorry for the lack of response...

I am running Win2K,  I have local administrator priviliges on my machine, and I appear to be able to alter any permissions I need to.  
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 2

Expert Comment

by:VCStud
ID: 6391873
Hi,

You need to set permissions for all those people who will access the methods of your service. To do this follow the steps,

Type dcomcnfg in the 'Run' box. This will open dcom configuration. It lists the COM dll's and exe's. Select your service and click properties. In the 'Security' tab, select Custom 'access permissions' and 'launch permissions'. Using the edit button, add the people you want to give access to the service.

This would let you access the methods and you would not get the error message.

Cheers,
VCStud
0
 
LVL 9

Author Comment

by:jasonclarke
ID: 6391890
> This would let you access the methods
> and you would not get the error message.

I tried this, and it seems that no matter who or what I give access to (I gave access to Everyone), I still get Permission denied when attempting to call a method.

Also, as I said this problem occurs even with simple local activations.
0
 
LVL 7

Expert Comment

by:jimwasson
ID: 6392960
As to granting permissions, have you included "SYSTEM" as having both launch and access permission to your service?  On my project, we have to do that as well.
0
 
LVL 9

Author Comment

by:jasonclarke
ID: 6393102
It seems that the registry on my machine may actually be broken...Windows Installer and other things won't run correctly now...
0
 
LVL 4

Accepted Solution

by:
IainHere earned 400 total points
ID: 6393298
Hmm. <thinks>

Did you try going back to Unix?
0
 
LVL 9

Author Comment

by:jasonclarke
ID: 6470270
Sorry, I forgot to clear up this question.

Since, the question was really a 'non-question' - caused by a Windows disaster on my machine, I will give the points to the person who suggested what I would *like* to do.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question