Tuesday, August 31, 2010

COleDateTime:: Format

http://msdn.microsoft.com/en-us/library/bab3feb1(VS.80).aspx

The lowest resolution of the formating is in seconds.


DATE Description and Use


This is a 8-byte floating-point number.  Days are represented by whole number increments starting with 30 December 1899.

0.00 is 20 Dec 1899, midnight
-1.00 is 29 December 1899, midnight
5.50 is 4 January 1900, noon.



For comparing two dates:

if ((date2 - date1)  < FLT_EPSILON)
{
      printf("same date");
}

FLT_EPSILON is defined in the LIMITS.H include file for .NET. 

Defined in FLOAT.H for unmanaged code.



Wednesday, August 18, 2010

Server Message Block (SMB)

http://en.wikipedia.org/wiki/Server_Message_Block

An application network protocol known as "Microsoft Windows Network" in Windows systems.

Implemented by Samba on Linux systems and other Unix like systems.

Also called Common Internet File System (CIFS).

Wednesday, July 14, 2010

Tuesday, July 13, 2010

VS 2010 MSTest for Unmanaged Projects

Bottom line:  MSTest isn't designed for unmanaged or untrusted code.  No big surprise there.  It seems it can be used to test unmanaged code indirectly through a manage code project shim.

There are some links I found what gleaning that bit of information.  Most of this was not obtained from the MS site.  With them there is no discussion of managed versus unmanaged, because in their world no unmanaged code exists :-) 

MSDN download page for VS 2010:  http://msdn.microsoft.com/en-us/vstudio/bb984878.aspx  


Although this has nothing to do with unmanaged code, here is an example of using MSTest and NUnit together:  http://alsagile.com/archive/2010/03/09/stop-the-war-between-nunit-and-mstest-make-them.aspx


A discussion where MSTest is not recommended for unmanaged code and GTest is:  http://stackoverflow.com/questions/1392305/mstest-for-huge-legacy-codebase

And example of calling MSTest from the command line for several test projects:  http://stackoverflow.com/questions/3236268/mstest-msbuild-many-test-projects




Gallio, third party software for testing:  http://www.gallio.org/

Testing working in IDE but not from command line:  http://coderesource.org/messages-7-286282-c++-mstest_for_huge_legacy_codebase



Friday, July 9, 2010

Resetting Language Environment in VS 2008

This is done from the command line:

> DevEnv /resetuserdata

Your can than reselect the environment you want to use.



Monday, July 5, 2010

UAC - User Account Control

The Android permission security mechanism is not suppose to be as big of a pain in the neck as the Vista UAC.  Both let the user decide what risks they are willing to take.

UAC compared with Android premissions:  http://blogoscoped.com/archive/2008-12-15-n14.html

How to tweak UAC setting in Vista:  http://www.tweak-uac.com/what-is-uac/

This contains a nice description of UAC with a really cool parable or allegory:  http://netsecurity.about.com/od/quicktips/qt/UAC.htm