Browse files

Initial import

svn path=/trunk/wintools/; revision=59665
  • Loading branch information...
0 parents commit f19c21569e50f413c94fd4bd439eabc544681543 Francisco T. Martinez committed Apr 19, 2006
Showing with 13,192 additions and 0 deletions.
  1. +6 −0 GetNetSdkLocation/ChangeLog
  2. +277 −0 GetNetSdkLocation/GetNetSdkLocation.cpp
  3. +26 −0 GetNetSdkLocation/GetNetSdkLocation.h
  4. +103 −0 GetNetSdkLocation/GetNetSdkLocation.rc
  5. +21 −0 GetNetSdkLocation/GetNetSdkLocation.sln
  6. +170 −0 GetNetSdkLocation/GetNetSdkLocation.vcproj
  7. +235 −0 GetNetSdkLocation/MFConRegEditor.cpp
  8. +30 −0 GetNetSdkLocation/MFConRegEditor.h
  9. +32 −0 GetNetSdkLocation/README.txt
  10. +14 −0 GetNetSdkLocation/resource.h
  11. +8 −0 GetNetSdkLocation/stdafx.cpp
  12. +17 −0 GetNetSdkLocation/stdafx.h
  13. +1 −0 MonoLaunch/AUTHORS
  14. +7 −0 MonoLaunch/COPYING
  15. +6 −0 MonoLaunch/ChangeLog
  16. +3 −0 MonoLaunch/INSTALL
  17. +61 −0 MonoLaunch/MonoCtrl2/MainPropSheet.cpp
  18. +26 −0 MonoLaunch/MonoCtrl2/MainPropSheet.h
  19. +94 −0 MonoLaunch/MonoCtrl2/MonoCtrl2.cpp
  20. +35 −0 MonoLaunch/MonoCtrl2/MonoCtrl2.h
  21. +242 −0 MonoLaunch/MonoCtrl2/MonoCtrl2.rc
  22. +37 −0 MonoLaunch/MonoCtrl2/MonoCtrl2.sln
  23. +210 −0 MonoLaunch/MonoCtrl2/MonoCtrl2.vcproj
  24. +148 −0 MonoLaunch/MonoCtrl2/MonoCtrl2Dlg.cpp
  25. +31 −0 MonoLaunch/MonoCtrl2/MonoCtrl2Dlg.h
  26. +124 −0 MonoLaunch/MonoCtrl2/PropPage1.cpp
  27. +31 −0 MonoLaunch/MonoCtrl2/PropPage1.h
  28. +31 −0 MonoLaunch/MonoCtrl2/PropPage2.cpp
  29. +22 −0 MonoLaunch/MonoCtrl2/PropPage2.h
  30. +103 −0 MonoLaunch/MonoCtrl2/README.txt
  31. +104 −0 MonoLaunch/MonoCtrl2/RegHelper.cpp
  32. +14 −0 MonoLaunch/MonoCtrl2/RegHelper.h
  33. BIN MonoLaunch/MonoCtrl2/res/MonoCtrl2.ico
  34. +22 −0 MonoLaunch/MonoCtrl2/res/MonoCtrl2.manifest
  35. +13 −0 MonoLaunch/MonoCtrl2/res/MonoCtrl2.rc2
  36. +26 −0 MonoLaunch/MonoCtrl2/resource.h
  37. +7 −0 MonoLaunch/MonoCtrl2/stdafx.cpp
  38. +45 −0 MonoLaunch/MonoCtrl2/stdafx.h
  39. +51 −0 MonoLaunch/MonoLaunch.iss
  40. +37 −0 MonoLaunch/MonoLaunch.sln
  41. BIN MonoLaunch/MonoLaunch.suo
  42. +10 −0 MonoLaunch/README
  43. +241 −0 MonoLaunch/monoLaunchC/MFConRegEditor.cpp
  44. +36 −0 MonoLaunch/monoLaunchC/MFConRegEditor.h
  45. +45 −0 MonoLaunch/monoLaunchC/ReadMe.txt
  46. +11 −0 MonoLaunch/monoLaunchC/StdAfx.cpp
  47. +31 −0 MonoLaunch/monoLaunchC/StdAfx.h
  48. BIN MonoLaunch/monoLaunchC/mono.ico
  49. +210 −0 MonoLaunch/monoLaunchC/monoLaunchC.cpp
  50. +212 −0 MonoLaunch/monoLaunchC/monoLaunchC.mak
  51. +123 −0 MonoLaunch/monoLaunchC/monoLaunchC.rc
  52. +220 −0 MonoLaunch/monoLaunchC/monoLaunchC.vcproj
  53. +18 −0 MonoLaunch/monoLaunchC/resource.h
  54. +241 −0 MonoLaunch/monoLaunchW/MFConRegEditor.cpp
  55. +36 −0 MonoLaunch/monoLaunchW/MFConRegEditor.h
  56. +45 −0 MonoLaunch/monoLaunchW/README.txt
  57. +11 −0 MonoLaunch/monoLaunchW/StdAfx.cpp
  58. +31 −0 MonoLaunch/monoLaunchW/StdAfx.h
  59. BIN MonoLaunch/monoLaunchW/mono.ico
  60. +210 −0 MonoLaunch/monoLaunchW/monoLaunchW.cpp
  61. +212 −0 MonoLaunch/monoLaunchW/monoLaunchW.mak
  62. +123 −0 MonoLaunch/monoLaunchW/monoLaunchW.rc
  63. +220 −0 MonoLaunch/monoLaunchW/monoLaunchW.vcproj
  64. +18 −0 MonoLaunch/monoLaunchW/resource.h
  65. +6 −0 gacco/ChangeLog
  66. +190 −0 gacco/GacHelper.cpp
  67. +45 −0 gacco/GacHelper.h
  68. +42 −0 gacco/README.txt
  69. +279 −0 gacco/gacco.cpp
  70. +103 −0 gacco/gacco.rc
  71. +21 −0 gacco/gacco.sln
  72. +170 −0 gacco/gacco.vcproj
  73. +20 −0 gacco/resource.h
  74. +15 −0 gacco/stdafx.cpp
  75. +24 −0 gacco/stdafx.h
  76. BIN vsAddIn2003/codekey/vsprj2make.snk
  77. +1 −0 vsAddIn2003/src/AUTHORS
  78. BIN vsAddIn2003/src/BinandLib/CreateZipFromSln.exe
  79. BIN vsAddIn2003/src/BinandLib/extensibility.dll
  80. BIN vsAddIn2003/src/BinandLib/monoLaunchC.exe
  81. BIN vsAddIn2003/src/BinandLib/monoLaunchW.exe
  82. BIN vsAddIn2003/src/BinandLib/office.dll
  83. BIN vsAddIn2003/src/BinandLib/prj2makesharpWin32.exe
  84. +343 −0 vsAddIn2003/src/COPYING
  85. +6 −0 vsAddIn2003/src/ChangeLog
  86. +25 −0 vsAddIn2003/src/CreateZipFile/AssemblyInfo.cs
  87. +120 −0 vsAddIn2003/src/CreateZipFile/CreateZipFile.csproj
  88. +48 −0 vsAddIn2003/src/CreateZipFile/CreateZipFile.csproj.user
  89. +254 −0 vsAddIn2003/src/CreateZipFile/Drive.cs
  90. +34 −0 vsAddIn2003/src/CreateZipFile/MainOpts.cs
  91. +37 −0 vsAddIn2003/src/CreateZipFile/Makefile.mcs.nmake
  92. +92 −0 vsAddIn2003/src/CreateZipFile/ZipCompressor.cs
  93. BIN vsAddIn2003/src/CreateZipFile/bin/Release/ICSharpCode.SharpZipLib.dll
  94. BIN vsAddIn2003/src/CreateZipFile/bin/Release/Mono.GetOptions.dll
  95. +3 −0 vsAddIn2003/src/INSTALL
  96. BIN vsAddIn2003/src/Output/vsprj2make-setup-1.0.0.0.exe
  97. +186 −0 vsAddIn2003/src/Prj2MakeWin32/CsprojInfo.cs
  98. +45 −0 vsAddIn2003/src/Prj2MakeWin32/Makefile.mcs.nmake
  99. +362 −0 vsAddIn2003/src/Prj2MakeWin32/MdPrjHelper.cs
  100. +874 −0 vsAddIn2003/src/Prj2MakeWin32/MsPrjHelper.cs
  101. +92 −0 vsAddIn2003/src/Prj2MakeWin32/PrjHelper.cs
  102. +197 −0 vsAddIn2003/src/Prj2MakeWin32/PrjxInfo.cs
  103. BIN vsAddIn2003/src/Prj2MakeWin32/bin/Debug/Mono.GetOptions.dll
  104. BIN vsAddIn2003/src/Prj2MakeWin32/bin/Debug/prj2makesharpWin32.exe
  105. BIN vsAddIn2003/src/Prj2MakeWin32/bin/Debug/prj2makesharpWin32.exe.mdb
  106. +282 −0 vsAddIn2003/src/Prj2MakeWin32/csproj_ver2003.cs
  107. +38 −0 vsAddIn2003/src/Prj2MakeWin32/cui/AssemblyInfo.cs
  108. +45 −0 vsAddIn2003/src/Prj2MakeWin32/cui/Main.cs
  109. +127 −0 vsAddIn2003/src/Prj2MakeWin32/cui/MainMod.cs
  110. +28 −0 vsAddIn2003/src/Prj2MakeWin32/cui/MainOpts.cs
  111. +97 −0 vsAddIn2003/src/Prj2MakeWin32/pkgconfiginvoker.cs
  112. +155 −0 vsAddIn2003/src/Prj2MakeWin32/prj2makesharp.csproj
  113. +48 −0 vsAddIn2003/src/Prj2MakeWin32/prj2makesharp.csproj.user
  114. +117 −0 vsAddIn2003/src/Prj2MakeWin32/sharp_d_cmbx.cs
  115. +326 −0 vsAddIn2003/src/Prj2MakeWin32/sharp_d_prjx.cs
  116. +51 −0 vsAddIn2003/src/README
  117. +61 −0 vsAddIn2003/src/README.txt
  118. +61 −0 vsAddIn2003/src/ReleaseNotes.txt
  119. BIN vsAddIn2003/src/reflib/ICSharpCode.SharpZipLib.dll
  120. BIN vsAddIn2003/src/reflib/Mono.GetOptions.dll
  121. +33 −0 vsAddIn2003/src/vsprj2make.sln
  122. BIN vsAddIn2003/src/vsprj2make.suo
  123. +20 −0 vsAddIn2003/src/vsprj2makeAddin/AssemblyInfo.cs
  124. +1,078 −0 vsAddIn2003/src/vsprj2makeAddin/Connect.cs
  125. +109 −0 vsAddIn2003/src/vsprj2makeAddin/CreateZipHelper.cs
  126. +46 −0 vsAddIn2003/src/vsprj2makeAddin/Makefile.csc.nmake
  127. +58 −0 vsAddIn2003/src/vsprj2makeAddin/MonoLaunchHelper.cs
  128. +531 −0 vsAddIn2003/src/vsprj2makeAddin/OptionsDlg.cs
  129. +436 −0 vsAddIn2003/src/vsprj2makeAddin/OptionsDlg.resx
  130. +174 −0 vsAddIn2003/src/vsprj2makeAddin/Prj2MakeHelper.cs
  131. +204 −0 vsAddIn2003/src/vsprj2makeAddin/RegistryHelper.cs
  132. BIN vsAddIn2003/src/vsprj2makeAddin/bin/Release/vsprj2make.dll
  133. BIN vsAddIn2003/src/vsprj2makeAddin/bin/Release/vsprj2make.tlb
  134. BIN vsAddIn2003/src/vsprj2makeAddin/bin/vsprj2make.dll
  135. +169 −0 vsAddIn2003/src/vsprj2makeAddin/bin/vsprj2make.reg
  136. BIN vsAddIn2003/src/vsprj2makeAddin/codekey/vsprj2make.snk
  137. +150 −0 vsAddIn2003/src/vsprj2makeAddin/vsprj2make.csproj
  138. +54 −0 vsAddIn2003/src/vsprj2makeAddin/vsprj2make.csproj.user
  139. +286 −0 vsAddIn2003/src/vsprj2make_0.6.iss
6 GetNetSdkLocation/ChangeLog
@@ -0,0 +1,6 @@
+2006-04-19 Francisco "Paco" Martinez <paco@mfcon.com>
+
+ * Initial import into mono's svn repository
+
+
+
277 GetNetSdkLocation/GetNetSdkLocation.cpp
@@ -0,0 +1,277 @@
+// GetNetSdkLocation.cpp : Defines the entry point for the console application.
+//
+
+#include "stdafx.h"
+#include "GetNetSdkLocation.h"
+#include "MFConRegEditor.h"
+
+using namespace std;
+
+int _tmain(int argc, _TCHAR* argv[])
+{
+ int nRetCode = 0;
+ CString strSDKPath;
+
+ // Quick command line parameter checking
+ if(argc < 2)
+ {
+ PrintUsage();
+ return 0;
+ }
+
+ if(ParseCmdLine(argc, argv) != 0)
+ {
+ cerr << _T("Error parsing command line arguments.") << endl;
+ PrintUsage();
+ return 1;
+ }
+
+ if(g_bShowUsage == TRUE)
+ {
+ PrintUsage();
+ return 0;
+ }
+
+ if(::lstrlen(g_szLocation) < 1)
+ {
+ cerr << _T("Location was not specified.") << endl;
+ PrintUsage();
+ return 1;
+ }
+
+ // Invoke the function to process the location
+ if(::lstrcmp(g_szLocation, _T("MONO_1.0.2")) == 0)
+ {
+ GetMonoSdkRoot(strSDKPath.GetBuffer(MAX_PATH));
+ strSDKPath.ReleaseBuffer();
+ }
+ else if(::lstrcmp(g_szLocation, _T("MSNET_1.1")) == 0)
+ {
+ GetMsNetRoot(strSDKPath.GetBuffer(MAX_PATH));
+ strSDKPath.ReleaseBuffer();
+ }
+ else if(::lstrcmp(g_szLocation, _T("MSNETSDK_1.1")) == 0)
+ {
+ GetMsNetSdkRoot(strSDKPath.GetBuffer(MAX_PATH));
+ strSDKPath.ReleaseBuffer();
+ }
+ else
+ {
+ cerr << _T("Location is not recognized.") << endl;
+ PrintUsage();
+ return 1;
+ }
+
+ // React to the request to use Short Path
+ if(g_bUseShortPath == TRUE)
+ {
+ ::GetShortPathName(
+ (LPCTSTR)strSDKPath,
+ strSDKPath.GetBuffer(MAX_PATH),
+ (DWORD)MAX_PATH
+ );
+ strSDKPath.ReleaseBuffer();
+ }
+
+ // React to the request to use Cygwin style path
+ if(g_bUseCygwinPath == TRUE)
+ {
+ CString strCygPath;
+ CString strDriveLetter;
+ TCHAR chDriveLetter = _T('\0');
+
+ strDriveLetter = strSDKPath.Mid(0,1);
+ strDriveLetter.MakeLower();
+ chDriveLetter = strDriveLetter.GetAt(0);
+
+ strSDKPath.Replace(_T('\\'), _T('/'));
+ strCygPath.Format(
+ _T("/cygdrive/%c%s"),
+ chDriveLetter,
+ (LPCTSTR)(strSDKPath.Mid(2))
+ );
+ cout << (LPCTSTR)strCygPath << endl;
+ return 0;
+ }
+ cout << (LPCTSTR)strSDKPath << endl;
+
+ return nRetCode;
+}
+
+LRESULT APIENTRY GetMonoSdkRoot(LPTSTR szOutPath)
+{
+ CMFConRegEditor regEdt;
+ CString strTemp;
+
+ if(regEdt.Open(_T("SOFTWARE\\Novell\\Mono\\1.0.2"), 0) == false)
+ {
+ return 1;
+ }
+
+ strTemp = regEdt.GetValue(_T("SdkInstallRoot"));
+
+ regEdt.Close();
+
+ if(strTemp.GetLength() < 1)
+ {
+ return -1;
+ }
+ else
+ {
+ lstrcpy(szOutPath, (LPCTSTR)strTemp);
+ }
+
+ return 0;
+}
+
+LRESULT APIENTRY GetMsNetSdkRoot(LPTSTR szOutPath)
+{
+ CMFConRegEditor regEdt;
+ CString strTemp;
+
+ if(regEdt.Open(_T("SOFTWARE\\Microsoft\\.NETFramework"), 0) == false)
+ {
+ return 1;
+ }
+
+ strTemp = regEdt.GetValue(_T("sdkInstallRootv1.1"));
+
+ regEdt.Close();
+
+ if(strTemp.GetLength() < 1)
+ {
+ return -1;
+ }
+ else
+ {
+ lstrcpy(szOutPath, (LPCTSTR)strTemp);
+ }
+
+ return 0;
+}
+
+LRESULT APIENTRY GetMsNetRoot(LPTSTR szOutPath)
+{
+ CMFConRegEditor regEdt;
+ CString strTemp;
+
+ if(regEdt.Open(_T("SOFTWARE\\Microsoft\\.NETFramework"), 0) == false)
+ {
+ return 1;
+ }
+
+ strTemp = regEdt.GetValue(_T("InstallRoot"));
+
+ regEdt.Close();
+
+ if(strTemp.GetLength() < 1)
+ {
+ return -1;
+ }
+ else
+ {
+ lstrcpy(szOutPath, (LPCTSTR)strTemp);
+ }
+
+ return 0;
+}
+
+LRESULT APIENTRY ParseCmdLine(int argc, TCHAR* argv[])
+{
+ CString strArgv;
+ CString strOption;
+ g_bUseShortPath = FALSE;
+ g_bUseCygwinPath = FALSE;
+ g_bShowUsage = FALSE;
+ ZeroMemory(g_szExe, (sizeof(TCHAR) * MAX_PATH));
+ ZeroMemory(g_szLocation, (sizeof(TCHAR) * MAXLOCATIONLEN));
+
+ lstrcpy(g_szExe, argv[0]);
+
+ // Go through all arguments
+ for(int i = 1; i < argc; i++)
+ {
+ ::lstrcpyn(strArgv.GetBuffer(1024), argv[i], 1023);
+ strArgv.ReleaseBuffer();
+
+ if(strArgv.GetLength() < 1)
+ {
+ continue;
+ }
+
+ strArgv.MakeUpper();
+ // Handle known locations
+ if(strArgv.Compare(_T("MONO_1.0.2")) == 0)
+ {
+ lstrcpy(g_szLocation, (LPCTSTR)strArgv);
+ continue;
+ }
+
+ if(strArgv.Compare(_T("MSNET_1.1")) == 0)
+ {
+ lstrcpy(g_szLocation, (LPCTSTR)strArgv);
+ continue;
+ }
+
+ if(strArgv.Compare(_T("MSNETSDK_1.1")) == 0)
+ {
+ lstrcpy(g_szLocation, (LPCTSTR)strArgv);
+ continue;
+ }
+
+
+ // Handle options designated with option marker character
+ if(strArgv[0] == _T('-') || strArgv[0] == _T('/'))
+ {
+ if(strArgv.GetLength() < 2)
+ {
+ // nothing followed the marker char
+ continue;
+ }
+
+ strOption = strArgv.Mid(1);
+ }
+ else
+ {
+ strOption = strArgv;
+ }
+
+ for(int i2 = 0; i2 < strOption.GetLength(); i2++)
+ {
+ switch(strOption[i2])
+ {
+ case _T('C'):
+ g_bUseCygwinPath = TRUE;
+ break;
+ case _T('S'):
+ g_bUseShortPath = TRUE;
+ break;
+ case _T('H'):
+ case _T('?'):
+ g_bShowUsage = TRUE;
+ return 0;
+ default:
+ continue;
+ }
+ }
+ }
+
+ return 0;
+}
+
+void APIENTRY PrintUsage()
+{
+ cout << _T("GetNetSdkLocations [options] <location>")<< endl;
+ cout << endl;
+ cout << _T("Where options are:")<< endl;
+ cout << _T(" -s\tUse short path form (8.3 friendly file/path format)")<< endl;
+ cout << _T(" -c\tUse Cygwin drive prefix")<< endl;
+ cout << _T(" -?\tThis help text")<< endl;
+ cout << endl;
+ cout << _T("Available locations:")<< endl;
+ cout << _T(" mono_1.0.2\tMono 1.0.2 Base Path")<< endl;
+ cout << _T(" msnet_1.1\tMicrosoft .NET Framework 1.1 Runtime")<< endl;
+ cout << _T(" msnetsdk_1.1\tMicrosoft .NET Framework 1.1 SDK")<< endl;
+ cout << endl;
+}
+
26 GetNetSdkLocation/GetNetSdkLocation.h
@@ -0,0 +1,26 @@
+
+#if !defined(AFX_GETNETSDKLOCATIONS_H__97F5D080_EB49_4BA2_BCE8_106660262FC7__INCLUDED_)
+#define AFX_GETNETSDKLOCATIONS_H__97F5D080_EB49_4BA2_BCE8_106660262FC7__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+// #include "resource.h"
+
+#define MAXLOCATIONLEN 200
+
+BOOL g_bUseShortPath;
+BOOL g_bUseCygwinPath;
+BOOL g_bShowUsage;
+TCHAR g_szExe[MAX_PATH];
+TCHAR g_szLocation[MAXLOCATIONLEN];
+
+LRESULT APIENTRY GetMonoSdkRoot(LPTSTR);
+LRESULT APIENTRY GetMsNetSdkRoot(LPTSTR);
+LRESULT APIENTRY GetMsNetRoot(LPTSTR);
+LRESULT APIENTRY ParseCmdLine(int, TCHAR**);
+void APIENTRY PrintUsage(void);
+
+
+#endif // !defined(AFX_GETNETSDKLOCATIONS_H__97F5D080_EB49_4BA2_BCE8_106660262FC7__INCLUDED_)
103 GetNetSdkLocation/GetNetSdkLocation.rc
@@ -0,0 +1,103 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,1
+ PRODUCTVERSION 1,0,0,1
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "Comments", "Helper tool to obtain the the path of the .NET SDK"
+ VALUE "CompanyName", "Francisco ""Paco"" Martinez"
+ VALUE "FileDescription", "GetNetSdkLocation"
+ VALUE "FileVersion", "1, 0, 0, 1"
+ VALUE "InternalName", "GetNetSdkLocation"
+ VALUE "LegalCopyright", "Copyright (C) 2004"
+ VALUE "OriginalFilename", "GetNetSdkLocation.exe"
+ VALUE "ProductName", "GetNetSdkLocation Application"
+ VALUE "ProductVersion", "1, 0, 0, 1"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
21 GetNetSdkLocation/GetNetSdkLocation.sln
@@ -0,0 +1,21 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GetNetSdkLocation", "GetNetSdkLocation.vcproj", "{2E777127-F49A-415D-9410-EA73AF3BBA65}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ Debug = Debug
+ Release = Release
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {2E777127-F49A-415D-9410-EA73AF3BBA65}.Debug.ActiveCfg = Debug|Win32
+ {2E777127-F49A-415D-9410-EA73AF3BBA65}.Debug.Build.0 = Debug|Win32
+ {2E777127-F49A-415D-9410-EA73AF3BBA65}.Release.ActiveCfg = Release|Win32
+ {2E777127-F49A-415D-9410-EA73AF3BBA65}.Release.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
170 GetNetSdkLocation/GetNetSdkLocation.vcproj
@@ -0,0 +1,170 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="GetNetSdkLocation"
+ ProjectGUID="{2E777127-F49A-415D-9410-EA73AF3BBA65}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ UseOfATL="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ UsePrecompiledHeader="3"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/GetNetSdkLocation.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/GetNetSdkLocation.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ UseOfATL="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="4"
+ UsePrecompiledHeader="3"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/GetNetSdkLocation.exe"
+ LinkIncremental="1"
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ <File
+ RelativePath=".\GetNetSdkLocation.cpp">
+ </File>
+ <File
+ RelativePath="..\GetNetSdkLocations\MFConRegEditor.cpp">
+ </File>
+ <File
+ RelativePath=".\stdafx.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"/>
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ <File
+ RelativePath="..\GetNetSdkLocations\GetNetSdkLocations.h">
+ </File>
+ <File
+ RelativePath="..\GetNetSdkLocations\MFConRegEditor.h">
+ </File>
+ <File
+ RelativePath=".\resource.h">
+ </File>
+ <File
+ RelativePath=".\stdafx.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+ <File
+ RelativePath=".\GetNetSdkLocation.rc">
+ </File>
+ </Filter>
+ <File
+ RelativePath=".\ReadMe.txt">
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
235 GetNetSdkLocation/MFConRegEditor.cpp
@@ -0,0 +1,235 @@
+// MFConRegEditor.cpp: implementation of the CMFConRegEditor class.
+//
+//////////////////////////////////////////////////////////////////////
+
+#include "stdafx.h"
+#include "MFConRegEditor.h"
+
+#include <aclapi.h>
+
+#ifdef _DEBUG
+#undef THIS_FILE
+static char THIS_FILE[]=__FILE__;
+#define new DEBUG_NEW
+#endif
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CMFConRegEditor::CMFConRegEditor()
+{
+ m_RegKey = NULL;
+}
+
+CMFConRegEditor::CMFConRegEditor(LPCTSTR strKeyName)
+{
+
+ DWORD dwDisposition;
+ long lRc;
+
+ lRc = RegCreateKeyEx(
+ HKEY_LOCAL_MACHINE, // handle to an open key
+ strKeyName, // address of subkey name
+ 0, // reserved
+ _T("Key"), // address of class string
+ REG_OPTION_NON_VOLATILE, // special options flag
+ KEY_ALL_ACCESS, // desired security access
+ NULL, // address of key security structure
+ &m_RegKey, // address of buffer for opened handle
+ &dwDisposition // address of disposition value buffer
+ );
+}
+
+CMFConRegEditor::~CMFConRegEditor()
+{
+ if(m_RegKey != NULL)
+ RegCloseKey(m_RegKey);
+}
+
+BOOL CMFConRegEditor::Open(LPCTSTR strKeyName, int iAccMode)
+{
+ DWORD dwDisposition, dwAccMode;
+ long lRc;
+
+ switch(iAccMode)
+ {
+ case 0:
+ dwAccMode = KEY_READ;
+ break;
+ case 1:
+ dwAccMode = KEY_ALL_ACCESS;
+ break;
+ }
+
+ lRc = RegCreateKeyEx(
+ HKEY_LOCAL_MACHINE, // handle to an open key
+ strKeyName, // address of subkey name
+ 0, // reserved
+ _T("Key"), // address of class string
+ REG_OPTION_NON_VOLATILE, // special options flag
+ dwAccMode, // desired security access
+ NULL, // address of key security structure
+ &m_RegKey, // address of buffer for opened handle
+ &dwDisposition // address of disposition value buffer
+ );
+
+ if(lRc != ERROR_SUCCESS)
+ return FALSE;
+
+ return TRUE;
+}
+
+DWORD CMFConRegEditor::GetValueDw(LPCTSTR strKeyName)
+{
+ DWORD dwRetVal = 0;
+
+ long lRc;
+ DWORD cbData = sizeof(DWORD);
+
+ lRc = RegQueryValueEx(
+ m_RegKey, // handle to key to query
+ (LPCTSTR) strKeyName, // address of name of value to query
+ NULL, // reserved
+ NULL, // address of buffer for value type
+ (LPBYTE)&dwRetVal, // address of data buffer
+ &cbData // address of data buffer size
+ );
+
+ if(lRc != ERROR_SUCCESS)
+ return 0;
+
+ return dwRetVal;
+}
+
+LPCTSTR CMFConRegEditor::GetValue(LPCTSTR strKeyName)
+{
+ long lRc;
+ DWORD cbData = 400;
+ static char szData[400];
+
+ lRc = RegQueryValueEx(
+ m_RegKey, // handle to key to query
+ (LPCTSTR) strKeyName, // address of name of value to query
+ NULL, // reserved
+ NULL, // address of buffer for value type
+ (LPBYTE)szData, // address of data buffer
+ &cbData // address of data buffer size
+ );
+
+ if(lRc != ERROR_SUCCESS)
+ return FALSE;
+
+ return (LPCTSTR)szData;
+}
+
+BOOL CMFConRegEditor::SetValue(LPCTSTR strKeyName, DWORD* lpdwKeyValue)
+{
+
+ long lRc;
+
+ lRc = RegSetValueEx(
+ m_RegKey, // handle to key to set value for
+ strKeyName, // name of the value to set
+ 0, // reserved
+ REG_DWORD, // flag for value type
+ (LPBYTE)lpdwKeyValue, // address of value data
+ sizeof(long) // size of value data
+ );
+
+ if(lRc != ERROR_SUCCESS)
+ return FALSE;
+
+ return TRUE;
+}
+
+BOOL CMFConRegEditor::SetValue(LPCTSTR strKeyName, LPCTSTR szKeyValue)
+{
+ long lRc;
+ int nLen;
+
+ nLen = lstrlen(szKeyValue);
+
+ lRc = RegSetValueEx(
+ m_RegKey, // handle to key to set value for
+ strKeyName, // name of the value to set
+ 0, // reserved
+ REG_SZ, // flag for value type
+ (const UCHAR *)szKeyValue, // address of value data
+ nLen // size of value data
+ );
+
+ if(lRc != ERROR_SUCCESS)
+ return FALSE;
+
+ return TRUE;
+}
+
+BOOL CMFConRegEditor::Close()
+{
+ if(m_RegKey != NULL)
+ {
+ RegCloseKey(m_RegKey);
+ m_RegKey = NULL;
+ }
+ return TRUE;
+}
+
+BOOL CMFConRegEditor::SetSecurity(LPTSTR strUsr)
+{
+ long lRc;
+ static SECURITY_INFORMATION struSecInfo;
+ PSECURITY_DESCRIPTOR pSecDesc;
+ PACL pOldDACL = NULL, pNewDACL = NULL;
+ EXPLICIT_ACCESS ea;
+
+ lRc = GetSecurityInfo(
+ m_RegKey,
+ SE_REGISTRY_KEY,
+ DACL_SECURITY_INFORMATION,
+ NULL,
+ NULL,
+ &pOldDACL,
+ NULL,
+ &pSecDesc
+ );
+
+ if(lRc != ERROR_SUCCESS)
+ return FALSE;
+
+ ZeroMemory(&ea, sizeof(EXPLICIT_ACCESS));
+
+ BuildExplicitAccessWithName(
+ &ea,
+ strUsr,
+ GENERIC_ALL,
+ SET_ACCESS,
+ SUB_CONTAINERS_AND_OBJECTS_INHERIT
+ );
+
+ lRc = SetEntriesInAcl(1, &ea, pOldDACL, &pNewDACL);
+ if (ERROR_SUCCESS != lRc)
+ goto Cleanup;
+
+ lRc = SetSecurityInfo(
+ m_RegKey,
+ SE_REGISTRY_KEY,
+ DACL_SECURITY_INFORMATION,
+ NULL,
+ NULL,
+ pNewDACL,
+ NULL
+ );
+
+Cleanup:
+ if(pSecDesc != NULL)
+ LocalFree((HLOCAL) pSecDesc);
+
+ if(pNewDACL != NULL)
+ LocalFree((HLOCAL) pNewDACL);
+
+ if(lRc != ERROR_SUCCESS)
+ return FALSE;
+
+ return TRUE;
+}
30 GetNetSdkLocation/MFConRegEditor.h
@@ -0,0 +1,30 @@
+// MFConRegEditor.h: interface for the CMFConRegEditor class.
+//
+//////////////////////////////////////////////////////////////////////
+
+#if !defined(AFX_REGEDITOR_H__1CB02312_C3B5_11D2_B35D_00A0C936107F__INCLUDED_)
+#define AFX_REGEDITOR_H__1CB02312_C3B5_11D2_B35D_00A0C936107F__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+class CMFConRegEditor
+{
+public:
+ BOOL Close();
+ BOOL Open(LPCTSTR strKeyName, int iAccMode = 1);
+ BOOL SetSecurity(LPTSTR strUsr);
+ LPCTSTR GetValue(LPCTSTR strKeyName);
+ DWORD GetValueDw(LPCTSTR strKeyName);
+ BOOL SetValue(LPCTSTR strKeyName, LPCTSTR szKeyValue);
+ BOOL SetValue(LPCTSTR strKeyName, DWORD* lpdwKeyValue);
+ HKEY m_RegKey;
+
+ CMFConRegEditor(); // Default Constructor
+ CMFConRegEditor(LPCTSTR strKeyName);
+ virtual ~CMFConRegEditor();
+
+};
+
+#endif // !defined(AFX_REGEDITOR_H__1CB02312_C3B5_11D2_B35D_00A0C936107F__INCLUDED_)
32 GetNetSdkLocation/README.txt
@@ -0,0 +1,32 @@
+========================================================================
+ CONSOLE APPLICATION : GetNetSdkLocation Project Overview
+========================================================================
+
+AppWizard has created this GetNetSdkLocation application for you.
+This file contains a summary of what you will find in each of the files that
+make up your GetNetSdkLocation application.
+
+
+GetNetSdkLocation.vcproj
+ This is the main project file for VC++ projects generated using an Application Wizard.
+ It contains information about the version of Visual C++ that generated the file, and
+ information about the platforms, configurations, and project features selected with the
+ Application Wizard.
+
+GetNetSdkLocation.cpp
+ This is the main application source file.
+
+/////////////////////////////////////////////////////////////////////////////
+Other standard files:
+
+StdAfx.h, StdAfx.cpp
+ These files are used to build a precompiled header (PCH) file
+ named GetNetSdkLocation.pch and a precompiled types file named StdAfx.obj.
+
+/////////////////////////////////////////////////////////////////////////////
+Other notes:
+
+AppWizard uses "TODO:" comments to indicate parts of the source code you
+should add to or customize.
+
+/////////////////////////////////////////////////////////////////////////////
14 GetNetSdkLocation/resource.h
@@ -0,0 +1,14 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by GetNetSdkLocation.rc
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 101
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1001
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
8 GetNetSdkLocation/stdafx.cpp
@@ -0,0 +1,8 @@
+// stdafx.cpp : source file that includes just the standard includes
+// GetNetSdkLocation.pch will be the pre-compiled header
+// stdafx.obj will contain the pre-compiled type information
+
+#include "stdafx.h"
+
+// TODO: reference any additional headers you need in STDAFX.H
+// and not in this file
17 GetNetSdkLocation/stdafx.h
@@ -0,0 +1,17 @@
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently, but
+// are changed infrequently
+//
+
+#pragma once
+
+
+#include <iostream>
+#include <tchar.h>
+#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
+
+#include <atlbase.h>
+#include <atlstr.h>
+#include <windows.h>
+
+// TODO: reference additional headers your program requires here
1 MonoLaunch/AUTHORS
@@ -0,0 +1 @@
+Francisco "Paco" Martinez
7 MonoLaunch/COPYING
@@ -0,0 +1,7 @@
+The MIT License
+Copyright (c) 2004-2006 Francisco "Paco" Martinez
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
6 MonoLaunch/ChangeLog
@@ -0,0 +1,6 @@
+2006-04-19 Francisco "Paco" Martinez <paco@mfcon.com>
+
+ * Initial import into mono's svn repository
+
+
+
3 MonoLaunch/INSTALL
@@ -0,0 +1,3 @@
+INSTALL.txt for MonoLaunch
+-------------------------------------------
+
61 MonoLaunch/MonoCtrl2/MainPropSheet.cpp
@@ -0,0 +1,61 @@
+// MainPropSheet.cpp : implementation file
+//
+
+#include "stdafx.h"
+#include "MonoCtrl2.h"
+#include "MainPropSheet.h"
+#include ".\mainpropsheet.h"
+
+
+// CMainPropSheet
+
+IMPLEMENT_DYNAMIC(CMainPropSheet, CPropertySheet)
+
+CMainPropSheet::CMainPropSheet(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage)
+ :CPropertySheet(nIDCaption, pParentWnd, iSelectPage)
+{
+}
+
+CMainPropSheet::CMainPropSheet(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage)
+ :CPropertySheet(pszCaption, pParentWnd, iSelectPage)
+{
+ this->AddPage(&m_Page1);
+ // this->AddPage(&m_Page2);
+}
+
+CMainPropSheet::~CMainPropSheet()
+{
+}
+
+
+BEGIN_MESSAGE_MAP(CMainPropSheet, CPropertySheet)
+END_MESSAGE_MAP()
+
+
+// CMainPropSheet message handlers
+
+BOOL CMainPropSheet::OnInitDialog()
+{
+ BOOL bResult = CPropertySheet::OnInitDialog();
+ // TODO: Add extra initialization here
+
+ // Add "About..." menu item to system menu.
+
+ // IDM_ABOUTBOX must be in the system command range.
+ ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
+ ASSERT(IDM_ABOUTBOX < 0xF000);
+
+ CMenu* pSysMenu = GetSystemMenu(FALSE);
+ if (pSysMenu != NULL)
+ {
+ CString strAboutMenu;
+ strAboutMenu.LoadString(IDS_ABOUTBOX);
+ if (!strAboutMenu.IsEmpty())
+ {
+ pSysMenu->AppendMenu(MF_SEPARATOR);
+ pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
+ }
+ }
+
+ return bResult;
+}
26 MonoLaunch/MonoCtrl2/MainPropSheet.h
@@ -0,0 +1,26 @@
+#pragma once
+
+#include "PropPage1.h"
+#include "PropPage2.h"
+
+// CMainPropSheet
+
+class CMainPropSheet : public CPropertySheet
+{
+ DECLARE_DYNAMIC(CMainPropSheet)
+
+public:
+ CPropPage1 m_Page1;
+ CPropPage2 m_Page2;
+
+ CMainPropSheet(UINT nIDCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
+ CMainPropSheet(LPCTSTR pszCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
+ virtual ~CMainPropSheet();
+
+protected:
+ DECLARE_MESSAGE_MAP()
+public:
+ virtual BOOL OnInitDialog();
+};
+
+
94 MonoLaunch/MonoCtrl2/MonoCtrl2.cpp
@@ -0,0 +1,94 @@
+// MonoCtrl2.cpp : Defines the class behaviors for the application.
+//
+
+#include "stdafx.h"
+#include "MonoCtrl2.h"
+#include "MainPropSheet.h"
+#include ".\monoctrl2.h"
+
+#include "RegHelper.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#endif
+
+
+// CMonoCtrl2App
+
+BEGIN_MESSAGE_MAP(CMonoCtrl2App, CWinApp)
+ ON_COMMAND(ID_HELP, CWinApp::OnHelp)
+END_MESSAGE_MAP()
+
+
+// CMonoCtrl2App construction
+
+CMonoCtrl2App::CMonoCtrl2App()
+{
+ // TODO: add construction code here,
+ // Place all significant initialization in InitInstance
+}
+
+
+// The one and only CMonoCtrl2App object
+
+CMonoCtrl2App theApp;
+
+
+// CMonoCtrl2App initialization
+
+BOOL CMonoCtrl2App::InitInstance()
+{
+ CString strDefaultCLR;
+
+ // InitCommonControls() is required on Windows XP if an application
+ // manifest specifies use of ComCtl32.dll version 6 or later to enable
+ // visual styles. Otherwise, any window creation will fail.
+ InitCommonControls();
+
+ CWinApp::InitInstance();
+
+ AfxEnableControlContainer();
+
+ // Standard initialization
+ // If you are not using these features and wish to reduce the size
+ // of your final executable, you should remove from the following
+ // the specific initialization routines you do not need
+ // Change the registry key under which our settings are stored
+ // TODO: You should modify this string to be something appropriate
+ // such as the name of your company or organization
+ SetRegistryKey(_T("Novell"));
+
+ // CMainPropSheet *pDlg = NULL;
+
+ CMainPropSheet dlg(_T("Mono Settings"));
+
+ m_pMainWnd = &dlg;
+
+ CRegHelper::GetDefaultCLR(strDefaultCLR.GetBuffer(255), 255);
+ strDefaultCLR.ReleaseBuffer();
+
+ dlg.m_Page1.m_strDefaultCLR = strDefaultCLR;
+
+ INT_PTR nResponse = dlg.DoModal();
+
+ if (nResponse == IDOK)
+ {
+ CRegHelper::SetDefaultCLR(dlg.m_Page1.m_strDefaultCLR);
+ }
+ else if (nResponse == IDCANCEL)
+ {
+ // TODO: Place code here to handle when the dialog is
+ // dismissed with Cancel
+ }
+
+ // Since the dialog has been closed, return FALSE so that we exit the
+ // application, rather than start the application's message pump.
+ return FALSE;
+}
+
+int CMonoCtrl2App::ExitInstance()
+{
+ // TODO: Add your specialized code here and/or call the base class
+
+ return CWinApp::ExitInstance();
+}
35 MonoLaunch/MonoCtrl2/MonoCtrl2.h
@@ -0,0 +1,35 @@
+// MonoCtrl2.h : main header file for the PROJECT_NAME application
+//
+
+#pragma once
+
+#ifndef __AFXWIN_H__
+ #error include 'stdafx.h' before including this file for PCH
+#endif
+
+#include "resource.h" // main symbols
+#include "afxwin.h"
+
+
+// CMonoCtrl2App:
+// See MonoCtrl2.cpp for the implementation of this class
+//
+
+class CMonoCtrl2App : public CWinApp
+{
+public:
+ CMonoCtrl2App();
+
+// Overrides
+ public:
+ virtual BOOL InitInstance();
+
+// Implementation
+
+ DECLARE_MESSAGE_MAP()
+ // The DesktopWindow wrapper
+ CWnd m_DeskTopWin;
+ virtual int ExitInstance();
+};
+
+extern CMonoCtrl2App theApp;
242 MonoLaunch/MonoCtrl2/MonoCtrl2.rc
@@ -0,0 +1,242 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "#define _AFX_NO_SPLITTER_RESOURCES\r\n"
+ "#define _AFX_NO_OLE_RESOURCES\r\n"
+ "#define _AFX_NO_TRACKER_RESOURCES\r\n"
+ "#define _AFX_NO_PROPERTY_RESOURCES\r\n"
+ "\r\n"
+ "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
+ "LANGUAGE 9, 1\r\n"
+ "#pragma code_page(1252)\r\n"
+ "#include ""res\\MonoCtrl2.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
+ "#include ""afxres.rc"" // Standard components\r\n"
+ "#endif\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDR_MAINFRAME ICON "res\\MonoCtrl2.ico"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_ABOUTBOX DIALOGEX 0, 0, 235, 55
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |
+ WS_SYSMENU
+CAPTION "About MonoCtrl2"
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20
+ LTEXT "MonoCtrl2 Version 1.0",IDC_STATIC,40,10,119,8,
+ SS_NOPREFIX
+ LTEXT "Copyright (C) 2004",IDC_STATIC,40,25,119,8
+ DEFPUSHBUTTON "OK",IDOK,178,7,50,16,WS_GROUP
+END
+
+IDD_MONOCTRL2_DIALOG DIALOGEX 0, 0, 320, 200
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE |
+ WS_CAPTION | WS_SYSMENU
+EXSTYLE WS_EX_APPWINDOW
+CAPTION "MonoCtrl2"
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ DEFPUSHBUTTON "OK",IDOK,263,7,50,16
+ PUSHBUTTON "Cancel",IDCANCEL,263,25,50,16
+ CTEXT "TODO: Place dialog controls here.",IDC_STATIC,10,96,300,
+ 8
+END
+
+IDD_PROPPAGE_1 DIALOGEX 0, 0, 210, 154
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Mono Versions"
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+ LISTBOX IDC_VERSIONS_LIST,7,38,196,109,LBS_SORT |
+ LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Mono CLR",IDC_STATIC,7,7,33,8
+ EDITTEXT IDC_SELECTEDCLR_EDT,7,17,196,14,ES_AUTOHSCROLL |
+ ES_READONLY
+END
+
+IDD_PROPPAGE_2 DIALOGEX 0, 0, 210, 154
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Launchers"
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+ GROUPBOX "Console",IDC_STATIC,7,7,196,59
+ GROUPBOX "Windows",IDC_STATIC,7,75,196,59
+ CONTROL "Window remain open after execution completes",
+ IDC_REMAINOPEN_CHK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
+ 21,32,168,10
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,2
+ PRODUCTVERSION 1,0,0,2
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904e4"
+ BEGIN
+ VALUE "Comments", "Front end application to select the active Mono runtime"
+ VALUE "CompanyName", "Mono"
+ VALUE "FileDescription", "Mono runtime chooser for Win32"
+ VALUE "FileVersion", "1.0.0.2"
+ VALUE "InternalName", "MonoCtrl2.exe"
+ VALUE "LegalCopyright", "(c) 2004-2005 Mono. All rights reserved."
+ VALUE "OriginalFilename", "MonoCtrl2.exe"
+ VALUE "ProductName", "Mono"
+ VALUE "ProductVersion", "1.0.0.2"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1252
+ END
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO
+BEGIN
+ IDD_ABOUTBOX, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 228
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 48
+ END
+
+ IDD_MONOCTRL2_DIALOG, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 313
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 193
+ END
+
+ IDD_PROPPAGE_1, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 203
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 147
+ END
+
+ IDD_PROPPAGE_2, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 203
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 147
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE
+BEGIN
+ IDS_ABOUTBOX "&About MonoCtrl2..."
+END
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+#define _AFX_NO_SPLITTER_RESOURCES
+#define _AFX_NO_OLE_RESOURCES
+#define _AFX_NO_TRACKER_RESOURCES
+#define _AFX_NO_PROPERTY_RESOURCES
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+LANGUAGE 9, 1
+#pragma code_page(1252)
+#include "res\MonoCtrl2.rc2" // non-Microsoft Visual C++ edited resources
+#include "afxres.rc" // Standard components
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
37 MonoLaunch/MonoCtrl2/MonoCtrl2.sln
@@ -0,0 +1,37 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MonoCtrl2", "MonoCtrl2.vcproj", "{A7552ECF-2523-43AB-8904-04B172E397BE}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "monoLaunchW", "..\monoLaunchW\monoLaunchW.vcproj", "{C8338AAD-CD54-47A8-A031-2E83A22CAB83}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "monoLaunchC", "..\monoLaunchC\monoLaunchC.vcproj", "{B5BFF071-21CE-4601-AD4E-9B204B2FE5BB}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ Debug = Debug
+ Release = Release
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {A7552ECF-2523-43AB-8904-04B172E397BE}.Debug.ActiveCfg = Debug|Win32
+ {A7552ECF-2523-43AB-8904-04B172E397BE}.Debug.Build.0 = Debug|Win32
+ {A7552ECF-2523-43AB-8904-04B172E397BE}.Release.ActiveCfg = Release|Win32
+ {A7552ECF-2523-43AB-8904-04B172E397BE}.Release.Build.0 = Release|Win32
+ {C8338AAD-CD54-47A8-A031-2E83A22CAB83}.Debug.ActiveCfg = Debug|Win32
+ {C8338AAD-CD54-47A8-A031-2E83A22CAB83}.Debug.Build.0 = Debug|Win32
+ {C8338AAD-CD54-47A8-A031-2E83A22CAB83}.Release.ActiveCfg = Release|Win32
+ {C8338AAD-CD54-47A8-A031-2E83A22CAB83}.Release.Build.0 = Release|Win32
+ {B5BFF071-21CE-4601-AD4E-9B204B2FE5BB}.Debug.ActiveCfg = Debug|Win32
+ {B5BFF071-21CE-4601-AD4E-9B204B2FE5BB}.Debug.Build.0 = Debug|Win32
+ {B5BFF071-21CE-4601-AD4E-9B204B2FE5BB}.Release.ActiveCfg = Release|Win32
+ {B5BFF071-21CE-4601-AD4E-9B204B2FE5BB}.Release.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
210 MonoLaunch/MonoCtrl2/MonoCtrl2.vcproj
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="MonoCtrl2"
+ ProjectGUID="{A7552ECF-2523-43AB-8904-04B172E397BE}"
+ Keyword="MFCProj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="1"
+ UseOfMFC="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ TreatWChar_tAsBuiltInType="TRUE"
+ UsePrecompiledHeader="3"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ GenerateDebugInformation="TRUE"
+ SubSystem="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="FALSE"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="$(IntDir)"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="1"
+ UseOfMFC="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG"
+ MinimalRebuild="FALSE"
+ RuntimeLibrary="0"
+ TreatWChar_tAsBuiltInType="TRUE"
+ UsePrecompiledHeader="3"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ GenerateDebugInformation="TRUE"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="FALSE"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="$(IntDir)"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ <File
+ RelativePath=".\MainPropSheet.cpp">
+ </File>
+ <File
+ RelativePath=".\MonoCtrl2.cpp">
+ </File>
+ <File
+ RelativePath=".\PropPage1.cpp">
+ </File>
+ <File
+ RelativePath=".\PropPage2.cpp">
+ </File>
+ <File
+ RelativePath=".\RegHelper.cpp">
+ </File>
+ <File
+ RelativePath=".\stdafx.cpp">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"/>
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ <File
+ RelativePath=".\MainPropSheet.h">
+ </File>
+ <File
+ RelativePath=".\MonoCtrl2.h">
+ </File>
+ <File
+ RelativePath=".\PropPage1.h">
+ </File>
+ <File
+ RelativePath=".\PropPage2.h">
+ </File>
+ <File
+ RelativePath=".\RegHelper.h">
+ </File>
+ <File
+ RelativePath=".\Resource.h">
+ </File>
+ <File
+ RelativePath=".\stdafx.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+ <File
+ RelativePath=".\res\MonoCtrl2.ico">
+ </File>
+ <File
+ RelativePath=".\MonoCtrl2.rc">
+ </File>
+ <File
+ RelativePath=".\res\MonoCtrl2.rc2">
+ </File>
+ </Filter>
+ <File
+ RelativePath=".\res\MonoCtrl2.manifest">
+ </File>
+ <File
+ RelativePath=".\ReadMe.txt">
+ </File>
+ </Files>
+ <Globals>
+ <Global
+ Name="RESOURCE_FILE"
+ Value="MonoCtrl2.rc"/>
+ </Globals>
+</VisualStudioProject>
148 MonoLaunch/MonoCtrl2/MonoCtrl2Dlg.cpp
@@ -0,0 +1,148 @@
+// MonoCtrl2Dlg.cpp : implementation file
+//
+
+#include "stdafx.h"
+#include "MonoCtrl2.h"
+#include "MonoCtrl2Dlg.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#endif
+
+
+// CAboutDlg dialog used for App About
+
+class CAboutDlg : public CDialog
+{
+public:
+ CAboutDlg();
+
+// Dialog Data
+ enum { IDD = IDD_ABOUTBOX };
+
+ protected:
+ virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
+
+// Implementation
+protected:
+ DECLARE_MESSAGE_MAP()
+};
+
+CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
+{
+}
+
+void CAboutDlg::DoDataExchange(CDataExchange* pDX)
+{
+ CDialog::DoDataExchange(pDX);
+}
+
+BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
+END_MESSAGE_MAP()
+
+
+// CMonoCtrl2Dlg dialog
+
+
+
+CMonoCtrl2Dlg::CMonoCtrl2Dlg(CWnd* pParent /*=NULL*/)
+ : CDialog(CMonoCtrl2Dlg::IDD, pParent)
+{
+ m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
+}
+
+void CMonoCtrl2Dlg::DoDataExchange(CDataExchange* pDX)
+{
+ CDialog::DoDataExchange(pDX);
+}
+
+BEGIN_MESSAGE_MAP(CMonoCtrl2Dlg, CDialog)
+ ON_WM_SYSCOMMAND()
+ ON_WM_PAINT()
+ ON_WM_QUERYDRAGICON()
+ //}}AFX_MSG_MAP
+END_MESSAGE_MAP()
+
+
+// CMonoCtrl2Dlg message handlers
+
+BOOL CMonoCtrl2Dlg::OnInitDialog()
+{
+ CDialog::OnInitDialog();
+
+ // Add "About..." menu item to system menu.
+
+ // IDM_ABOUTBOX must be in the system command range.
+ ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
+ ASSERT(IDM_ABOUTBOX < 0xF000);
+
+ CMenu* pSysMenu = GetSystemMenu(FALSE);
+ if (pSysMenu != NULL)
+ {
+ CString strAboutMenu;
+ strAboutMenu.LoadString(IDS_ABOUTBOX);
+ if (!strAboutMenu.IsEmpty())
+ {
+ pSysMenu->AppendMenu(MF_SEPARATOR);
+ pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
+ }
+ }
+
+ // Set the icon for this dialog. The framework does this automatically
+ // when the application's main window is not a dialog
+ SetIcon(m_hIcon, TRUE); // Set big icon
+ SetIcon(m_hIcon, FALSE); // Set small icon
+
+ // TODO: Add extra initialization here
+
+ return TRUE; // return TRUE unless you set the focus to a control
+}
+
+void CMonoCtrl2Dlg::OnSysCommand(UINT nID, LPARAM lParam)
+{
+ if ((nID & 0xFFF0) == IDM_ABOUTBOX)
+ {
+ CAboutDlg dlgAbout;
+ dlgAbout.DoModal();
+ }
+ else
+ {
+ CDialog::OnSysCommand(nID, lParam);
+ }
+}
+
+// If you add a minimize button to your dialog, you will need the code below
+// to draw the icon. For MFC applications using the document/view model,
+// this is automatically done for you by the framework.
+
+void CMonoCtrl2Dlg::OnPaint()
+{
+ if (IsIconic())
+ {
+ CPaintDC dc(this); // device context for painting
+
+ SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0);
+
+ // Center icon in client rectangle
+ int cxIcon = GetSystemMetrics(SM_CXICON);
+ int cyIcon = GetSystemMetrics(SM_CYICON);
+ CRect rect;
+ GetClientRect(&rect);
+ int x = (rect.Width() - cxIcon + 1) / 2;
+ int y = (rect.Height() - cyIcon + 1) / 2;
+
+ // Draw the icon
+ dc.DrawIcon(x, y, m_hIcon);
+ }
+ else
+ {
+ CDialog::OnPaint();
+ }
+}
+
+// The system calls this function to obtain the cursor to display while the user drags
+// the minimized window.
+HCURSOR CMonoCtrl2Dlg::OnQueryDragIcon()
+{
+ return static_cast<HCURSOR>(m_hIcon);
+}
31 MonoLaunch/MonoCtrl2/MonoCtrl2Dlg.h
@@ -0,0 +1,31 @@
+// MonoCtrl2Dlg.h : header file
+//
+
+#pragma once
+
+
+// CMonoCtrl2Dlg dialog
+class CMonoCtrl2Dlg : public CDialog
+{
+// Construction
+public:
+ CMonoCtrl2Dlg(CWnd* pParent = NULL); // standard constructor
+
+// Dialog Data
+ enum { IDD = IDD_MONOCTRL2_DIALOG };
+
+ protected:
+ virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
+
+
+// Implementation
+protected:
+ HICON m_hIcon;
+
+ // Generated message map functions
+ virtual BOOL OnInitDialog();
+ afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
+ afx_msg void OnPaint();
+ afx_msg HCURSOR OnQueryDragIcon();
+ DECLARE_MESSAGE_MAP()
+};
124 MonoLaunch/MonoCtrl2/PropPage1.cpp
@@ -0,0 +1,124 @@
+// PropPage1.cpp : implementation file
+//
+
+#include "stdafx.h"
+#include "MonoCtrl2.h"
+#include "PropPage1.h"
+#include ".\proppage1.h"
+
+
+// CPropPage1 dialog
+
+IMPLEMENT_DYNAMIC(CPropPage1, CPropertyPage)
+
+CPropPage1::CPropPage1() : CPropertyPage(CPropPage1::IDD), m_strDefaultCLR(_T(""))
+{
+}
+
+CPropPage1::~CPropPage1()
+{
+}
+
+void CPropPage1::DoDataExchange(CDataExchange* pDX)
+{
+ CPropertyPage::DoDataExchange(pDX);
+ DDX_Control(pDX, IDC_VERSIONS_LIST, m_ctrlVersionListBx);
+ DDX_Text(pDX, IDC_SELECTEDCLR_EDT, m_strDefaultCLR);
+}
+
+BEGIN_MESSAGE_MAP(CPropPage1, CPropertyPage)
+ ON_LBN_SELCHANGE(IDC_VERSIONS_LIST, OnLbnSelchangeVersionsList)
+END_MESSAGE_MAP()
+
+
+// CPropPage1 message handlers
+
+BOOL CPropPage1::OnInitDialog()
+{
+ CPropertyPage::OnInitDialog();
+
+ // TODO: Add extra initialization here
+ Populate();
+
+ return TRUE; // return TRUE unless you set the focus to a control
+ // EXCEPTION: OCX Property Pages should return FALSE
+}
+
+void CPropPage1::OnLbnSelchangeVersionsList()
+{
+ CString strSelected;
+
+ m_ctrlVersionListBx.GetText(m_ctrlVersionListBx.GetCurSel(), strSelected);
+ m_strDefaultCLR = strSelected;
+
+ UpdateData(FALSE);
+}
+
+void CPropPage1::Populate(void)
+{
+ LRESULT lRc = 0;
+ HKEY hkMonoKey = NULL;
+ DWORD dwType = REG_SZ;
+ DWORD dwcbValLen = REGBUFFLEN;
+ BYTE cbVal[REGBUFFLEN];
+ CString strDefaultCLR;
+ DWORD dwIdx = 0;
+ TCHAR szName[REGBUFFLEN];
+ FILETIME theFileTime;
+
+ ZeroMemory(cbVal, sizeof(cbVal));
+
+ lRc = ::RegOpenKeyEx(
+ HKEY_LOCAL_MACHINE,
+ _T("SOFTWARE\\Novell\\Mono"),
+ 0,
+ KEY_READ,
+ &hkMonoKey
+ );
+
+ // Check for Errors opening the key
+ if(lRc != ERROR_SUCCESS)
+ {
+ AfxMessageBox(_T("Could not open the Novell\\Mono registry key."));
+ return;
+ }
+
+ do
+ {
+ ZeroMemory(szName, REGBUFFLEN);
+ dwcbValLen = REGBUFFLEN;
+
+ lRc = ::RegEnumKeyEx(
+ hkMonoKey,
+ dwIdx++,
+ szName,
+ &dwcbValLen,
+ NULL,
+ NULL,
+ NULL,
+ &theFileTime
+ );
+
+ if(lRc == ERROR_NO_MORE_ITEMS)
+ {
+ break;
+ }
+
+ this->m_ctrlVersionListBx.AddString(szName);
+
+ }
+ while(lRc == ERROR_SUCCESS);
+
+ if(hkMonoKey != NULL)
+ {
+ ::RegCloseKey(hkMonoKey);
+ }
+}
+
+
+void CPropPage1::OnOK()
+{
+ UpdateData(TRUE);
+
+ CPropertyPage::OnOK();
+}
31 MonoLaunch/MonoCtrl2/PropPage1.h
@@ -0,0 +1,31 @@
+#pragma once
+#include "afxwin.h"
+
+
+// CPropPage1 dialog
+
+class CPropPage1 : public CPropertyPage
+{
+ DECLARE_DYNAMIC(CPropPage1)
+
+public:
+ CPropPage1();
+ virtual ~CPropPage1();
+
+// Dialog Data
+ enum { IDD = IDD_PROPPAGE_1 };
+
+protected:
+ virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
+
+ DECLARE_MESSAGE_MAP()
+public:
+ // Version List box
+ CListBox m_ctrlVersionListBx;
+ CString m_strDefaultCLR;
+
+ void Populate(void);
+ virtual BOOL OnInitDialog();
+ afx_msg void OnLbnSelchangeVersionsList();
+ virtual void OnOK();
+};
31 MonoLaunch/MonoCtrl2/PropPage2.cpp
@@ -0,0 +1,31 @@
+// PropPage2.cpp : implementation file
+//
+
+#include "stdafx.h"
+#include "MonoCtrl2.h"
+#include "PropPage2.h"
+
+
+// CPropPage2 dialog
+
+IMPLEMENT_DYNAMIC(CPropPage2, CPropertyPage)
+CPropPage2::CPropPage2()
+ : CPropertyPage(CPropPage2::IDD)
+{
+}
+
+CPropPage2::~CPropPage2()
+{
+}
+
+void CPropPage2::DoDataExchange(CDataExchange* pDX)
+{
+ CPropertyPage::DoDataExchange(pDX);
+}
+
+
+BEGIN_MESSAGE_MAP(CPropPage2, CPropertyPage)
+END_MESSAGE_MAP()
+
+
+// CPropPage2 message handlers
22 MonoLaunch/MonoCtrl2/PropPage2.h
@@ -0,0 +1,22 @@
+#pragma once
+
+
+
+// CPropPage2 dialog
+
+class CPropPage2 : public CPropertyPage
+{
+ DECLARE_DYNAMIC(CPropPage2)
+
+public:
+ CPropPage2();
+ virtual ~CPropPage2();
+
+// Dialog Data
+ enum { IDD = IDD_PROPPAGE_2 };
+
+protected:
+ virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
+
+ DECLARE_MESSAGE_MAP()
+};
103 MonoLaunch/MonoCtrl2/README.txt
@@ -0,0 +1,103 @@
+================================================================================
+ MICROSOFT FOUNDATION CLASS LIBRARY : MonoCtrl2 Project Overview
+===============================================================================
+
+The application wizard has created this MonoCtrl2 application for
+you. This application not only demonstrates the basics of using the Microsoft
+Foundation Classes but is also a starting point for writing your application.
+
+This file contains a summary of what you will find in each of the files that
+make up your MonoCtrl2 application.
+
+MonoCtrl2.vcproj
+ This is the main project file for VC++ projects generated using an application wizard.
+ It contains information about the version of Visual C++ that generated the file, and
+ information about the platforms, configurations, and project features selected with the
+ application wizard.
+
+MonoCtrl2.h
+ This is the main header file for the application. It includes other
+ project specific headers (including Resource.h) and declares the
+ CMonoCtrl2App application class.
+
+MonoCtrl2.cpp
+ This is the main application source file that contains the application
+ class CMonoCtrl2App.
+
+MonoCtrl2.rc
+ This is a listing of all of the Microsoft Windows resources that the
+ program uses. It includes the icons, bitmaps, and cursors that are stored
+ in the RES subdirectory. This file can be directly edited in Microsoft
+ Visual C++. Your project resources are in 1033.
+
+res\MonoCtrl2.ico
+ This is an icon file, which is used as the application's icon. This
+ icon is included by the main resource file MonoCtrl2.rc.
+
+res\MonoCtrl2.rc2
+ This file contains resources that are not edited by Microsoft
+ Visual C++. You should place all resources not editable by
+ the resource editor in this file.
+
+/////////////////////////////////////////////////////////////////////////////
+
+The application wizard creates one dialog class:
+MonoCtrl2Dlg.h, MonoCtrl2Dlg.cpp - the dialog
+ These files contain your CMonoCtrl2Dlg class. This class defines
+ the behavior of your application's main dialog. The dialog's template is
+ in MonoCtrl2.rc, which can be edited in Microsoft Visual C++.
+/////////////////////////////////////////////////////////////////////////////
+
+Other Features:
+
+ActiveX Controls
+ The application includes support to use ActiveX controls.
+/////////////////////////////////////////////////////////////////////////////
+
+Other standard files:
+
+StdAfx.h, StdAfx.cpp
+ These files are used to build a precompiled header (PCH) file
+ named MonoCtrl2.pch and a precompiled types file named StdAfx.obj.
+
+Resource.h
+ This is the standard header file, which defines new resource IDs.
+ Microsoft Visual C++ reads and updates this file.
+
+MonoCtrl2.manifest
+ Application manifest files are used by Windows XP to describe an applications
+ dependency on specific versions of Side-by-Side assemblies. The loader uses this
+ information to load the appropriate assembly from the assembly cache or private
+ from the application. The Application manifest maybe included for redistribution
+ as an external .manifest file that is installed in the same folder as the application
+ executable or it may be included in the executable in the form of a resource.
+/////////////////////////////////////////////////////////////////////////////
+
+Other notes:
+
+The application wizard uses "TODO:" to indicate parts of the source code you
+should add to or customize.
+
+If your application uses MFC in a shared DLL, and your application is in a
+language other than the operating system's current language, you will need
+to copy the corresponding localized resources MFC70XXX.DLL from the Microsoft
+Visual C++ CD-ROM under the Win\System directory to your computer's system or
+system32 directory, and rename it to be MFCLOC.DLL. ("XXX" stands for the
+language abbreviation. For example, MFC70DEU.DLL contains resources
+translated to German.) If you don't do this, some of the UI elements of
+your application will remain in the language of the operating system.
+
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+License:
+
+The MIT License
+Copyright (c) 2004-2006 Francisco "Paco" Martinez
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Microsoft .NET and Windows are registered trademarks of
+Microsoft Corporation.
104 MonoLaunch/MonoCtrl2/RegHelper.cpp
@@ -0,0 +1,104 @@
+#include "StdAfx.h"
+#include ".\reghelper.h"
+
+CRegHelper::CRegHelper(void)
+{
+}
+
+CRegHelper::~CRegHelper(void)
+{
+}
+
+// Retrieves from the registry the default CLR
+LRESULT CRegHelper::GetDefaultCLR(LPTSTR szBuffer, DWORD dwBuffLen)
+{
+ LRESULT lRc = 0;
+ HKEY hkMonoKey = NULL;
+ DWORD dwType = REG_SZ;
+ DWORD dwcbValLen = REGBUFFLEN;
+ BYTE cbVal[REGBUFFLEN];
+ DWORD dwIdx = 0;
+
+ ZeroMemory(cbVal, sizeof(cbVal));
+
+ lRc = ::RegOpenKeyEx(
+ HKEY_LOCAL_MACHINE,
+ _T("SOFTWARE\\Novell\\Mono"),
+ 0,
+ KEY_READ,
+ &hkMonoKey
+ );
+
+ // Check for Errors opening the key
+ if(lRc != ERROR_SUCCESS)
+ {
+ AfxMessageBox(_T("Could not open the Novell\\Mono registry key."));
+ return -1;
+ }
+
+ lRc = ::RegQueryValueEx(
+ hkMonoKey,
+ _T("DefaultCLR"),
+ 0,
+ &dwType,
+ cbVal,
+ &dwcbValLen
+ );
+
+ if(lRc == ERROR_SUCCESS)
+ {
+ if(dwcbValLen > dwBuffLen)
+ {
+ szBuffer = NULL;
+ return dwcbValLen;
+ }
+ else
+ {
+ lstrcpy(szBuffer, (LPCTSTR)cbVal);
+ }
+ }
+
+ ::RegCloseKey(hkMonoKey);
+
+ return 0;
+}
+
+// Retrieves from the registry the default CLR
+LRESULT CRegHelper::SetDefaultCLR(LPCTSTR szBuffer)
+{
+ LRESULT lRc = 0;
+ HKEY hkMonoKey = NULL;
+ DWORD dwType = REG_SZ;
+ DWORD dwcbValLen = 0;
+ DWORD dwIdx = 0;
+
+ lRc = ::RegOpenKeyEx(
+ HKEY_LOCAL_MACHINE,
+ _T("SOFTWARE\\Novell\\Mono"),
+ 0,
+ KEY_WRITE,
+ &hkMonoKey
+ );
+
+ // Check for Errors opening the key
+ if(lRc != ERROR_SUCCESS)
+ {
+ AfxMessageBox(_T("Could not open the Novell\\Mono registry key."));
+ return -1;
+ }
+
+ dwcbValLen = ::lstrlen((LPCTSTR)szBuffer);
+
+ lRc = ::RegSetValueEx(
+ hkMonoKey,
+ _T("DefaultCLR"),
+ 0,
+ dwType,
+ (const BYTE*)szBuffer,
+ dwcbValLen
+ );
+
+ ::RegCloseKey(hkMonoKey);
+
+ return 0;
+}
14 MonoLaunch/MonoCtrl2/RegHelper.h
@@ -0,0 +1,14 @@
+#pragma once
+
+class CRegHelper
+{
+public:
+ // Retrieves from the registry the default CLR
+ static LRESULT GetDefaultCLR(LPTSTR szBuffer, DWORD dwBuffLen);
+
+ // Retrieves from the registry the default CLR
+ static LRESULT SetDefaultCLR(LPCTSTR szBuffer);
+
+ CRegHelper(void);
+ ~CRegHelper(void);
+};
BIN MonoLaunch/MonoCtrl2/res/MonoCtrl2.ico
Binary file not shown.
22 MonoLaunch/MonoCtrl2/res/MonoCtrl2.manifest
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+<assemblyIdentity
+ version="1.0.0.0"
+ processorArchitecture="X86"
+ name="Microsoft.Windows.MonoCtrl2"
+ type="win32"
+/>
+<description>Your app description here</description>
+<dependency>
+ <dependentAssembly>
+ <assemblyIdentity