Click here to Skip to main content
15,898,993 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: Dialog DoModal fails in win2000 Pin
gaara242-Oct-08 0:08
gaara242-Oct-08 0:08 
GeneralRe: Dialog DoModal fails in win2000 Pin
Stuart Dootson2-Oct-08 7:16
professionalStuart Dootson2-Oct-08 7:16 
QuestionTask Scheduler Pin
brucewayn1-Oct-08 0:11
brucewayn1-Oct-08 0:11 
AnswerRe: Task Scheduler Pin
Stuart Dootson1-Oct-08 7:36
professionalStuart Dootson1-Oct-08 7:36 
QuestionQuestions re. ATL service (EXE) plus ATL simple object Pin
markiemooster30-Sep-08 3:22
markiemooster30-Sep-08 3:22 
AnswerRe: Questions re. ATL service (EXE) plus ATL simple object Pin
led mike30-Sep-08 5:13
led mike30-Sep-08 5:13 
GeneralRe: Questions re. ATL service (EXE) plus ATL simple object Pin
markiemooster30-Sep-08 6:50
markiemooster30-Sep-08 6:50 
AnswerRe: Questions re. ATL service (EXE) plus ATL simple object Pin
Roger Stoltz6-Oct-08 4:51
Roger Stoltz6-Oct-08 4:51 
markiemooster wrote:
1. I assume I can use the _AtlModule global variable to achieve this. Is it safe to call _AtlModule methods from the ATL simple object, e.g. _AtlModule.MyMethod(x)?

2. I plan to write some ASP server side script and use Server.CreateObject("xxxx.yyyyy") to access the service using the ATL simple object I created. (a) Will this be possible? (b) Are there any special permissions that will need to be set in IIS or anywhere else (I'm using Windows Server 2003)?

3. Does the service need to be running for such a call to succeed or will it be started?



1. Depends on what you mean by "safe"...
Your service may be accessed from different applications which means that you have to make it thread safe.

2(a). I suppose that you are limited to automation compatible interfaces when using scripting languages, but that's fine.

2(b). I don't think so, but that may depend more on what you're trying to do from your service than the fact that you're exposing COM objects from it. You also have to call ::CoInitializeSecurity() in your wizard generated class derived from CAtlServiceModuleT. At least
CoInitializeSecurity( NULL, -1, NULL, NULL, RPC_C_AUTHN_LEVEL_NONE, 
                      RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE, NULL ); 


3. No, the service doesn't have to be started, but it must be installed as a service. The service is started when the client tries to create an instance of an object that the service exposes.


"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"High speed never compensates for wrong direction!" - unknown


Questioninclude file for a COM client (consumer) Pin
George_George25-Sep-08 23:59
George_George25-Sep-08 23:59 
AnswerRe: include file for a COM client (consumer) Pin
Stuart Dootson27-Sep-08 4:35
professionalStuart Dootson27-Sep-08 4:35 
GeneralRe: include file for a COM client (consumer) Pin
George_George27-Sep-08 18:56
George_George27-Sep-08 18:56 
GeneralRe: include file for a COM client (consumer) Pin
Stuart Dootson28-Sep-08 3:44
professionalStuart Dootson28-Sep-08 3:44 
GeneralRe: include file for a COM client (consumer) Pin
George_George28-Sep-08 3:53
George_George28-Sep-08 3:53 
GeneralRe: include file for a COM client (consumer) Pin
Stuart Dootson28-Sep-08 6:40
professionalStuart Dootson28-Sep-08 6:40 
GeneralRe: include file for a COM client (consumer) Pin
George_George30-Sep-08 1:13
George_George30-Sep-08 1:13 
GeneralRe: include file for a COM client (consumer) Pin
Stuart Dootson30-Sep-08 10:10
professionalStuart Dootson30-Sep-08 10:10 
GeneralRe: include file for a COM client (consumer) Pin
George_George30-Sep-08 22:33
George_George30-Sep-08 22:33 
QuestionPass Events from ATL control to javascript Pin
chatko25-Sep-08 17:46
chatko25-Sep-08 17:46 
AnswerRe: Pass Events from ATL control to javascript Pin
chatko29-Sep-08 4:05
chatko29-Sep-08 4:05 
QuestionSample application for connecting to Sql server database in ATL Pin
V K 224-Sep-08 23:23
V K 224-Sep-08 23:23 
AnswerRe: Sample application for connecting to Sql server database in ATL Pin
Stuart Dootson25-Sep-08 0:28
professionalStuart Dootson25-Sep-08 0:28 
QuestionActiveX: still active after close IExplorer Pin
fzhsheng24-Sep-08 21:26
fzhsheng24-Sep-08 21:26 
QuestionIssues when pop up a dialog in IE Pin
Robert Wang198324-Sep-08 3:33
Robert Wang198324-Sep-08 3:33 
QuestionHow can i show the string correctly? Pin
hdj831123-Sep-08 22:44
hdj831123-Sep-08 22:44 
AnswerRe: How can i show the string correctly? Pin
Steve Echols24-Sep-08 18:53
Steve Echols24-Sep-08 18:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.