HELP on ATL with VC7 - newbie please help... 
Author Message
 HELP on ATL with VC7 - newbie please help...

Hey all, two simple questions:
when I start new service project using ATL project in the wizard with ATL,
where can I add my code to the start, stop and so on routines? in VC 6 I
just click those, I don't know how to do that with 7... (sorry for the
stupid question, but it all new to me)

---

in this project (without neglecting Q1) I want to add an ATL object. in VC6,
I just do insert and then the object. here (VC7) I tried Add class and then
ATL simple object (the closest that I can imagine to VC6) but in VC7 I got a
message saying:"ATL classes can only be added to ATL, MFC EXE and MFC
regular DLL Project". now, this project IS an ATL project, isn't it?
I know that I am doing something wrong probably, but what? if this is the
wrong please to post these questions, I am apologies, please replay another
link if that is the case.

donny.



Thu, 10 Mar 2005 10:04:16 GMT  
 HELP on ATL with VC7 - newbie please help...
For your first problem, the issue here is that by default an ATL project in
VC7 uses Attributes. If you look at the code you will see:

// The module attribute causes DllMain, DllRegisterServer and
DllUnregisterServer to be automatically implemented for you

[ module(dll, uuid = "{D4405BB0-A990-43C9-8A88-2A517378B78A}",

name = "foo",

helpstring = "foo 1.0 Type Library",

resource_name = "IDR_FOO") ];

This is a attribute that will automatically implement your DllMain,
DllRegisterServer and DllUnregisterServer. You can always create these
manually (if you create an unattributed project, or look at the help topics
you will see what the stubs are for these entry points) and remove the
attributed code if you need customized entry points.

As for the adding of the simple object, we were able to do this
successfully, the only thing that we could think of is if you tried to add
the simple object to the myprojectPS (all the MIDL stuff) project instead of
the myproject project itself.

Thanks,

--

Mark Lacey [mlacey at microsoft dot com]

Visual C++ Team
This posting is provided "AS IS" with no warranties, and confers no rights.


Quote:
> Hey all, two simple questions:
> when I start new service project using ATL project in the wizard with ATL,
> where can I add my code to the start, stop and so on routines? in VC 6 I
> just click those, I don't know how to do that with 7... (sorry for the
> stupid question, but it all new to me)

> ---

> in this project (without neglecting Q1) I want to add an ATL object. in
VC6,
> I just do insert and then the object. here (VC7) I tried Add class and
then
> ATL simple object (the closest that I can imagine to VC6) but in VC7 I got
a
> message saying:"ATL classes can only be added to ATL, MFC EXE and MFC
> regular DLL Project". now, this project IS an ATL project, isn't it?
> I know that I am doing something wrong probably, but what? if this is the
> wrong please to post these questions, I am apologies, please replay
another
> link if that is the case.

> donny.



Sat, 12 Mar 2005 01:46:32 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Please help!!!!Please help!!!!Please help!!!!Please help!!!!Please help!!!!Please help!!!!Please help!!!!

2. Please help - ATL newbie

3. Please help!!!!Please help!!!!Please help!!!!

4. Help C newbie need help please

5. Help C newbie need help please

6. Please please help a newbie!!

7. Please please help a newbie!!

8. NEED HELP WITH PRITING AN ARRAY, PLEASE PLEASE HELP

9. PLEASE PLEASE HELP HELP...question on interleaving C functions

10. SOMEONE HELP ME, HELP ME, HELP ME PLEASE...

11. HELP HELP HELP ME PLEASE!!

12. newbie needs help with ADO and ATL

 

 
Powered by phpBB® Forum Software