Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Can only use one addtional form in VC++ .NET, when using native code + managed code.

Posted on 2004-11-12
Medium Priority
Last Modified: 2013-12-03
I have written a C++ .NET app that watches for a proxy authentication dialog from IE (or anything) and sends USERNAME|TAB|PASSWORD|ENTER using keybd_event.  I am experiencing an issue on this project that I experienced on my last project.  When I create a new .NET form and try to instantiate that class, I get 'undeclared'; only after I already have one other form in use.  But if I create a new .NET project and add two forms it works fine, calling both.  Could it be because of the use of managed code and native code in the same source?  This is only my third useful programming project ever, so this is all a learning experience for me.  

So, I'm trying to learn why this is a problem.

The particular error is happening with this:

Line 432 of Form1.h:
Confirm * confirm = new Confirm();
c:\...\Form1.h(432) : error C2065: 'Confirm' : undeclared identifier
c:\...\Form1.h(432) : error C2065: 'confirm' : undeclared identifier
c:\...\Form1.h(432) : error C2061: syntax error : identifier 'Confirm'

The entire solution can be downloaded at http://defenestrate.us/apa.zip

Thanks for the help,
Question by:nwgarner
  • 2
LVL 48

Expert Comment

ID: 12572563
APA::Confirm * confirm = new APA::Confirm();

This class belongs to another namespace.
LVL 48

Accepted Solution

AlexFM earned 500 total points
ID: 12572568
Or add line

using namespace APA;

to the beginning of the file (after namespace AutoProxyAuth).

Author Comment

ID: 12572605
Worked like a champ AlexFM, thanks for the help.


Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Introduction to Processes

580 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