c++ Programming Glossary: tchar.h
“listening” to file changes in C/C++ (on Windows) http://stackoverflow.com/questions/1083372/listening-to-file-changes-in-c-c-on-windows windows.h #include stdlib.h #include stdio.h #include tchar.h void RefreshDirectory LPTSTR void RefreshTree LPTSTR void WatchDirectory..
LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup http://stackoverflow.com/questions/11247699/lnk2019-unresolved-external-symbol-main-referenced-in-function-tmaincrtstar If you're getting an error on _TCHAR place an #include tchar.h If you think the issue is with one of the headers go to the..
C++ Windows - How to get process path from its PID http://stackoverflow.com/questions/1933113/c-windows-how-to-get-process-path-from-its-pid psapi.h For access to GetModuleFileNameEx #include tchar.h #include iostream using namespace std #ifdef _UNICODE #define..
How do we tell if a C++ application is launched as a Windows service? http://stackoverflow.com/questions/1974828/how-do-we-tell-if-a-c-application-is-launched-as-a-windows-service C version of the same function #include windows.h #include tchar.h #include strsafe.h #include aclapi.h #include stdio.h bool IsRunningAsService..
How do I programmatically send an email in the same way that I can “Send To Mail Recipient” in Windows Explorer? http://stackoverflow.com/questions/262451/how-do-i-programmatically-send-an-email-in-the-same-way-that-i-can-send-to-mail improve this question This is my MAPI solution #include tchar.h #include windows.h #include mapi.h #include mapix.h int _tmain..
Using IOCTL_MOUNTMGR_QUERY_POINTS http://stackoverflow.com/questions/3012828/using-ioctl-mountmgr-query-points #include C WinDDK 7600.16385.1 inc ddk mountmgr.h #include tchar.h #include stdio.h #pragma comment lib Crypt32.lib int main TCHAR..
SetupDiGetDeviceProperty http://stackoverflow.com/questions/3438366/setupdigetdeviceproperty and CM_Get_Device_ID #define INITGUID #include tchar.h #include stdio.h #include c WinDDK 7600.16385.1 inc api devpkey.h..
How to get Process Name in C++ http://stackoverflow.com/questions/4570174/how-to-get-process-name-in-c the process. #include stdafx.h #include windows.h #include tchar.h #include stdio.h #include psapi.h Important Must include psapi.lib..
“APIENTRY _tWinMain” and “WINAPI WinMain” difference http://stackoverflow.com/questions/4681443/apientry-twinmain-and-winapi-winmain-difference this question _tWinMain is just a #define shortcut in tchar.h to the appropriate version of WinMain . If _UNICODE is defined..
Serial Comm using WriteFile/ReadFile http://stackoverflow.com/questions/6036716/serial-comm-using-writefile-readfile windows.h #include winbase.h #include iostream #include tchar.h using namespace std int main int com 'COM2' string data n 010400..
Quick and dirty way to profile your code http://stackoverflow.com/questions/61278/quick-and-dirty-way-to-profile-your-code the average time spent of course . #pragma once #include tchar.h #include windows.h #include sstream #include boost noncopyable.hpp..
Volatile and CreateThread http://stackoverflow.com/questions/6866206/volatile-and-createthread Windows.h #include stdio.h #include iostream #include tchar.h using namespace std bool done false DWORD WINAPI thread1 LPVOID..
Calling C# code from C++ http://stackoverflow.com/questions/778590/calling-c-sharp-code-from-c any .NET code with relative ease. For example #include tchar.h #include stdio.h int _tmain int argc _TCHAR argv System DateTime..
Raw C++ code to display the names of tables in an SQL compact server using OLE DB http://stackoverflow.com/questions/8780656/raw-c-code-to-display-the-names-of-tables-in-an-sql-compact-server-using-ole-d using ICommandText and IRowset #include stdio.h #include tchar.h #include windows.h #include oledb.h #include atlbase.h int _tmain.. now at iOrdinal 3 instead of 1 #include stdio.h #include tchar.h #include windows.h #include oledb.h #include atlbase.h int _tmain..
Why use Precompiled Headers (C/C++)? http://stackoverflow.com/questions/903228/why-use-precompiled-headers-c-c Standard Includes #include stdio.h #include tchar.h #include iostream #include direct.h #include cstring #ifdef..
How to hide strings in a exe or a dll? http://stackoverflow.com/questions/926172/how-to-hide-strings-in-a-exe-or-a-dll _WIN32_WINNT 0x0501 #endif #include stdio.h #include tchar.h #include Windows.h int _tmain int argc _TCHAR argv _TCHAR hiddenString1..
GetVersionEx under Windows 8 http://stackoverflow.com/questions/9817160/getversionex-under-windows-8 windows.h #include iostream using namespace std #include tchar.h #include stdio.h #include strsafe.h #pragma comment lib User32.lib..
|