need help: accessing Assembly by Application class gets empty strings

A

alasinski

Can someone help me why the following code based on .Net examples doesn't
work on my .net 2003 ? It seems to me that all Application properties that
are set in AssemplyInfo.cpp file build up by project wizard doesn't get
through to Application object.

one example is in
http://msdn.microsoft.com/library/d...mwindowsformscontrolclassproductnametopic.asp


#include "stdafx.h"
#include <windows.h>

using namespace System::Reflection;
using namespace System::Runtime::CompilerServices;

[assembly:AssemblyCompanyAttribute("AppTestCompany")];

int APIENTRY _tWinMain
(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int
nCmdShow)
{
System::String* cpny =
System::Windows::Forms::Application::get_CompanyName();
// here debugging shows cpny = "" Why not "AppTestCompany" ????
return 0;
}
 
A

alasinski

Thanks, this is a great find. I was digging a whole day across MSDN and
nothing on the subject could be found. I felt cornered by the technology: on
one hand you could accomplish such a marvels, yet on another you stumble on
flat pavement.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top