DavidCrow wrote:
The only way to free it up is to close the application.
Depends. If array data is global then yes.
DavidCrow wrote:
The only way to free it up is to close the application.
Depends. If array data is global then yes.
1. Are they included in compiled files (.obj, .dll,...) 2. What about unused friend functions? -- modified at 7:41 Thursday 13th April, 2006 Anybody? Look I know that different compilers optimize code differently, but I would like to know : A) What does the standard say? B) What code MSVC 7.1 produces?
kevingpo wrote:
Does MFC/ATL still exist in VS.NET2003 or have they been replaced with STL?
This is illogical question because STL is collection oriented, while MFC and/or ATL/WTL are GUI oriented. Can you build Windows application with just collections (no menus, windows, buttons...)??
Windows API
Answer to your 2. question: // assuming that you have window handle // get process ID from window handle DWORD dwProcessId = 0; GetWindowThreadProcessId (hWnd, &dwProcessId); // get process handle from process ID HANDLE hProcess = NULL; hProcess = OpenProcess (PROCESS_ALL_ACCESS, FALSE, dwProcessId);
TCHAR szBuffer[16]; INT iValue = 5; ::wsprintf (szBuffer, TEXT("%d"), iValue);
Try this, if you are using Win API only: INT CDECL ConPrintf (LPCTSTR lpszFormat, ...) { TCHAR szBuffer[1024]; INT iRet; DWORD cbWritten; HANDLE hStdOut = NULL; va_list va; va_start (va, lpszFormat); iRet = wvsprintf (szBuffer, lpszFormat, va); va_end (va); hStdOut = GetStdHandle (STD_OUTPUT_HANDLE); WriteConsole (hStdOut, szBuffer, iRet * sizeof (TCHAR), &cbWritten, NULL); return iRet; } Usage is identical to wsprintf, but it writes to console output.
// Wnd is an instance of CWnd HWND hwndEdit = ::GetDlgItem (Wnd.GetSafeHwnd(), ID_EDIT);
Reverse engineering IS legal in most countries, patent stealing is not.
what is the difference between (c): HMENU hMenu = NULL; and HMENU hMenu = (HMENU) NULL; or (c++): HMENU hMenu = 0; and HMENU hMenu = reinterpret_cast(0); Is cast operator while initializing pointers really necessary?