need help: accessing Assembly by Application class gets empty strings

  • Thread starter Thread starter alasinski
  • Start date Start date
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;
}
 
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.
 
Back
Top