Enumerating symbols in a module!

We can enumerate symbols in a module use dbghelp API’s provided by Microsoft. Make sure you link with dbghelp.lib. Here is a demo… 🙂 [sourcecode language=’cpp’]// Open a process for enumeration HANDLE hProcessHandle = ::OpenProcess( PROCESS_ALL_ACCESS,  FALSE, dwProcId ); // Initialize process for enumerating debug symbols if( !hProcessHandle || !SymInitialize( hProcessHandle, 0, TRUE )) { ASSERT( […]
Continue reading…

 

Function for copying text to clipboard!

A helper function for copying any given text to clipboard… [sourcecode language=’cpp’]static bool CopyTextToClipboard( HWND hWindow_i, LPCTSTR lpctszText_i ) {     // Open clipboard     if( !lpctszText_i || !::OpenClipboard( hWindow_i ))     {         return false;     } // Clear clipboard     EmptyClipboard(); const int nTotalAllocLen = ( _tcslen( lpctszText_i ) + 1 ) * sizeof( […]
Continue reading…