링크: http://docs.nuget.org/consume/package-manager-console

posted by 뚱2

링크: http://www.visualstudio.com/en-us/products/visual-studio-community-vs


posted by 뚱2

링크 : http://www.hoons.net/Board/CSHAPTIP/Content/59030

 

 

posted by 뚱2

출처 : http://www.codeproject.com/Articles/309781/Advanced-Debugging-in-Visual-Studio

 

Download AdvancedDebugging.zip - 28.2 KB (Visual Studio 2010 Solution)

Introduction

Many of us developers do not look beyond the basic F9, F10, F11, F5 and Watch windows while debugging in Visual Studio. Due to this we end up wasting hours debugging an issue or simulating a condition which ideally could have been achieved in a matter of minutes if we utilized the rich debugging features available out of the box in Visual Studio.

Advanced debugging tips are scattered all over the web but I thought that a consolidated list would be very useful for developers to embrace and start using the techniques.

Environment

The tips in this article should work in Visual Studio 2008/ 2010. Many of these might still be valid for the next version of Visual Studio.

Tip List

To make going through this article easier, I am breaking it into six different tips which I will present with the help of sample code and screenshots.

1. Magic of "Make Object Id"

2. Attach to process - using macro

3. Immediate Window
- Calling functions directly
- Setting and Displaying variables

4. Debugging a Windows Service

5. Having fun with breakpoints
- Trace Points
- Condition
- Hit Count
- Filter
- Changing breakpoint location

6. Locals/Auto/ Call Stack

Bonus Tip!
Enable Sound when Breakpoint is hit

1. Magic of “Make Object Id”

Sometimes we want to track an object even after it went out of the scope. We may need this ability to debug an issue which requires us to track the object until it is garbage collected. This ability is provided with the Object Id feature in Visual Studio debugger. Follow the below steps to try it yourself.

  1. Set a Breakpoint on a line of code which uses a variable your want to track as shown below.

image001.png

  1. Run your application in debug mode and let it stop at the Breakpoint.
  2. Right Click on str and click Add Watch.
  3. In your Watch 1 window, right-click the object variable str and choose "Make Object Id" from the context menu.

    image003.png

  4. You will now see 1# appended in the Value column. This is the unique ID given by the debugger to your variable for the current debug session.

    image005.png

  1. We can track the object value using this ID even after str goes out of scope as shown below. Simply put the object id 1# in the watch window to watch its value.

image007.png

  1. If we continue the iteration of for loop str changes its value but 1# remains the same. This tells us that although the previous str object has gone out of scope we can still keep track of its value using the Object Id that we assigned to it.

image009.png

  1. Lastly if you move out of the function then all instances of str would go out of scope and you would no longer be able to track str using the Watch window. It gets grayed out. However the Object Id 1# is still active and you can continue to track its value as you move through other functions.

image011.png

Note: As the name suggests, this works only with reference and not value types. Makes sense as value types will get stored on the stack and will get popped out as soon as the scope ends. So they would ideally not depend the Garbage Collector to get cleaned up.

2. Attach to process – using macro

There are many tasks that we do in Visual Studio that are repetitive and which can be automated using macros. One such example is attaching to process for debugging. Having the ability to debug an existing running process (Ex: Process of a .net console application exe) is a common requirement. The usual way would be using the Attach To Process window from Debug -> Attach To Process in Visual Studio. But this can become cumbersome and irritating if we have to do it again and again to test iterative changes. This is where macros come to our rescue.

1. Create a simple console application with a Main method and a method TestAttachToProcessMacro shown below. Make a call to this method from the Main function.

image013.png

2. Build the console application. This will generate the exe file in the debug folder. Double click and start the application using this exe.

3. The first break point shown in the code above will not be hit (as we are not yet debugging) and you will see the below output in console window.

image015.png

4. We want to debug from the second breakpoint by attaching to this process so, Now we start recording our macro in 5 simple steps –

i. Click Record TemporaryMacro from the Tool -> Macros menu as shown below:

image017.png

ii. Recording is started. Now perform the necessary actions to attach to the process as below:

Click Debug -> Attach to Process

image019.png

In the popup below find your process and click Attach.

image021.png

iii. Stop recording the macro using Tools -> Macros as below:
image023.png

iv. Save the macro using Tools -> Macros as below:

image025.png

v. Upon saving, the macro will appear in the Macro Explorer. I have named it AttachToMyProgram.

image027.png

5. Lastly we can also place a shortcut to this macro on the Debug toolbar to make things even simpler.


i. Go to Tools -> Customize -> Commands and under Toolbar dropdown select Debug as below:

image029.png

ii. Hit the Add Command button and on the below popup select macros under Categories and AttachToMyProgram under commands:

image031.png

iii. Now from under the Modify Selection rename the command as shown below:

image033.png

iv. Now the AttachToMyProgram shortcut show appear in the Debug toolbar as shown below:

image035.png

6. Now close the console application and start again. We will again see the “I am started” message. Now simply hit the AttachToMyProcess shortcut on the Debug bar and press any key in the console application window. There you are! You are in the debug session and the second breakpoint is hit. Now you can easily attach to your process with a click of a button.

image037.png

3. Immediate window

So many times we write a function and wish to debug just that function directly, again and again until it gives the output we need. Many of us have been running the entire application in effort to reach that function every time we debug. Well, that’s unnecessary. This is where the Immediate window comes is handy. You can open it using the keyboard shortcut Ctrl + Alt + I.

And this is how it works:

Calling functions directly

Let us try to call the below function directly from the Immediate window:

image039.png

We can call this function from Immediate window directly as below:

image041.png

Upon hitting enter in Immediate window, the breakpoint in the TestImmediateWindow1() function is hit without you having to debug the entire application.

image043.png

On proceeding you get the output in the Immediate window too as below:

image045.png

You can play around with the _test variable by changing its values and testing the reverse output:

image047.png

Setting & Displaying variables

We may want to pass a variable to the function we call from the Immediate window. Lets take an example of a function below:

image051.png

Using commands in the Immediate window as shown below we can declare, set and pass a variable to our function.

image049.png

Below is yet another example to call a function passing a complex object type like object of class Employee.

image055.jpg

Immediate window commands to test the function:

image057.jpg

There is much more you can do with the Immediate window but I leave it up to you to explore more if interested.

4. Debugging a Windows Service

Debugging the windows service can become a daunting task if you are not aware about this tip. You would build and deploy the service and start it. Then from Visual Studio you would use Attach to Process to start debugging. Even then if you need to debug what happens in the OnStart method, then you would have to do a Thread.Sleep() or something so that the OnStart method waits for you while you attach to the process. We can avoid all the pain by this simple tip.

Step 1: Set the Output type of the Windows Service to Console Application:

image002.png

Step 2 : Next get rid of the Program.cs file and instead paste the below code in the Service file which inherits from ServiceBase. That’s it. Now you can run the windows service in debug and it will run as a console application. Or you can deploy as usual and it will function as a windows service.

partial class MyService : ServiceBase
    {
        public static void Main(string[] args)
        {
            /*EDIT: 18th January 2012
             * As per suggestion from Blaise in his commments I have added the Debugger.Launch condition so that you 
             * can attach a debugger to the published service when it is about to start.
             * Note: Remember to either remove this code before you release to production or 
             * do not release to production only in the 'Release' configuration.
             * Ref: http://weblogs.asp.net/paulballard/archive/2005/07/12/419175.aspx
             */

            #if DEBUG
                    System.Diagnostics.Debugger.Launch();
            #endif

            /*EDIT: 18 January 2012
            Below is Psuedo code for an alternative way suggested by RudolfHenning in his comment. However, I find 
            Debugger.Launch() a better option.
                        
            #if DEBUG
                //The following code is simply to ease attaching the debugger to the service to debug the startup routine
                DateTime startTime = DateTime.Now;
                // Waiting until debugger is attached
                while ((!Debugger.IsAttached) && ((TimeSpan)DateTime.Now.Subtract(startTime)).TotalSeconds < 20)  
                {
                    RequestAdditionalTime(1000);  // Prevents the service from timeout
                    Thread.Sleep(1000);           // Gives you time to attach the debugger
                }
                // increase as needed to prevent timeouts
                RequestAdditionalTime(5000);     // for Debugging the OnStart method <- set breakpoint here,
            #endif

            */

            var service = new MyService();

            /* The flag Environment.UserInteractive is the key here. If its true means the app is running 
             * in debug mode. So manually call the functions OnStart() and OnStop() else use the ServiceBase 
             * class to handle it.*/
            if (Environment.UserInteractive)
            {
                service.OnStart(args);
                Console.WriteLine("Press any key to stop the service..");
                Console.Read();
                service.OnStop();
            }
            else
            {
                ServiceBase.Run(service);
            }
        }

        public MyService()
        {
            InitializeComponent();
        }
        protected override void OnStart(string[] args)
        {
        }
        protected override void OnStop()
        {
        }
    } 

5. Having fun with breakpoints

You can use below variations of breakpoints in isolation or combine them together and enjoy the cocktail!

Trace Points (When Hit..)

Sometimes we want to observe the value of one or more variables each time a particular line of code is executed. Doing this by setting a normal breakpoint can be very time consuming. So we usually use Console.WriteLine to print the value. Instead if it’s a temporary check using TracePoints is better. It serves the same purpose as a Console.WriteLine would. The advantage is that you don’t have to disturb the code by adding the your Console.WriteLine and risk forgetting to remove it when done. Better still, this way you can utilize other features of breakpoint by superimposing different conditions of breakpoint on a TracePoint.

Lets see a trace point in action.

Set a break point at call to ReverseString function as shown below.

image010.png

Then right click and click "When Hit.." then check Print a message. In test box copy "Value of reverseMe = {reverseMe}". Keep "Continue Execution" checked and click OK.

image077.png

image004.jpg

The breakpoint will get converted into a TracePoint (diamond shaped) as shown below.

image079.jpg

Now whenever the breakpoint is hit, it does not break in the code but continues execution and you will see the value of reverseMe variable at each hit as below in the output window:

image080.png

Condition

Condition breakpoints can be used to avoid having to write extra if/ else conditions in our code if we want a breakpoint to be hit only for a particular value.

Right click the tracepoint we set above and click Condition from under Breakpoints. Then type "i==45" in condition text box & click OK. (IMP: NEVER use single "=" in condition. Always use "==".)

Now the breakpoint will be activated only when i = 45; so the tracepoint should print only “Live45”.

image073.jpg

image074.jpg

Hit Count

Hit count can be used to find out how many times a breakpoint is hit. Also you can choose when you want break at the breakpoint.Change the Condition breakpoint to i > 45. Then Right Click -> Breakpoint -> Hit Count. Select "break when hit count is a multiple of " and type 5 as the value. Click OK.

image075.png

Now the breakpoint will be hit after every 5 iterations. Notice below output is effect of both the Condition and the Hit Count breakpoint.

image078.png

The hit count shown below says that the breakpoint was hit 54 times between from i = 46 to i = 99, but it broke the execution only after every 5 iterations.

image081.png

Filter

Useful for multi threaded applications. If multiple threads are calling the same function, you can use filter to specify on which thread should the breakpoint be hit.

Right Click -> Breakpoint -> Filter

image012.jpg

Changing Breakpoint Location

If you wish to move the breakpoint to a different line then use this option.

image082.jpg

6. Locals/ Autos/ Call Stack

The following three windows can come in handy while debugging. You can access them after you start debugging. Go to Debug -> Windows in the Visual Studio menu bar.

AUTOS: The Autos window displays variables used in the current statement and the previous statement. Helps you concentrate only on the variables being used in and around the current line.

(For Visual Basic.Net, it displays variables in the current statement and three statements on either side of the current statement.)

LOCALS: The Locals window displays variables local to the current context. You can observe values of local variables in a function here. Note that class level variable will not be visible under locals.

CALL STACK: The Call Stack displays the entire tree of function calls leading to the current function call. Can help you trace back the culprit!

Bonus Tip!

Enable Sound when Breakpoint is hit

1. Go to Control Panel -> Sounds and Audio Devices (Windows XP). Its Control Panel -> Sound in Windows 7.

2. Find and Select “Breakpoint Hit” under Program events in Sounds tab. (see pic below)

3. Choose the sound of your choice and click OK.

4. Now when a breakpoint is hit, you will hear the sound!

image006.png

History

  • 18th January 2012: Incorporated Blaise's suggestion to add Debugger.Launch() option in Tip no. 4.
  • 23rd January 2012: Added a note at the end of tip 1 - Make Object Id; as per suggestion by Shivprasad Koirala.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

posted by 뚱2

 

Visual Studio 설치관리자 배포 : http://msdn.microsoft.com/ko-kr/library/vstudio/2kt85ked(v=vs.100).aspx

사용자 지정 작업 만들기 : http://msdn.microsoft.com/ko-kr/library/vstudio/d9k65z2d(v=vs.100).aspx

참고 : http://styletigger.tistory.com/21

 

 

추가 : http://msdn.microsoft.com/ko-kr/library/vstudio/d9k65z2d(v=vs.100).aspx

 

C++로 만드는 방법 : http://www.codeproject.com/Articles/335516/Custom-Action-in-Visual-Studio-setup-projects

http://msdn.microsoft.com/en-us/library/windows/desktop/aa370134(v=vs.85).aspx

 

 

UINT __stdcall MyCustomAction(MSIHANDLE hInstall)
{
    TCHAR* szValueBuf = NULL;
    DWORD cchValueBuf = 0;
    UINT uiStat =  MsiGetProperty(hInstall, TEXT("MyProperty"), TEXT(""), &cchValueBuf);
    //cchValueBuf now contains the size of the property's string, without null termination
    if (ERROR_MORE_DATA == uiStat)
    {
        ++cchValueBuf; // add 1 for null termination
        szValueBuf = new TCHAR[cchValueBuf];
        if (szValueBuf)
        {
            uiStat = MsiGetProperty(hInstall, TEXT("MyProperty"), szValueBuf, &cchValueBuf);
        }
    }
    if (ERROR_SUCCESS != uiStat)
    {
        if (szValueBuf != NULL)
           delete[] szValueBuf;
        return ERROR_INSTALL_FAILURE;
    }

    // custom action uses MyProperty
    // ...

    delete[] szValueBuf;

    return ERROR_SUCCESS;
}

posted by 뚱2

링크 : http://blogs.msdn.com/b/eva/archive/2009/03/24/visual-studio-tip-3.aspx 

 

posted by 뚱2

링크 : http://www.viva64.com/en/b/0169/

 

posted by 뚱2

프로그램을 개발하다 보면은 툴에 익숙지 않아서 은근히 시간을 잡아 먹는 경우가 있다.

 

VC++을 하다가 Java를 할때 답답했던 첫번째는 많은 import를 어떻게 해야 하나 였다.

 

물론 이클립스에서 CTRL+SHIFT+O라는 환상의 단축키가 있다.

 

이런 비슷한게 C#에서 using문인데 찾아보니 위에것 정도 되는건 아니지만

 

고를수 있게 나오는 정도는 된다.

 

단축키는 CTRL+. 이다.

 

 

 

필요한 클래스에 커서를 놓고 'CTRL + .' 을 누르면 위에 이미지와 같이 인텔리센스 기능이 된다. 선택후 Enter 하면은 자동 포함 된다.

posted by 뚱2

링크 : http://msdn.microsoft.com/ko-kr/vstudio/vextend/

링크 : http://msdn.microsoft.com/ko-kr/library/dd885119(v=vs.100).aspx 

posted by 뚱2

* Productivity Power Tools

다운로드 : http://visualstudiogallery.msdn.microsoft.com/d0d33361-18e2-46c0-8ff2-4adea1e34fef 

참고 : http://blog.naver.com/empty_wagon?Redirect=Log&logNo=20123797318 

 

* anksvn

다운로드 : http://visualstudiogallery.msdn.microsoft.com/E721D830-7664-4E02-8D03-933C3F1477F2 

홈페이지: http://ankhsvn.open.collab.net/ 

참고 : http://minjang.egloos.com/2827484

posted by 뚱2

링크 : http://msdn.microsoft.com/query/dev10.query?appId=Dev10IDEF1&l=KO-KR&k=k(VS.REGULAREXPRESSIONBUILDER);k(TargetFrameworkMoniker-%22.NETFRAMEWORK%2cVERSION%3dV3.5%22)&rd=true 

posted by 뚱2

링크 : http://support.microsoft.com/?id=837910 


방법 1

추가 기능 DLL 및 추가 기능 DLL을 만드는 데 사용 되는 코드를 포함 VB6 마우스 Wheel.exe 파일을 다운로드 합니다.
  1. VB6 마우스 Wheel.exe 파일을 다운로드 합니다. 다음 파일 Microsoft 다운로드 센터에서 다운로드할 수 있습니다.
    다운로드
    지금 VB6MouseWheel.EXE 패키지 다운로드

    Microsoft 지원 파일을 다운로드 하는 방법에 대 한 자세한 내용은 Microsoft 기술 자료의 다음 문서 번호를 클릭 합니다.
    119591 온라인 서비스 로부터 Microsoft 지원 파일을 구하는 방법
    Microsoft는이 파일을 검색. Microsoft는 파일을 게시 한 날짜에 사용할 수 있었던 최신 바이러스 검색 소프트웨어를 사용 합니다. 파일은 무단으로 변경할 수 없도록 보안이 향상 된 서버에 저장 됩니다.
  2. 시작실행을 차례로 형식 regsvr32 <path> \VB6IDEMouseWheelAddin.dll, 다음 확인 을 클릭 합니다..
  3. Visual Basic 6.0을 시작 합니다.
  4. 추가 기능클릭 한 다음 추가 기능 관리자 를 클릭 합니다..
  5. 추가 기능 관리자 목록에서 MouseWheel Fix 를 클릭 합니다..
  6. 로드/언로드 확인란을 선택 합니다 클릭 한 다음 시작할 때 로드 확인란을 선택 합니다.
  7. 확인 을 클릭 합니다..
Visual Basic 6.0 추가 기능 DLL을 빌드할 수도 있습니다. 이렇게 하면 추가 기능의 DLL 자동으로 등록 됩니다. 다음 추가 기능 DLL을 사용 하려면 7-4 단계를 수행 하십시오 수 있습니다. 추가 기능 DLL을 빌드하려면 파일 메뉴에서VB6IDEMouseWheelAddin.dll 만들기 를 클릭 합니다.

방법 2

Microsoft IntelliPoint 소프트웨어의 이전 버전을 반환 합니다. 이렇게 하려면 다음과이 같이 하십시오.
  1. IntelliPoint 소프트웨어가 컴퓨터에 설치 된 4.9 버전 또는 이후 버전이 있으면 컴퓨터에서 IntelliPoint 소프트웨어를 제거 합니다.
  2. IntelliPoint 소프트웨어 버전 4.12 설치 합니다. 다음 파일 Microsoft 다운로드 센터에서 다운로드할 수 있습니다.
    다운로드
    IntelliPoint 4.12 패키지를 지금 다운로드 하십시오.

    Microsoft 지원 파일을 다운로드 하는 방법에 대 한 자세한 내용은 Microsoft 기술 자료의 다음 문서 번호를 클릭 합니다.
    119591 온라인 서비스 로부터 Microsoft 지원 파일을 구하는 방법
    Microsoft는이 파일을 검색. Microsoft는 파일을 게시 한 날짜에 사용할 수 있었던 최신 바이러스 검색 소프트웨어를 사용 합니다. 파일은 무단으로 변경할 수 없도록 보안이 향상 된 서버에 저장 됩니다.
참고 또한이 추가 기능을 대부분의 VBA 환경에서 있습니다. 앞에서 설명한 대로 추가 기능을 설치 다음 값으로.reg 파일을 만들고 해당 레지스트리에 병합 합니다.

Windows 레지스트리 편집기 버전 5.00

HKEY_CURRENT_USER\Software\Microsoft\VBA\VBE\6.0\Addins\VB6IDEMouseWheelAddin.Connect
  • "MouseWheel Fix FriendlyName"=""
  • "CommandLineSafe" = dword: 00000000
  • "LoadBehavior" = dword: 00000000
참고 이러한 키는 HKEY_LOCAL_MACHINE 아래 넣으면 무시 될 수 있습니다.




VB6MouseWheel.EXE


posted by 뚱2

링크 : http://sonumb.tistory.com/29 


Visual Studio 2005 상에서 쓰이는 Macro 환경 변수

MacroDescription
$(ConfigurationName)

The name of the current project configuration, for example, "Debug|Any CPU".

$(OutDir)

Path to the output file directory, relative to the project directory. This resolves to the value for the Output Directory property. It includes the trailing backslash '\'.

$(DevEnvDir)

The installation directory of Visual Studio 2005 (defined with drive and path); includes the trailing backslash '\'.

$(PlatformName)

The name of the currently targeted platform. For example, "AnyCPU".

$(ProjectDir)

The directory of the project (defined with drive and path); includes the trailing backslash '\'.

$(ProjectPath)

The absolute path name of the project (defined with drive, path, base name, and file extension).

$(ProjectName)

The base name of the project.

$(ProjectFileName)

The file name of the project (defined with base name and file extension).

$(ProjectExt)

The file extension of the project. It includes the '.' before the file extension.

$(SolutionDir)

The directory of the solution (defined with drive and path); includes the trailing backslash '\'.

$(SolutionPath)

The absolute path name of the solution (defined with drive, path, base name, and file extension).

$(SolutionName)

The base name of the solution.

$(SolutionFileName)

The file name of the solution (defined with base name and file extension).

$(SolutionExt)

The file extension of the solution. It includes the '.' before the file extension.

$(TargetDir)

The directory of the primary output file for the build (defined with drive and path). It includes the trailing backslash '\'.

$(TargetPath)

The absolute path name of the primary output file for the build (defined with drive, path, base name, and file extension).

$(TargetName)

The base name of the primary output file for the build.

$(TargetFileName)

The file name of the primary output file for the build (defined as base name and file extension).

$(TargetExt)

The file extension of the primary output file for the build. It includes the '.' before the file extension.


주절 주절~ 더군다나 영어!!
이럴땐 예시를 보는게 킹왕짱입니다. . -_-

  1. 보통 UNIX와 윈도우즈에서 말하는 Path는 "파일의 이름 및 확장자를 포함하는 경로"이고 Directory는 "파일의 경로만"을 얘기합니다.
    그럼 파일의 Path가 "c:windowscmd.exe"라면 그 파일의 Directory는 "c:windows\" 인거죠. :)
    또 다른 팁은 FileName = Name + Ext 가 있습니다..
    그러면 이제 외우기 좀 쉬워지죠?

posted by 뚱2
32bit :C:\Program Files \Microsoft Visual Studio 8\SDK\v2.0\Bin
64bit : C:\Program Files (x86)\Microsoft Visual Studio 8\SDK\v2.0\Bin 
posted by 뚱2

Visual Studio 2008에서 데이터베이스에 Input, Output 하는 프로그램을 만들었습니다.

프로그램에서 Oracle에 Insert하면은 정상적으로 한글이 보이는데

파일을 읽어서 Oracle에 Insert하면은 깨지는 현상이 나타났습니다.

결국 해결은

Visual Studio 2008의 로케일을 변경해서 해결했습니다.

// 로케일을 설정
_tsetlocale(LC_ALL, _T("korean"));
// 또는 #pragma로도 가능하다.
#pragma setlocale("korean")



또한 #pragma
posted by 뚱2

Visual Assist X를 사용하면 제일 편한 기능중 하나가 .h와 .cpp간의 전환 단축키 입니다.

이걸 매크로로 구현한 글이 있어서 링크 합니다.

Visual Studio 2005, 2008에서 동작 확인했습니다.

Function OpenDocument(ByVal path As String) As Window
    If (My.Computer.FileSystem.FileExists(path)) Then
        OpenDocument = DTE.ItemOperations.OpenFile(path)
    Else
        Dim filename As String
        filename = path.Substring(path.LastIndexOf("\") + 1)
        Dim item As ProjectItem
        item = DTE.Solution.FindProjectItem(filename)
        If (item IsNot Nothing) Then
            If (item.Document Is Nothing) Then
                OpenDocument = item.Open()
            Else
                OpenDocument = item.Document.ActiveWindow()
            End If
        End If
    End If
    If (OpenDocument IsNot Nothing) Then
        OpenDocument.Activate()
    End If
End 

Function Sub ToggleBetweenSourceAndHeader()
    Dim document As Document
    document = DTE.ActiveDocument
    Dim path As String
    path = document.FullName
    Dim ext_position As Integer
    ext_position = path.LastIndexOf(".")
    If (ext_position <> -1) Then
        Dim ext As String
        ext = path.Substring(ext_position)
        Dim path_without_ext As String
        path_without_ext = path.Remove(ext_position, ext.Length())
        If (ext.ToLower().Contains(".cpp")) Then     ' .cpp -> .hpp or .h
            If (OpenDocument(path_without_ext & ".hpp") Is Nothing) Then
                OpenDocument(path_without_ext & ".h")
            End If
        ElseIf (ext.ToLower().Contains(".cxx")) Then ' .cxx -> .hxx
            OpenDocument(path_without_ext & ".hxx")
        ElseIf (ext.ToLower().Contains(".cc")) Then  ' .cc -> .hh
            OpenDocument(path_without_ext & ".hh")
        ElseIf (ext.ToLower().Contains(".c")) Then
            OpenDocument(path_without_ext & ".h")
        ElseIf (ext.ToLower().Contains(".h")) Then   ' .h -> .c or .cpp
            If (OpenDocument(path_without_ext & ".c") Is Nothing) Then
                OpenDocument(path_without_ext & ".cpp")
            End If
        ElseIf (ext.ToLower().Contains(".hpp")) Then ' .hpp -> .cpp
            OpenDocument(path_without_ext & ".cpp")
        ElseIf (ext.ToLower().Contains(".hxx")) Then ' .hxx -> .cxx
            OpenDocument(path_without_ext & ".cxx")
        ElseIf (ext.ToLower().Contains(".hh")) Then  ' .hh -> .cc
            OpenDocument(path_without_ext & ".cc")
        End If
    End If
End Sub






posted by 뚱2

오늘 작업중인 노트북을 새로 밀었다.
프로젝트 진행중이던 프로그램들은 USB 하드에 백업해구도 다시 복구하니...
헉!!!! Visual Studio 2005에서 실행이 안되는 것이다.
그 첫번째 에러메세지는 공유 MFC DLL을 사용했는데 디버그용
mfc80ud.dll을 찾을 수 없다는 것이다 그래서 정적 MFC 로 컴파일 해보니
잘된다... 그래도 찜찜해서
다시 공유 DLL로 하고 직접 mfc80ud.dll을 옮겨서 해봤으나 이번에는
C 런타임 dll vmsvcr80d.dll 을 찾을수 없다고 한데..
역쉬 찾아서 넣어줬지만 이젠 알 수 없는 에러가 나버린다..
여기 저기 찾고... 별 방법을 다 해봤으나 안되는데
갑자기 든 생각이 새로 노트북을 밀면서 FAT32 방식으로 포맷을 바꿨다.
기존의 방식은 NTFS 방식이었다
결국 다시 노트북을 밀고 NTFS 방식으로 해보니
제대로 된다...
왜 이렇게 되는지 이유는 모르겠고 무엇때문에 안되는지는 알았는데
찜찜하다....
posted by 뚱2

Platform SDK 설치

IDE/Tool/Visual Studio 2008. 9. 18. 15:23

Visual Studio 만을 설치하는 것으로는 부족합니다.
VS 가 지난 97 년에 나왔고, 지금 쓰고 있는 것도 VC98 폴더명을 통해서 유추해봐도 98 년 정도에 나온 것을
대부분의 개발자들이 그대로 쓰고 있는 실정입니다.

하지만, 하루가 다르게 기존 개발환경은 업데이트 되고 있기 때문에, 98 년도에 나온 Windows 개발관련 Header 파일은
내용이 많이 부실한 상황입니다.

이런저런 이유로, MS 에서는 Platform SDK 를 내놓았습니다.
물론, 무료이고
http://www.microsoft.com/msdownload/platformsdk/sdkupdate
사이트에서 다운로드 받을 수 있습니다. 만약, 자신이 근무하는 회사가 "MSDN Universal" 을 받고 있다면, 그 때 받게 되는
묵직한 "CD" 박스에 "Platform SDK" CD 가 들어 있으니, 그걸로 설치하셔도 됩니다.

해당 웹페이지에 가면, Windows SDK 라고 해서 "Core SDK", "DirectX SDK", "Internet Development SDK", "IIS SDK",
"MDAC SDK", "Windows Installer SDK", "WMI SDK" 로 나뉘어져 있습니다.

마음같아서는 모두 설치하고 싶으시겠지만, 웹상에서 다운로드 받는 것이기 때문에 "Core SDK" 만 설치하는 데도
시간단위로 걸립니다. 나머지는 해당 분야에 맞게 골라서 설치하시면 되고, 기본적으로 꼭 "Core SDK" 는 설치를 하십시오.

"Platform SDK" 를 설치하는 경우 부가적으로 "Platform SDK" 도움말 파일도 설치가 됩니다. MS 행사에서 간혹, "MSDN
Library" 를 나누어 주는 경우가 있는데요. 그 MSDN Library 도움말의 대부분을 차지하고 있는 것이 "Platform SDK"
도움말입니다. MSDN Library 와 많은 부분에서 중복이 되기 때문에 하드 디스크의 공간이 GB 단위로 손실이 발생합니다.
더군다나, 거기다가 Visual Studio.NET 까지 설치하면 .NET 도움말에도 MSDN Library 가 있어서, 3중으로 중복된 파일이
존재하게 됩니다. 그래서 저같은 경우에는 아예 "MSDN Library" 를 제거했고, 그냥 Platform SDK 설치와 함께 제공되는
도움말을 쓰고 있습니다.

설치가 완전히 되고 나면, Visual Studio IDE 에 Platform SDK 의 존재를 알려야 됩니다. "Platform SDK" 설치과정중에
자동적으로 해주는 단계가 있는데, 그 단계를 무시했다고 해도 상관없습니다. 수동으로 다음과 같이 입력해 주면 됩니다.

VC++ IDE 에서 "Tools/Options" 메뉴에 "Directories" 탭을 누른후,

오른쪽 윗편에 "Include files" 를 선택하신 후, 다음과 같은 순서인지 확인합니다.
C:\Program Files\Microsoft Platform SDK\include
C:\Program Files\Microsoft Platform SDK\include\ATL30
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE
C:\Program Files\Microsoft Visual Studio\VC98\MFC\INCLUDE
C:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDE

"Library files" 에도 Platform SDK 의 존재를 알립니다.
C:\Program Files\Microsoft Visual Studio\VC98\LIB
C:\Program Files\Microsoft Visual Studio\VC98\MFC\LIB
C:\Program Files\Microsoft Platform SDK\lib

위에서 보면 Include File 같은 경우에 Platform SDK 폴더의 것을 상위에 놓았고, Library 의 경우에는 맨 하위에 놓은 것을
볼 수 있습니다.
왜냐면... 개발을 하다 보니, 새로 나온 Platform SDK 의 Lib 파일을 사용하는 경우, 불안정하게 동작하는 것을 많이 경험
했습니다. 그래서, 헤더파일만 위에 놓고, Lib 파일은 우선순위를 가장 아래로 두었습니다.

여러분이 저를 기준으로 삼을 필요는 없습니다. Library 역시 Platform SDK 를 가장 상위에 놓아도 됩니다. 단지, 저는 그렇게
하고 싶지 않을 뿐입니다.

출처 http://www.sysnet.pe.kr/Default.aspx?mode=2&sub=0&pageno=11&detail=1&wid=20
posted by 뚱2
Windows 2003에서 Visual Studio 2005 SP1 설치 오류 문제


Error message when you try to install a large Windows Installer package or a large Windows Installer patch package in Windows Server 2003 or in Windows XP: "Error 1718. File was rejected by digital signature policy"

SYMPTOMS

When you try to install a large Microsoft Windows Installer (.msi) package or a large Microsoft Windows Installer patch (.msp) package on a computer that is running Microsoft Windows Server 2003 or Microsoft Windows XP, you receive the following error message:
Error 1718. File FileName was rejected by digital signature policy.


CAUSE

This problem occurs when the computer has insufficient contiguous memory for Windows Server 2003 or Windows XP to verify that the .msi package or the .msp package is correctly signed.

WORKAROUND

To work around this problem, follow these steps:

1. Click Start, click Run, type control admintools, and then click OK.
2. Double-click Local Security Policy(로컬 보안 설정).
3. Click Software Restriction Policies(소프트웨어 제한 정책).
Note If no software restrictions are listed, right-click Software Restriction Policies(소프트웨어 제한 정책), and then click Create New Policy(정책 생성하기).
4. Under Object Type(개체 유형), double-click Enforcement(강요).
5. Click All users except local administrators(로컬 관리자를 제외한 모든 사용자), and then click OK.
6. Restart the computer.

Important
After you follow the previous steps, local administrators can install the .msi package or the .msp package. After the package is installed, reset the enforcement level by following the previous steps. In step 5, click All users instead of All users except local administrators.
posted by 뚱2

Visual Assist X

IDE/Tool/Visual Studio 2008. 2. 20. 18:37
Visual Studio를 더 편하게 사용하게 해주는 프로그램입니다.
Assist X에 여러가지 기능이 있지만 그중에 제일 좋은건

1. Alt+O
  C++ 프로그래머라면....
  .h 파일과 .cpp 파일을 오가는데 많이 힘들어 하실텐데요
  ALT+O로 한번에 이동 할 수 있습니다. 정말 편합니다.

2. Alt+G
  자료형이나 함수의 정의된 곳으로 이동하는 단축키 입니다.

ps. 그리고 Visual Studio에서 ctrl+Tap을 누르면 윈도우에서 Alt+Tap을 누른것과 같은
    현재 띄워놓은 창들이 리스트 형식으로 쭉~~~~ 나타납니다.
posted by 뚱2
VC++ 6.0을 정식으로 지원하는 마지막 PSDK 입니다.

http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm
posted by 뚱2