visual-studio-2008

How to select the version of the VC 2008 DLLs the application should be linked to?

大兔子大兔子 提交于 2020-01-10 02:05:12
问题 I'm using Visual Studio 2008 SP1 for C++. When compiling, Visual Studio needs to choose against which version of the CRT and MFC DLLs the application should be linked, version 9.0.21022.8 (= RTM), 9.0.30729.17 (= SP1) or 9.0.30729.4148 (= SP1 with security update). I'd like to know how you can choose which of both versions will be linked against. Does anyone know? Note : this is important when using a private assembly, because you need to know which versions of the VC 9.0 DLLs to copy along

Visual Studio Version Selector Doesn't open

一世执手 提交于 2020-01-09 12:39:31
问题 I have Visual Studio 2008 and 2010 installed side by side, but trying to open either a 2008 or 2010 sln file results in nothing. The hour glass comes on for about a second and then it goes away and nothing is opened. I read somewhere to relate sln file to VS directly, but I can't go that route because I don't want 2008 solutions to open with 2010. Does anyone know what the problem might be and how to fix it? 回答1: If you are running Vista or Windows 7 with the UAC enabled and have "Run this

How can I use a single Visual Studio solution to build both x86 and x64 at the same time?

妖精的绣舞 提交于 2020-01-09 12:18:10
问题 I've got an x86 Visual Studio solution with many project files in it. Some of the DLL files are designed to work as plug-ins to other applications on a user's system. We're expanding some of the DLL files to be able to support 64-bit applications. I'd like to set up the solution/projects so that just hitting "Build" will build both the x86 and x64 versions of those DLL files. The solution contains both C++ and C# projects. I realize that "Batch Build" is capable of building both, though it

How can I use a single Visual Studio solution to build both x86 and x64 at the same time?

删除回忆录丶 提交于 2020-01-09 12:18:01
问题 I've got an x86 Visual Studio solution with many project files in it. Some of the DLL files are designed to work as plug-ins to other applications on a user's system. We're expanding some of the DLL files to be able to support 64-bit applications. I'd like to set up the solution/projects so that just hitting "Build" will build both the x86 and x64 versions of those DLL files. The solution contains both C++ and C# projects. I realize that "Batch Build" is capable of building both, though it

SQL Injection prevention with Microsoft Access and VB.NET

China☆狼群 提交于 2020-01-09 11:15:02
问题 I'm a beginner in ASP.NET so I have some questions about how to prevent SQL injection in ASP.NET. My programming language is VB.NET, not C#, and I'm using Microsoft Access as my database. My questions are: How to protect my database from SQL injection? I have been reading postings from other forums and they said using parameters with stored procedures, parameters with dynamic SQL. Can they be implemented in a Microsoft Access database? 回答1: Here is a very simple ASP.NET example using a

SQL Injection prevention with Microsoft Access and VB.NET

蓝咒 提交于 2020-01-09 11:14:11
问题 I'm a beginner in ASP.NET so I have some questions about how to prevent SQL injection in ASP.NET. My programming language is VB.NET, not C#, and I'm using Microsoft Access as my database. My questions are: How to protect my database from SQL injection? I have been reading postings from other forums and they said using parameters with stored procedures, parameters with dynamic SQL. Can they be implemented in a Microsoft Access database? 回答1: Here is a very simple ASP.NET example using a

SQL Injection prevention with Microsoft Access and VB.NET

六月ゝ 毕业季﹏ 提交于 2020-01-09 11:13:16
问题 I'm a beginner in ASP.NET so I have some questions about how to prevent SQL injection in ASP.NET. My programming language is VB.NET, not C#, and I'm using Microsoft Access as my database. My questions are: How to protect my database from SQL injection? I have been reading postings from other forums and they said using parameters with stored procedures, parameters with dynamic SQL. Can they be implemented in a Microsoft Access database? 回答1: Here is a very simple ASP.NET example using a

Is there an easy way to randomize a list in VB.NET?

五迷三道 提交于 2020-01-09 03:50:06
问题 I have a list of type System.IO.FileInfo , and I would like to randomize the list. I thought I remember seeing something like list.randomize() a little while back but I cannot find where I may have seen that. My first foray into this yielded me with this function: Private Shared Sub GetRandom(ByVal oMax As Integer, ByRef currentVals As List(Of Integer)) Dim oRand As New Random(Now.Millisecond) Dim oTemp As Integer = -1 Do Until currentVals.Count = IMG_COUNT oTemp = oRand.Next(1, oMax) If Not

how do i check if a printer is installed and ready using C#?

送分小仙女□ 提交于 2020-01-09 03:41:30
问题 How do i programmatically check if a printer is installed or not (and if there is one, how do i check if it is on and ready to use?) in C# using .NET 3.5 and Visual Studio 2008? Thanks in advance, 回答1: This snippet will retrieve information about installed printers: using System.Drawing.Printing; //... foreach (string printerName in PrinterSettings.InstalledPrinters) { // Display the printer name. Console.WriteLine("Printer: {0}", printerName); // Retrieve the printer settings.

Convert to UCS2

こ雲淡風輕ζ 提交于 2020-01-09 03:39:06
问题 Is there any function in Vb.net (or C#) that encodes a string in UCS2? Thanks 回答1: Use the following functions to encode unicode string in "UCS2" format: //================> Used to encoding GSM message as UCS2 public static String UnicodeStr2HexStr(String strMessage) { byte[] ba = Encoding.BigEndianUnicode.GetBytes(strMessage); String strHex = BitConverter.ToString(ba); strHex = strHex.Replace("-", ""); return strHex; } public static String HexStr2UnicodeStr(String strHex) { byte[] ba =