Click here to Skip to main content
15,906,626 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
AnswerRe: Calling Windows.Form from MFC with /cli Pin
Mark Salsbery19-Sep-08 6:58
Mark Salsbery19-Sep-08 6:58 
GeneralRe: Calling Windows.Form from MFC with /cli Pin
ToSchi9819-Sep-08 8:58
ToSchi9819-Sep-08 8:58 
GeneralRe: Calling Windows.Form from MFC with /cli Pin
Mark Salsbery19-Sep-08 10:44
Mark Salsbery19-Sep-08 10:44 
GeneralRe: Calling Windows.Form from MFC with /cli Pin
ToSchi9822-Sep-08 3:18
ToSchi9822-Sep-08 3:18 
GeneralRe: Calling Windows.Form from MFC with /cli Pin
Mark Salsbery22-Sep-08 4:50
Mark Salsbery22-Sep-08 4:50 
GeneralRe: Calling Windows.Form from MFC with /cli [modified] Pin
ToSchi9824-Sep-08 3:27
ToSchi9824-Sep-08 3:27 
QuestionRe: Calling Windows.Form from MFC with /cli Pin
Mark Salsbery24-Sep-08 5:55
Mark Salsbery24-Sep-08 5:55 
GeneralRe: Calling Windows.Form from MFC with /cli Pin
Mark Salsbery24-Sep-08 6:21
Mark Salsbery24-Sep-08 6:21 
Try this:
CString CSpliceCheckerDlg::GetVersionInfo()
{
	CString csRet;
	TCHAR szAppName[MAX_PATH];
	TCHAR szSubBlockName[256];
	DWORD FVHandle;
	UINT nSize;
	BYTE *pData = 0;

	::GetModuleFileName(AfxGetResourceHandle(), szAppName, sizeof(szAppName) / sizeof(TCHAR));
	DWORD dwSize = ::GetFileVersionInfoSize(szAppName, &FVHandle);
	if (dwSize)
	{
		pData = new BYTE[dwSize];
		if (::GetFileVersionInfo(szAppName, FVHandle, dwSize, pData))
		{
			VS_FIXEDFILEINFO *pFixedFileInfo;

			_tcscpy_s(szSubBlockName,_T("\\"));

			if (::VerQueryValue(pData, szSubBlockName, (void **)&pFixedFileInfo, &nSize))
			{
				int i1 = (pFixedFileInfo->dwFileVersionMS >> 16) & 0xFFFF;
				int i2 = pFixedFileInfo->dwFileVersionMS & 0xFFFF;
				int i3 = (pFixedFileInfo->dwFileVersionLS >> 16) & 0xFFFF;
				int i4 = pFixedFileInfo->dwFileVersionLS & 0xFFFF;
				csRet.Format(_T("%d.%d.%d.%d"), i1, i2, i3, i4);
			}
		}
		delete[] pData;
	}

	return csRet;
}


Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: Calling Windows.Form from MFC with /cli Pin
ToSchi9824-Sep-08 20:56
ToSchi9824-Sep-08 20:56 
QuestionHow to create C# Control for any language Pin
Andy Rama17-Sep-08 23:16
Andy Rama17-Sep-08 23:16 
AnswerRe: How to create C# Control for any language Pin
Mark Salsbery18-Sep-08 4:14
Mark Salsbery18-Sep-08 4:14 
GeneralRe: How to create C# Control for any language Pin
Andy Rama18-Sep-08 21:18
Andy Rama18-Sep-08 21:18 
GeneralRe: How to create C# Control for any language Pin
Mark Salsbery19-Sep-08 5:41
Mark Salsbery19-Sep-08 5:41 
QuestionRe: How to create C# Control for any language Pin
Andy Rama22-Sep-08 20:04
Andy Rama22-Sep-08 20:04 
AnswerRe: How to create C# Control for any language Pin
Andy Rama22-Sep-08 23:32
Andy Rama22-Sep-08 23:32 
GeneralRe: How to create C# Control for any language Pin
Mark Salsbery23-Sep-08 5:22
Mark Salsbery23-Sep-08 5:22 
GeneralRe: How to create C# Control for any language Pin
Andy Rama23-Sep-08 19:22
Andy Rama23-Sep-08 19:22 
GeneralRe: How to create C# Control for any language Pin
Mark Salsbery24-Sep-08 4:45
Mark Salsbery24-Sep-08 4:45 
AnswerRe: How to create C# Control for any language Pin
Paul Conrad18-Sep-08 6:50
professionalPaul Conrad18-Sep-08 6:50 
QuestionRe: How to create C# Control for any language [modified] Pin
Andy Rama18-Sep-08 21:11
Andy Rama18-Sep-08 21:11 
AnswerRe: How to create C# Control for any language Pin
Paul Conrad19-Sep-08 4:02
professionalPaul Conrad19-Sep-08 4:02 
QuestionDll throws when loaded from a network path Pin
doug_ayers17-Sep-08 5:25
doug_ayers17-Sep-08 5:25 
AnswerRe: Dll throws when loaded from a network path Pin
Scott Dorman17-Sep-08 6:18
professionalScott Dorman17-Sep-08 6:18 
GeneralRe: Dll throws when loaded from a network path Pin
doug_ayers17-Sep-08 9:19
doug_ayers17-Sep-08 9:19 
GeneralRe: Dll throws when loaded from a network path Pin
Scott Dorman17-Sep-08 9:37
professionalScott Dorman17-Sep-08 9:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.