티스토리 뷰
#include <iostream>
#include <windows.h>
void foo();
#pragma managed
#pragma comment(lib, "user32.lib")
using namespace System;
int main(array<System::String ^> ^args)
{
// Call Managed Code
Console::WriteLine(L"Managed Code");
// Call Windows API Code
::MessageBox(NULL, _T("Win32 API in Managed Area"), _T("Hello"), MB_OK);
// Call Unmanaged Code
foo();
return EXIT_SUCCESS;
}
#pragma unmanaged
using namespace std;
void foo()
{
cout << "Unmanaged Code" << endl;
MessageBox(NULL, _T("Win32 API in Unmanaged Area"), _T("Hello"), MB_OK);
}
#include <windows.h>
void foo();
#pragma managed
#pragma comment(lib, "user32.lib")
using namespace System;
int main(array<System::String ^> ^args)
{
// Call Managed Code
Console::WriteLine(L"Managed Code");
// Call Windows API Code
::MessageBox(NULL, _T("Win32 API in Managed Area"), _T("Hello"), MB_OK);
// Call Unmanaged Code
foo();
return EXIT_SUCCESS;
}
#pragma unmanaged
using namespace std;
void foo()
{
cout << "Unmanaged Code" << endl;
MessageBox(NULL, _T("Win32 API in Unmanaged Area"), _T("Hello"), MB_OK);
}
'Code > C C++' 카테고리의 다른 글
[C++] Regular Expressions Class: regex (0) | 2010.04.18 |
---|---|
[C++/CLI] #pragma managed, #pragma unmanaged (0) | 2009.05.09 |
[C++] 16진수 문자열을 2진수 문자열로 변환 (0) | 2009.04.19 |
[MFC] CString Sample (0) | 2009.03.17 |
[C/C++] Dialog Test Sample Project (0) | 2008.11.11 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- tagREADYSTATE
- ScreenHunter
- 스크린캡쳐
- autohotkey
- Phalanger
- AdSense감추기
- Service pack
- java
- Automation
- DotNetMagic
- Sample Code
- Microsoft
- 애드센스숨기기
- 애드센스감추기
- windows
- c#
- AdSense숨기기
- jre
- .net framework
- WinAutomation
- registry
- download.com
- Regular Expressions
- iTextSharp
- iText
- AxWebBrowser
- 유틸리티
- Rollback Rx
- READYSTATE_COMPLETE
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
글 보관함