Posts

Showing posts from 2009

MySql from Command prompt

To Access your MySql Database server via command prompt steps are as follows: 1.Connect to Database server. 2.Select Database 3.Run MySql Queries. Commands for all these steps: 1.Connect to database.-- Enter the bin directory of database like - c:\cd C:\xampp\mysql\bin Connect to databse server: C:\>..\bin\mysql -u username -h localhost -p [press enter] will prmpt for password Enter password > now..connect to database:- mysql> use [databasename] now start executing quieries > enjoy MySql queries .... best of luck

Customize Outlook message inbox View VC++ code

Here I am using VC++ code and OUTLOOK object model to add new column or field in outlook inbox message view. Like other fields ( importance,subject date ....) i am going to add new custom field. **Note...I tried a lot to add a ICON type value using bitmap like read unread mail in that column bt i couldnt... In simple I used a text type value for this field: Bellow two functions written : Over view: MicroSoft stores the Outlook view in XML form just need to get the XML and modify it. a lots of security and other issue involved here to know morw about it go to Creating Custom Views artical of microsoft and get alot: CConnect::AddNewViewField() { Outlook::_NameSpace * pNamespacePtr; MAPIFolder *pFolderptr; View * pViewPtr; BSTR strXMl; BSTR modifiedXMLSTr; m_spApp->GetNamespace(_T("MAPI"),&pNamespacePtr); pNamespacePtr->GetDefaultFolder(olFolderInbox , &pFolderptr); pFolderptr->get_CurrentView(&pViewPtr); pViewPtr->get_XML(&strXMl); modifi

My different mode of poetry

Hi Evry one...I dont know why the hell I am going to write something here....but i love it 2 spread to all my frnd as a diwali wish......actally listen story wat happened... DAy - FRIDAY - 16-10-2009 Before 1 day to diawali came to my office n started orkut i sawa los of messages from my friend they -wre wishing me DIWALI...then i started replaying all of them and dere was sm other thing lk a line of poem running in my mind......then i thought i sud write 2 line in a different style to wish dem HAppy diwli....and i started writing but thing go beyound the 2 line i made it sm thng diff........................so here i am going to write.....for all my fiends....... "Office ke kaam se tha pareshan. Kam khtam hone ka leta nahi naam, lyf thi boring n dil hairan, baar baar khayalon me kuch tha shayed sayed ek chehra ya shyed koi naam, System ko liye baithe the, man nahi kar raha tha karne ka kaam, kuch to jarur tha mere around, mere liye nahi tha samjhana aasan, arey 1 s

How to convert and print full system TIME string in GMT or UTC

SYSTEMTIME tempSYSTIME; SYSTEMTIME stLocal; FILETIME LocalTime; int TmpMeetingInfoLength = 0; TCHAR tempStartTimeStr[MAX_PATH] ; TCHAR strDateandTime[MAX_PATH]; TIME_ZONE_INFORMATION info; GetLocalTime(&stLocal); GetTimeZoneInformation(&info); LONG tmpval = info.Bias ; if(info.Bias<0) tmpval = info.Bias * -1; LONG hr , min ; hr = tmpval /60; min = tmpval % 60; _TCHAR str[100]; _stprintf(str, _T(": %02d-%02d-%02d %02d:%02d:%02d GMT%s%02ld:%02ld"),stLocal.wYear ,stLocal.wMonth, stLocal.wDay, stLocal.wHour, stLocal.wMinute ,stLocal.wSecond , (info.Bias > 0 && info.Bias != 0 ) ?_T("-"): _T("+"),hr , min); OUTPUT : "YYYY-MM-DD HH:MM:SS GMT+/- HH:MM" eg: "2009-10-10 23:15:01 GMT +05:30"

How To create PreProcessed File in VC++

To Create a preprocessed file u need to compile a file with Following command line argument. 1 - CL /D [Macro ] (eg : _DEBUG) /EP /P filename(eg ....\123.c) it will generate a .i file with same file name (eg - 123.i) The qs is y do i need to create such a preprocessed file. I am a c++ developer but qnce i need to use some java file to compile written by other person with good coding style using #IFDEF and #endif macros that is not allowed in java so i was nt able to compile that file.then to compile that java file i need to first preprocess that file to remove this macros and then build the java file. then steps involved in that: 1 - try to find out wht code need to seperate 2 - write command with given preprocess variables checks 3 compile it the u will get output inform of .i file rename it as the format it required(eg .i to .java) Simplest way to get aal the required option for preprocessing if u r a .NET user Project or file setting enable the preprocessing optiopn prop - > c++

Free Online Part Time Job

Work from Home. Earn Rs.2,000 daily. No Investment. Part Time Jobs. Wanted Online Internet job workers. Job is only through Internet. Work from home part time jobs. You can earn Rs.750-2000/- daily. These are genuine Data entry jobs & Internet jobs. No Investment required. Only serious enquires please. For more details visit http://www.earnparttimejobs.com/index.php?id= 2392314

How to Earn Rs.25000 every month without Investment through part time jobs?

How to Earn Rs.25000 every month without Investment through part time jobs? You can earn Rs.25000 very first month from data entry jobs on internet. This is an easy work from home form filling jobs. Work less than 1 hr daily. No investment. Please visit the website http://www.earnparttimejobs.com/index.php?id= 2392314

Way to start Programming.

Simplest method to create COM object -VC++

Here i am going to write steps that i used to create a object of component and call the functions of that object. i was just having the progid of that component and i supposed to call the function of that component. in VB it is very simple to do. u need to just call a function "CreateObject(progID)" and start wrking with that object. Eg: ProgId : abc.application.1 dim obj = CreateObject("abc.application.1e"); done. but in VC++ it is quite complicated to call the function or object creation. but lets see i have done the task. required header files: #include #include "Objbase.h" CLSID clsid; LPUNKNOWN punk; LPDISPATCH pdisp; OLECHAR FAR* szMember = _T("GetIpAddress"); DISPID dispid; DISPPARAMS dispparamsNoArgs = {NULL, NULL, 0, 0}; OleInitialize(NULL);// if OLE isn't already loaded. CLSIDFromProgID(_T("abc.application.1"), &clsid); CoCreateInstance(clsid, NULL, CLSCTX_SERVER,IID_IUnknown,

VC++ - Importent Outlook - Add in close

I was just working with Outlook 7 and made aVC++- ATL addin and things were very fine. for a moment i just shifted my code on Outlook 2003 the things gone changed ...suddenly my smile converted in deep worry becoz of in case of multiple instance i was not able to close all the explorer of outlook.outlook was not getting closed,was running behind. then after a lots of debug loops i found where exactly the problem........ here i am goin to list some issues that may be a part of such problems while developin a com addin for outlook. 1 - if u are registering any event (DispEventAdvise(.......)) with button or menu item just check that its having corresponding un registeration(DispEventUnadvise(...........)).If DispEventAdvise is coming in your code then there must be DispEventUnadvise(.....). 2 - Arelease the explorer object that u r using. 3 - free all the Com object that u r using. 4 - always try to handle the events that you are using in your addin case in a different class. Here i

Outlook add-in - multiple explorer of OL and Close Problems vc++

So now here i am going to write about the issues that came when i was developing the outlook add-in. 1 - On outlook close issues: Outlook never call begin shutdown(...) method while any of its resourece and object is in use and not properly released.so handle all the case while u are shutting down your add-in to ensure that your add-in released all outlook objects and resources. eg... before closing ensure all the explorer object that u have used for your add-in, has properly released. 2. Stop all the threads that are runnng inside your addin before outlook close. 3 . In case of multiple explorer of outlook bimd each explorer close event so that it would be easier to realease particular explrer object on its close. 4. In case of multiple explorer first un advise the previous events and then advise new event. HRESULT hr; hr = BrechaMeetingButtonEvents::DispEventUnadvise ((IDispatch*) m_spMeetingButton[m_ExpCount - 1]); //BRECHA_LOG(" DispEventAdvise((IDispatch

MS Office Addin creation and related info in vc++

This article describes how to create a simple, compiled add-in that inserts the current date and time at the insertion point. In this article, you create and install an add-in project, load the add-in, and integrate the add-in in the Visual Studio .NET or Visual Studio 2005 interface. Requirements The following list outlines the recommended hardware, software, network infrastructure, and service packs that you must have: Microsoft Visual Studio .NET or Microsoft Visual Studio 2005 Microsoft Windows 2000 Professional, Microsoft Windows Server 2003, Microsoft Windows 2000 Server, Microsoft Windows XP Professional, Microsoft Windows XP Server with the Microsoft .NET Framework On Connection The OnConnection event fires whenever the COM add-in is connected. The add-in may be connected on startup, by the end user, or through Automation. If OnConnection returns successfully, the add-in is said to be loaded. If an error message is returned, the host application immediately releases its referen