body { margin:0px; padding:0px; background:#f6f6f6; color:#000000; font-size: small; } #outer-wrapper { font:normal normal 100% 'Trebuchet MS',Trebuchet,Verdana,Sans-Serif; } a { color:#DE7008; } a:hover { color:#9E5205; } a img { border-width: 0; } #content-wrapper { padding-top: 0; padding-right: 1em; padding-bottom: 0; padding-left: 1em; } @media all { div#main { float:right; width:66%; padding-top:30px; padding-right:0; padding-bottom:10px; padding-left:1em; border-left:dotted 1px #e0ad12; word-wrap: break-word; /* fix for long text breaking sidebar float in IE */ overflow: hidden; /* fix for long non-text content breaking IE sidebar float */ } div#sidebar { margin-top:20px; margin-right:0px; margin-bottom:0px; margin-left:0; padding:0px; text-align:left; float: left; width: 31%; word-wrap: break-word; /* fix for long text breaking sidebar float in IE */ overflow: hidden; /* fix for long non-text content breaking IE sidebar float */ } } @media handheld { div#main { float:none; width:90%; } div#sidebar { padding-top:30px; padding-right:7%; padding-bottom:10px; padding-left:3%; } } #header { padding-top:0px; padding-right:0px; padding-bottom:0px; padding-left:0px; margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; border-bottom:dotted 1px #e0ad12; background:#F5E39e; } h1 a:link { text-decoration:none; color:#F5DEB3 } h1 a:visited { text-decoration:none; color:#F5DEB3 } h1,h2,h3 { margin: 0; } h1 { padding-top:25px; padding-right:0px; padding-bottom:10px; padding-left:5%; color:#F5DEB3; background:#DE7008; font:normal bold 300% Verdana,Sans-Serif; letter-spacing:-2px; } h3.post-title { color:#9E5205; font:normal bold 160% Verdana,Sans-Serif; letter-spacing:-1px; } h3.post-title a, h3.post-title a:visited { color: #9E5205; } h2.date-header { margin-top:10px; margin-right:0px; margin-bottom:0px; margin-left:0px; color:#777777; font: normal bold 105% 'Trebuchet MS',Trebuchet,Verdana,Sans-serif; } h4 { color:#aa0033; } #sidebar h2 { color:#B8A80D; margin:0px; padding:0px; font:normal bold 150% Verdana,Sans-serif; } #sidebar .widget { margin-top:0px; margin-right:0px; margin-bottom:33px; margin-left:0px; padding-top:0px; padding-right:0px; padding-bottom:0px; padding-left:0px; font-size:95%; } #sidebar ul { list-style-type:none; padding-left: 0; margin-top: 0; } #sidebar li { margin-top:0px; margin-right:0px; margin-bottom:0px; margin-left:0px; padding-top:0px; padding-right:0px; padding-bottom:0px; padding-left:0px; list-style-type:none; font-size:95%; } .description { padding:0px; margin-top:7px; margin-right:12%; margin-bottom:7px; margin-left:5%; color:#9E5205; background:transparent; font:bold 100% Verdana,Sans-Serif; } .post { margin-top:0px; margin-right:0px; margin-bottom:30px; margin-left:0px; } .post strong { color:#000000; font-weight:bold; } pre,code { color:#999999; } strike { color:#999999; } .post-footer { padding:0px; margin:0px; color:#444444; font-size:80%; } .post-footer a { border:none; color:#968a0a; text-decoration:none; } .post-footer a:hover { text-decoration:underline; } #comments { padding:0px; font-size:110%; font-weight:bold; } .comment-author { margin-top: 10px; } .comment-body { font-size:100%; font-weight:normal; color:black; } .comment-footer { padding-bottom:20px; color:#444444; font-size:80%; font-weight:normal; display:inline; margin-right:10px } .deleted-comment { font-style:italic; color:gray; } .comment-link { margin-left:.6em; } .profile-textblock { clear: both; margin-left: 0; } .profile-img { float: left; margin-top: 0; margin-right: 5px; margin-bottom: 5px; margin-left: 0; border: 2px solid #DE7008; } #sidebar a:link { color:#999999; text-decoration:none; } #sidebar a:active { color:#ff0000; text-decoration:none; } #sidebar a:visited { color:sidebarlinkcolor; text-decoration:none; } #sidebar a:hover { color:#B8A80D; text-decoration:none; } .feed-links { clear: both; line-height: 2.5em; } #blog-pager-newer-link { float: left; } #blog-pager-older-link { float: right; } #blog-pager { text-align: center; } .clear { clear: both; } .widget-content { margin-top: 0.5em; } /** Tweaks for layout editor preview */ body#layout #outer-wrapper { margin-top: 0; } body#layout #main, body#layout #sidebar { margin-top: 10px; padding-top: 0; } -->

Wednesday, May 19, 2010

ERROR_INTERNET_INVALID_CA

If a server SSL certificate is issues by unknown or invalid certificate authority WinInet HttpSendRequest API or MFC CInternetFile::SendRequest will fail with error 12045(ERROR_INTERNET_INVALID_CA).
To resolve this problem, click here.

Tuesday, April 6, 2010

Visual Studio 2010 Bug

When debugging a MFC application that build with release mode, visual studio
break point crashed.
I don't know it's just small bug or intended.
To turn on break point , Turn off optimization option on project setting.
(Optimization ->Disable, Whole Program Optimization -> No)

Saturday, November 21, 2009

How to check UAC On/Off

UAC enable information is stored in "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System"
subkey.
In this sub key values, EnableLUA key value present windows enabled UAC or not.
So we can make a simple code that checking a current windows UAC status.

BOOL IsUacOn()
{
DWORD res = ERROR_SUCCESS;
DWORD dwType = REG_DWORD;
DWORD UacOnOff = 0;
DWORD sz = sizeof(DWORD);
res = SHGetValue(HKEY_LOCAL_MACHINE,
_T("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System"),
_T("EnableLUA"), &dwType, &UacOnOff, &sz);
if(res == ERROR_SUCCESS)
{
if(UacOnOff == 1)
return TRUE;
else
return FALSE;
}
else
return FALSE;
}

Wednesday, October 28, 2009

Visual Studio 2010 Beta 2 :


Visual Studio 2010 Beta 2 has been released for tests.
There are many powerfull and usefull tools added like a C++0x, MFC Feature Pack, more
convinent WER(Windows Error Reporting) SDKs and Test Suite.
Especially, Finally, Class wizzard return.
Its short key changed to Ctrl+Shift+X.(It's quite complex..)

Following image is newly added class wizzard dialog on Visual Studio 2010 Beta 2.
It's more easy and pretty than VC 6's.


More about Visual Studio 2010 , visit following pages.
http://blogs.msdn.com/vcblog/
http://channel9.msdn.com/posts/Charles/Pat-Brenner-Visual-Studio-2010-MFC-and-Windows-7/

Monday, August 17, 2009

WDK 7.0.0 Released

WDK(Windows Driver Kit) 7.0.0 released 6, Aug, 2009.
This version is latest windows driver development kit for windows platform
including Windows7 and Windows Server 2008.
You can download from here.

Friday, August 7, 2009

Richedit Control Bug(?)

I've found a quite bothering bug about rich edit control.
1. Create Visual C++ Dialog Based project.
2. Set Character set to "Multi Byte Support" on project property.
3. Open resouce file(.rc) with "view code"
4. We can see following code that rich edit control generated Ansi window class.

CONTROL
"",IDC_RICHEDIT21,"RichEdit20A",ES_AUTOHSCROLL WS_BORDER
WS_TABSTOP,57,60,135,111


5. Then , change "Character set" property to "Unicode character set" on project poperty page.
6. Now, we expected rich edit control's class changed unicode class, "RichEdit20W"...
But It's NOT...
We have to change it RichEdit control's class name to "RichEdit20W" manually on .rc source
code.

CONTROL "",IDC_RICHEDIT21,"RichEdit20W",ES_AUTOHSCROLL WS_BORDER
WS_TABSTOP,57,60,135,111

Thursday, July 16, 2009

64Bit Windows Support NUMA System Architecutre

Windows Vista, 7 and server 2008 supports a NUMA(Non-Uniform Memory Access) system
architecutre.
Microsoft introduces an NUMA systems on channel 9.
And added new APIs for NUMA system architecture.

Friday, June 12, 2009

Agile Practice

It's described nicely about agile practice, comparing waterfall methology.
Have a daily meeting, story board and iteration.

Sunday, April 5, 2009

Microsoft Virtual Tech-Days 2009

http://www.msfttechdays.com/public/sessionlist.aspx

On this page, we can take a good education and exercise about Microsoft software
developement technics.
Vir

Monday, March 9, 2009

error C2248

We maybe meet a this error when using class that derived from CWnd or CObject class.
MFC class , CObject prevent using copy constructor and assignment operator.
Because It's can make an abnormal behavior .
To resolve this error we should override copy constructor and assignment operator.

class CTestWindow : public Cwnd
{
public:
CTestWindow();
virtual ~CTestWindow();
CTestWindow( const CTestWindow &s )
{ *this = s; }
CTestWindow& operator=( const CTestWindow &s )
{ return *this; }
};

Also see following KB article.
http://support.microsoft.com/kb/117794

Tuesday, February 17, 2009

64bit System Design

64-bit System Design
http://www.microsoft.com/whdc/system/platform/64bit/default.mspx
Microsoft provides 64-bit versions of the Microsoft Windows operating system for both workstation and server computers. A 64-bit system requires special design considerations that differ from 32-bit platform design, including considerations for firmware, hard disk partitions, and device drivers.
General 64-bit Windows
Best Practices for WoW64
Designing for 64-bit Windows
IA-64 Systems and ACPI 2.0 64-bit Tables
Gearing up for 64-bit Computing on Windows Server
WOW64 Implementation Details
GUID Partition Table (GPT) and Master Boot Record (MBR)
Custom Bootstrap Actions in Windows Vista
MBR System Disk Conversion for Itanium-Based Systems
Modifications to Microsoft Boot Components: Update
Using GPT Drives
Windows and GPT FAQ
Unified Extensible Firmware Interface - EFI
Installing Windows Server 2008 and Windows Vista SP1 on UEFI Systems
Microsoft Extensible Firmware Initiative FAT32 File System Specification, V. 1.03
Microsoft Portable Executable and Common Object File Format Specification
UEFI and Windows
UEFI Support and Requirements: Microsoft Windows Server 2008
Windows Authenticode Portable Executable Signature Format
Unified EFI Update [WinHEC 2005; 493 KB]
Extensible Firmware Interface Specification
Implementing the Unified Extensible Firmware Interface with Intel's Framework

Machine Check Architecture (MCA)

MCA Implementation Guide for 64-bit Windows XP and Windows Server 2003
MCA Support in 64-bit Windows XP and Windows Server 2003
Machine Check Exception Reporting

Developer Resources for 64-bit Computing
Calling Convention for x64 64-Bit Environments
Platform SDK Update: 64-bit Vista, Server 2008 & .NET 3.5
Search on MSDN for "Itanium"
Search on MSDN for "x64"
Windows Installer on 64-bit Operating Systems

64-bit Platform Specifications
Industry Specification References for Windows Logo Program
Intel IA-64 Architecture Software Developer's Manual
Intel Itanium Processor Family System Abstraction Layer Specification (SAL 3.0)
See Also
64-bit Driver Guidelines
Getting Ready for 64-bit Windows

How to marshal interfaces across apartments in Visual C++

When using a STA COM on multi-threaded environment, we maybe got COM errors.
Because a STA COM Interface could not be shared throuth different threads.
If you want share a COM interface among threads, you shoud marshal a COM interface.
And If Application has a UI, we should message pump, so that It could be blocked while marshalling.
Reference this Microsoft KB article.
http://support.microsoft.com/kb/206076

Monday, February 9, 2009

Embeded controls on dialog are could receive only defined notify message

Windows System sends WM_PARENTNOTIFY messages to each control windows.
So controls can take a message and behave specify actions.
However, Windows System does not sends message to dialog template control that has
WS_EX_NOPARENTNOTIFY property.
When RC compiles dialog template , each controls create with WS_EX_NOPARENTNOTIFY.
User can not prevent it.
We can only define Visual Studio pre-defined notify messages.
(Mouse left button down/up , etc)

If you want to make controls receive every messages, do not place controls on dialog template.
And create a control via Create(or CreateEx) function.

reference : http://msdn.microsoft.com/en-us/library/ms644995.aspx

Monday, February 2, 2009

Threre's not exist "HttpRequest.h" file on PSDK include folder.

I've notified that "Httprequest.h" header file does not exist on Platform SDK .


Only "Httprequest.idl" file been in .


We can easily generate Httprequest.h file with Httprequest.idl file .


Via MIDL compiler.
midl [idl file position]



After compile, we can get Httprequest.h header file.

Wednesday, January 28, 2009

Parallel Extensions

http://channel9.msdn.com/shows/10-4/10-4-Episode-6-Parallel-Extensions/
In this episode of 10-4, we start taking a look at Parallel Extensions to the .NET Framework. We'll look at some of the surface-area of the Parallel Extensions API and provide you with enough information to start working with it yourself in the Visual Studio 2010 CTP VPC. Remember that we are running these bits within a virtual machine with a single virtual processor, so you won't be able to see the performance improvements from the library. However, you will be able to start get a feel for the API itself. In future episodes, we will dive into deeper details of the various parts of Parallel Extensions. Also, in next week's episode, Jonathan Carter will be back to talk about another new feature in ASP.NET 4.0, so make sure to stay tuned for that!For more 10-4 episodes, be sure to visit:http://channel9.msdn.com/shows/10-4
Visual Studio Topic Area on Channel 9:http://channel9.msdn.com/VisualStudio
Visual Studio 2010 CTP VPC:http://tinyurl.com/GetCTP
Visual Studio 2010 Training Kithttp://tinyurl.com/VS10KitConcurrency MSDN Dev Centerhttp://msdn.microsoft.com/concurrency10-4! Over and out!


Thursday, January 22, 2009

Windows 7 recommanded developement tools.

This release of the Windows SDK does not include a .NET Framework Redistributable Package. Windows 7 Beta includes .NET Framework 3.5 SP1. Windows Vista and Windows Server 2008 include .NET Framework 3.0.
Users running Windows Server 2003 and Windows XP must install the .NET Framework 3.0 or 3.5 SP1 to run and develop .NET Framework applications. Some samples and tools included in the Windows SDK also require you to install .NET Framework 3.5 SP1.
Along with content that ships in the Windows SDK, Microsoft offers additional free developer tools and resources that you might find helpful, including:
· Debugging Tools for Windows can be used to debug drivers, applications, and services on systems running Windows NT 4.0, Windows 2000, Windows XP, Windows Server 2003, Windows Vista, and Windows Server 2008 as well as for debugging the operating system itself. Versions of the Debugging Tools for Windows package are available for 32-bit x86, native Intel Itanium, and native x64 platforms.
· LUA Buglight™ is a tool to help both developers and IT professionals (sysadmins) identify the specific causes of admin-permissions issues (LUA bugs) in desktop applications running on Windows XP, Windows Server 2003, or Windows Vista. Once the specific causes have been identified, the bugs can more easily be resolved by fixing the app's source code, or by making configuration changes, allowing the app to work correctly for non-admin users.
· Microsoft .NET Framework 3.0 is Microsoft's managed code programming model building applications on Windows clients, servers, and mobile or embedded devices. It combines the power of the .NET Framework 2.0 with four new technologies: Windows Presentation Foundation (WPF), Windows Communication Foundation (WCF), Windows Workflow Foundation (WF), and Windows CardSpace (WCS, formerly InfoCard). The .NET Framework 3.0 ships with Windows Vista and Windows Server 2008.
· Microsoft .NET Framework 3.5 SP1 is the latest update of the .NET Framework, and contains many new features that are compatible with both .NET Framework 2.0 and .NET Framework 3.0. The .NET Framework 3.5 SP1 includes several fixes for .NET Framework 2.0 3.0, and 3.5.
· Microsoft Visual Studio Express is a set of free, lightweight and easy-to-use tools for the hobbyist, novice, and student developer.
· Microsoft Windows PowerShell™ command-line shell and scripting language helps IT Professionals achieve greater productivity. Using a new admin-focused scripting language, more than 130 standard command-line tools, and consistent syntax and utilities, Windows PowerShell allows IT professionals to more easily control system administration and accelerate automation. More information on Windows PowerShell is available from the PowerShell Team Blog and the Windows PowerShell Technology Center.
· Visual Studio 2005 extensions for .NET Framework 3.0 (Windows Workflow Foundation) provides developers with support for building workflow-enabled applications using Windows Workflow Foundation.
· Windows Server 2008 Developer Center is the official site about development and management of applications on the Windows Server 2008 platform. The Developer Center includes product information, news, tools, and code samples.
· Windows SDK Developer Center is the official site about development using the Windows SDK and provides information about the SDKs and links to the Windows SDK Blog, Forum, online release notes and other resources.

Friday, January 16, 2009

Using Post Build Step Event.

When developing with many binary objects. like a dll.

After build, we should copy these files to specify folder.
Because it'll work correctly on condition that dll's same designated position.
It's reall tedious and bothering task.
If you know a "Copy" command , you do not need to do this task.
On Visual Studio(since VS6), we can add command that copy some file to specify position,
after build.
On project property page(ALT+F7), Configuration Properties>>Build Events>>Post Build Evnet" add following lines on Command Line.

Copy "[Source]" "[Destination]"
EX>> If you want to copy "D:\test\test.dll" to "D:\BIN\test,dll", add folling lines on Command Line.
Copy "D:\test\test.dll" "D:\BIN\test,dll"
After setting applied and build, You will see a "Copy success" message on a output window.


Thursday, January 15, 2009

Virtual PC error loading existing image after re - install a virtual PC

After re-install a Virtual PC, You'll be meet an error message when loading existing image.
Error message is "Your Virtual PC does not compatible with this virtual PC image."

You can solve this problem by deleting a " [VPC_Image_Name].vsv" file located in Virtual PC Image folder.

Tuesday, January 13, 2009

Use unary_function when delete objet in STL container.

This post copied from Effective STL.
Usually, many developer still delete object in STL container via iterating container and delete.
This method possibility makes exceptions and not effective way for STL.
From now on, use unary_function with for_each.

template <typename T>
class ContainerDeallocator : unary_function<T, void>
{
public:
void operator () (const T* ptr) const
{
delete ptr;
}
};



vector<int*> v1;
v1.resize(10);
v1[0] = new int(10);
v1[1] = new int(18);
v1[2] = new int(67);
v1[3] = new int(5);

for_each(v1.begin(), v1.end(), ContainerDeallocator<int>());

It's more pretty than using iterator.

Reference : Effective STL -Meyers-

Powered By Blogger