where can I find CWinApp file in a regular dll (not extension) wizard created project

Hi.

I created a dll using the regular (not extension) dll wizard in vc++ 6.0.

I was wondering where I can find this CWinApp file so I can put initialization
code and exit code in it?

I don't see it in the file view and of course I am not very experienced with
this ide.

thanks for probably the obvious.

Jeff Kish
0
jeff.kish (10)
5/2/2007 9:03:19 PM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
524 Views

Similar Articles

[PageSpeed] 42

If it is not an MFC DLL, it probably doesn't have a CWinApp class.  Find In Files is a
useful tool to know about.   Look for DllMain.  See what it does on entry.  If it doesn't
call InitInstance, then you don't have a CWinApp class.
						joe

On Wed, 02 May 2007 17:03:19 -0400, Jeff Kish <jeff.kish@mro.com> wrote:

>Hi.
>
>I created a dll using the regular (not extension) dll wizard in vc++ 6.0.
>
>I was wondering where I can find this CWinApp file so I can put initialization
>code and exit code in it?
>
>I don't see it in the file view and of course I am not very experienced with
>this ide.
>
>thanks for probably the obvious.
>
>Jeff Kish
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
5/3/2007 2:59:14 AM
On Wed, 02 May 2007 22:59:14 -0400, Joseph M. Newcomer <newcomer@flounder.com>
wrote:

Thanks Joe.
I created it using the DLL Wizard and had selected the mfc shared dll option.
I discovered later I could not add a dllmain  because of a duplicate symbol.
I assumed after troubleshooting and researching that it was because the
dllmain was in the CWinApp module, however I don't see it.
So I'm trying to figure out why I see the file that has the dllmain in it.
If I'm wrong then I'm trying to figure out why I can't add a dllmain to my
project.

If I put a dllmain in, I get this:
Linking...
Searching Libraries
    Searching ..\..\MSsnbddm.lib:
    Searching C:\Program Files\Microsoft Visual
Studio\VC98\MFC\LIB\mfc42d.lib:
    Searching C:\Program Files\Microsoft Visual
Studio\VC98\MFC\LIB\mfcs42d.lib:
mfcs42d.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in
navRaster01.obj

(navRaster01.obj is my own object/cpp file)

Am I ignoring your answer or is there some other solution here I need to
understand?
Thanks
Jeff

>If it is not an MFC DLL, it probably doesn't have a CWinApp class.  Find In Files is a
>useful tool to know about.   Look for DllMain.  See what it does on entry.  If it doesn't
>call InitInstance, then you don't have a CWinApp class.
>						joe
>
>On Wed, 02 May 2007 17:03:19 -0400, Jeff Kish <jeff.kish@mro.com> wrote:
>
>>Hi.
>>
>>I created a dll using the regular (not extension) dll wizard in vc++ 6.0.
>>
>>I was wondering where I can find this CWinApp file so I can put initialization
>>code and exit code in it?
>>
>>I don't see it in the file view and of course I am not very experienced with
>>this ide.
>>
>>thanks for probably the obvious.
>>
>>Jeff Kish
>Joseph M. Newcomer [MVP]
>email: newcomer@flounder.com
>Web: http://www.flounder.com
>MVP Tips: http://www.flounder.com/mvp_tips.htm
Jeff Kish
0
jeff.kish (10)
5/4/2007 1:47:29 PM
No, that's a different question.  An MFC DLL created this way no more has a DllMain than
an MFC application has a WinMain.  Both are handled by the MFC framework, and you don't
see them.  If you wanted to do anything in DllMain, you would do it in the InitInstance
and ExitInstance handlers of your CWinApp class.  Otherwise, you will get a duplicate
symbol error, just as if you had tried to add a WinMain to an MFC application.
							joe

On Fri, 04 May 2007 09:47:29 -0400, Jeff Kish <jeff.kish@mro.com> wrote:

>On Wed, 02 May 2007 22:59:14 -0400, Joseph M. Newcomer <newcomer@flounder.com>
>wrote:
>
>Thanks Joe.
>I created it using the DLL Wizard and had selected the mfc shared dll option.
>I discovered later I could not add a dllmain  because of a duplicate symbol.
>I assumed after troubleshooting and researching that it was because the
>dllmain was in the CWinApp module, however I don't see it.
>So I'm trying to figure out why I see the file that has the dllmain in it.
>If I'm wrong then I'm trying to figure out why I can't add a dllmain to my
>project.
>
>If I put a dllmain in, I get this:
>Linking...
>Searching Libraries
>    Searching ..\..\MSsnbddm.lib:
>    Searching C:\Program Files\Microsoft Visual
>Studio\VC98\MFC\LIB\mfc42d.lib:
>    Searching C:\Program Files\Microsoft Visual
>Studio\VC98\MFC\LIB\mfcs42d.lib:
>mfcs42d.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in
>navRaster01.obj
>
>(navRaster01.obj is my own object/cpp file)
>
>Am I ignoring your answer or is there some other solution here I need to
>understand?
>Thanks
>Jeff
>
>>If it is not an MFC DLL, it probably doesn't have a CWinApp class.  Find In Files is a
>>useful tool to know about.   Look for DllMain.  See what it does on entry.  If it doesn't
>>call InitInstance, then you don't have a CWinApp class.
>>						joe
>>
>>On Wed, 02 May 2007 17:03:19 -0400, Jeff Kish <jeff.kish@mro.com> wrote:
>>
>>>Hi.
>>>
>>>I created a dll using the regular (not extension) dll wizard in vc++ 6.0.
>>>
>>>I was wondering where I can find this CWinApp file so I can put initialization
>>>code and exit code in it?
>>>
>>>I don't see it in the file view and of course I am not very experienced with
>>>this ide.
>>>
>>>thanks for probably the obvious.
>>>
>>>Jeff Kish
>>Joseph M. Newcomer [MVP]
>>email: newcomer@flounder.com
>>Web: http://www.flounder.com
>>MVP Tips: http://www.flounder.com/mvp_tips.htm
>Jeff Kish
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
5/5/2007 3:23:19 PM
Reply:

Similar Artilces:

Exchange 2003 new install can not receive external email.
I have just setup a new Windows Server 2003 standard edition with Exchange 2003 standard edition on it. I have been working for a while trying to get it to receive external email. I can send out and send/ receive internal messages, but when someone trys to send me a message from outside our network they get the following returned mail message This Message was undeliverable due to the following reason: Each of the following recipients was rejected by a remote mail server. The reasons given by the server are included to help you determine why each recipient was rejected. Recipient: <**...

MS Money 95 data files
I hope that some one can answer this for me. I have used MS Money 95 for years, and it works just fine for me on Windows XP, however, I now have to reformat my hard drive, and have discovered that I can nolonger find my original install disk. Will the latest versions of Money still read the MS Money 95 data files. All that I have ever used the program for is to track my investments, and am unlikely to do any different in the future. Thanks Stan B In microsoft.public.money, Stan Banner wrote: >I hope that some one can answer this for me. >I have used MS Money 95 for years, and...

Can I send a recurring e-mail automatically each week
I want to send a e-mail with the same verbiage to the same person once a week and make it a recurrence with no end date. Can I set this up once in Outlook so it is scheduled automatically? -- Microsoft Office 2003 Version Students and Teachers Edition Windows Vista Home Premium Thank-you Happy new Year!! Carl R ...

Trying to find out which numbers occure most often
I�m giving exams to students and want to see if the students are missin the same questions in every class. I have a simple spreadsheet tha has me enter the question number into the column each time a questio is missed. The MODE function can tell me which number is occurrin most often. However, I need to see if there is any other numbers tha are occurring often as well. Is there a command that will allow me to look at the second mos entered number? For example, if I have 5,3,3,2,3,4,3,4,1,3,4, my mod would be 3 as that�s the number that repeats the most. However, happens 3 times and that...

copy my vb project... is it as easy as copying the directory..
Hi, I want to take a copy of a project so I have two projects the same.. the idea is i can play around with one, and not effect the original.. is it as easy as just using file explorer to copy the directory from say c:\project1 to c:\project2... or do the project files like forms etc have paths in them and therefore I can't just copy like this.. thanks "AussieRules" <nospam@nospam.com> wrote in message news:uzrSvxp6KHA.5112@TK2MSFTNGP02.phx.gbl... > Hi, > > I want to take a copy of a project so I have two projects the same.. the > i...

Create a distribution list from addresses in the 'To' list
Hi all, I belong to a social group, and our co-ordinator sends out an email from time to time with all the latest addresses in the To list. I already have a distribution list for the group, which then needs to be checked through and updated. Is there a simple way of transferring those addresses into my own distribution list? I'm using Outlook 2002. Everybody's fiddling around with bits of paper - I'll be a hero if I can make it easy for them! Thanks. Astley http://www.outlook-tips.net/archives/2004/20041105.htm -- Russ Valentine [MVP-Outlook] "Astley" <ast@...

Creating new attributes
When using Schema Manager to create new attributes, I'm not able to create a new attribute with "Lookup" as type, "Lookup" is not availabe as one of the type options. But yet some of the exist fields, for example, in Account table came with "Lookup" as type. Why? Is there a work-around? Please help. Thanks. You cannot add custom lookup's to the current release of MSCRM. The only way around is to build a custom .aspx page and build your own. Might be possible in the next release. "HEC" wrote: > When using Schema Manager to crea...

adding name /creating field/query?
Hello, I can create an invoice_number field in a query using the primary field ID from the main table as invoice_number: ID but if ID say is 100, I cannot work out how to create renewal_invoice_100 Cheers Geoff Geoff We aren't there. We can't see what you're looking at. Where did "renewal_invoice_100" come from and what does it mean? Please post the SQL statement of the query you are trying to use. -- Regards Jeff Boyce www.InformationFutures.net Microsoft Office/Access MVP http://mvp.support.microsoft.com/ Microsoft IT Academy Program Mentor http://micro...

Find prev record on other requeried form
Using access 2003. I have a main form for name and address info. A subform shows limited info on client placement. Click a command button on the main form and user opens another form for full screen entry of placement data. That form opens showing the client selected on the initial main form. When the full screen placement form closes, it requeries the original main form with the placement subform to show the added placement. It goes to the first record in the table though. It does not show the original client whose placement was just added. How do I set the mai...

Drag and Drop file/directory names on Tree Control.
hi, I am writing an application in which i have one Tree control. Now i want that , when user drag & drop any file/folder on tree control the file name/folder name should be add in the tree control item. User may drag and drop file from desktop or may be from directory. I just want the path of that file/foder name nothing else. so plz tell me will it be possible ... Plz Help me............. Klic..... > I am writing an application in which i have one Tree control. >Now i want that , when user drag & drop any file/folder on tree >control the file nam...

How can I change 'Normal' Style for Word e-mails to 'Normal (Web)'?
Hi, I'm using Word as my e-mail editor in Outlook 2003 and want to change the default Style for e-mails from 'Normal' to 'Normal (Web)'. The problem is that new e-mails and replies in HTML format use the 'Normal' Microsoft Word 'Style', and this has no gap after paragraphs. The upshot of this is that when sending an e-mail, I have to press return twice to create a gap, but when the recipient views this, their software shows it as four gaps (the extra carriage return I typed + their correctly viewed HTML carriage return after each line). E.g. I type this: ...

can't customize toolbar
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel all i see is document elements, quick tables, charts and smartart graphics. i do not see the main menu or the toolbar button. when i attempt to customize the toolbar, the to menu bar and format bar do not appear where they should. on a website i visited, they advised that i drag and drop the temporary toolbar into the real toolbar. but i can't drag and drop the toolbar. i can only move the temporary toolbar. how do i add the menu bar and format bar for go? You may have hidden the toolbar by accident. Click on the ti...

How do I create several NEW templates from start to finish please?
Hi knowledgeable people. I am looking for instructions on how to create a range of basic templates that I can use, perhaps even by selecting them as 'stationery', for example; if I go to >New >Format >Apply stationery, or any other similar method. I can create new html stationery backgrounds, but this is NOT what I am looking for, as a lot of people still read email in plain text only...does this make sense? Plain text templates would be fine. I simply can't find any info on creating email templates anywhere to suit this Windows Live Mail Desktop versio...

Where is the workspace file stored?
I was given a project folder containing several dozen files. So where is the workspace file normally located? If I don't have a workspace file how can I cerate one? Using VC version 6. TIA I haven't used VC6 for some time, but if I remember right you can just open the .dsp file and it will create a .dsw file for you. It typically goes in the same folder with the code. Tom "Phisherman" <noone@nobody.com> wrote in message news:be93539ccf8a6f25ibh4vt6ggmtbi024mq@4ax.com... >I was given a project folder containing several dozen files. So where > is the wor...

Change File Locations to Private Drive (not Folder)
Hi, I know that I can use "File Locations" in "Options" so that whenever I use the "Open..." command in Word, it will open to a specific folder. I'm wondering if there is a way that this can be applied not to a folder but to a specific drive on a network. Our company has a main public drive and has also assigned each of the Staff their own private drive. Is there a way to access the "main page" (for lack of a better term) of my private drive each time I use "Open..." in Word? Right now it goes to "My Computer" or ...

cant start outlook pst file to large
Hi I hope somebody may be able to help im new to outlook and now I cant start outlook message says cannot open your default email folders pst file its too large as I cannot open outlook I cannot delete old folders See if this helps: http://support.microsoft.com/kb/296088 -- -Ben- Ben M. Schorr, MVP Roland Schorr & Tower http://www.rolandschorr.com http://www.officeforlawyers.com/outlook.html Author: The Lawyer's Guide to Microsoft Outlook 2007: http://tinyurl.com/ol4law-amazon "Ray" <Ray@discussions.microsoft.com> wrote in message news:B3B824DC-3C9B-4B1B-8EF3-61...

Unexpected error message on closing an Excel file
Suddenly I am getting the following message when I try to close a workbook: "Your formula contains an invalid external reference to a worksheet. Verify that the path, workbook, and range name or cell reference are correct, and try again" The mysterious thing is that it does not happen consistently and that, after I click OK after the above message, I can still save the file. What might be the cause of this error message and can the "invalid reference" be tracked down using one of the utility add-ins such as J. Walkenbach's PUP? If it only happens when you close ...

[b]Can I download Excel data to a MS Access database?[/b]
I've built an Excel 2002 form that I want our internal customers to access from our intranet, and use. Once completed, they will send it to us as an e-mail attachment. I'd like to be able to open it, and somehow download the data from the form into an MS Access 2002 database I've built (so that we don't have to rekey it into the database). Is this possible or even feasible? Any and all help is appreciated. Thanks. :D --------- Message sent via www.excelforums.com Hi in Access check 'File - Import External data' -- Regards Frank Kabel Frankfurt, Germany "...

Reverse created rules
I inadvertantly created a rule to automatically send emails from an email address directly into the deleted files. How do I reverse or delete the rule for this sender??????? If this is Outlook then select the Tools Menu > Rules Wizard > locate the Rule and delete it, if its Outlook Express then go to Tools > Message Rules "joebzii@everestkc.net" <anonymous@discussions.microsoft.com> wrote in message news:1c12401c4218b$fa8e7f70$a401280a@phx.gbl... > I inadvertantly created a rule to automatically send > emails from an email address directly into the deleted &...

Trying to read XML file into dataset
Hello. Developing a web site in VS2005, SP1, VB, .NET 2.0, ASP.NET 2.0 on XP Pro, SP2. I eventually want to use a gridview table to view xml data, but right now i can't seem to get my xml data into a dataset so that i can use it. I have an XML file and can open it in IE. There is no XSD or XSL file to go with it. I can't seem to get the XML data into a dataset. I tried using the following code, but it just does nothing. It doesn't give an error. It just executes the code and does nothing. Dim dataSet As DataSet = New DataSet dataSet.ReadXml("...

Can I make messages unable to be forwarded by the receiver?
We are interested in setting up a private email group at work that receives semi-confidential information. Is there a way to make the emails that these users will receive unable to be forwarded to people outside of the group? Make private, or somehow else prevent the information from getting outside of the approved recipient list? no. and you can't keep people from printing it, copying and pasting the contents of it, taking a screen shot of it, etc, etc... "Jonna Kosalko" wrote: > We are interested in setting up a private email group at work that receives ...

Can anyone help ?
I have created a holiday planner for staff with in are company and i need a formula that gives us only 10% of the total number of staff are off on holiday. would be greatful if anyone could help. Hello - If you have a total somewhere (I would suggest inserting a column on your spreadsheet titled Total and then entering a "1" if the person is going to be out, then total the column of "1"s by entering "=SUM(x:y)" where x=first cell in the range, and y=last cell in the range), in a different cell, enter "=.1*z" where z equals the total of people out...

opening .bak file
Hi, I hope someone can help! I recently was performing a compacting operation on my outlook express folders. My computer shutdown due to a power failure and I lost some emails from a few of my folders. I was however able to get the .bak files (of the .dbx files that were lost) out of the recycle bin. If I could open one of these .bak files or convert it back to the .dbx file from which it was created I would retrieve these emails. Can anyone instruct me as to open this .bak file? Thanks for any help! Arnie K. How did you get the bak files out of the Recycle Bin? All e...

Can you only merge up to a certain number of cells
I am working on microsoft excel 2003, I have a sheet that I merged cells starting with line 8 through 43...when I type my information in the merged area I can see all that I am typing...say it goes up to line 30 once I hit the enter key I can only see up to line 20. Even when I print it out it only prints up to line 20...I have checked to make sure there are not locked cells etc. I cannot figure out at all why this is happening...is there only up to a certain number of cells you can merge? From "Excel Specifications and Limits" Length of cell contents (text) ...

Can't view messages with Autopreview
My current view is set to preview all items, however, my mail is not displayed in autopreview ...