VisualCpp.org Collection of Visual C++ Stuffs

22Jul/090

Creating Connection String MS Way

You should investigate what the connection string should be like:

1) Create an empty text file in windows explorer and rename it to X.UDL
2) Double click on it and the data-link provider dialogue will appear.
3) Select the provider tab. Find the provider for your database and click next.
4) Select your database and select integrated authentication.
5) Test the connection and save it.
6) Compare the contents of X.UDL with your connections string.

This will use the MS utility to construct a connection string.

------
tip Courtesy:- Clive

Filed under: General No Comments
11Jul/090

SPY++ Internals

Read more here

Filed under: General No Comments
4Jul/090

What is XPS ?

XML Paper Specification: Overview

The XML Paper Specification (XPS) provides users and developers with a robust, open and trustworthy format for electronic paper. The XML Paper Specification describes electronic paper in a way that can be read by hardware, read by software, and read by people. XPS documents print better, can be shared easier, are more secure and can be archived with confidence.

The XML Paper Specification itself is platform independent, openly published, and available royalty-free and Microsoft has integrated XPS-based technologies into Microsoft Windows Vista operating system and the 2007 Microsoft Office system. Microsoft brings additional document value to its customers, partners, and the computing industry through the XPS-based technologies.

Above text copied from MSDN

 Read rest here

Tagged as: No Comments
1Jul/090

COM Spy Applications

1. COM Spy console that allows you to spy applications using COM interfaces:
http://www.nektra.com/products/deviare/comconsole/index.php

The COM Spy application is based on Deviare hook library so all you can see in the console can be done by code from any language supporting COM. Source code of this application is available.

2. Another one :

http://staff.develop.com/jasonw/comspy/default.htm

3. Yet another open sourced COM spy :

http://jacquelin.potier.free.fr/winapioverride32/

_______________________
Tip Courtesy :-  Lim Bio Liong

1Jul/090

How to call .NET Managed DLL from MFC codes?

Check out this link from Microsoft KB. Again why reinvent the wheel :-)

Filed under: General, MFC No Comments
1Jul/090

How to to calculate the future date from number of seconds available from now?

Naveen responded with this very useful piece of code using CTimeSpan and CTime MFC classes.

// Get Time in second for one day.
CTimeSpan sPan(0,0,0, 86400 );// 1 day
// Get current time
CTime CurTime = CTime::GetCurrentTime();
// add time span to current time
CurTime += sPan;
// calculate and show your new date
CString csTime = CurTime.Format(_T("%A, %B %d, %Y"));
AfxMessageBox( csTime );

Filed under: General, MFC No Comments