¡@

Home 

c++ Programming Glossary: windows.h

Displaying the #include hierarchy for a C++ file in Visual Studio

http://stackoverflow.com/questions/1137966/displaying-the-include-hierarchy-for-a-c-file-in-visual-studio

line numbers so I can jump into the sources source.cpp 1 windows.h 100 winsock.h some_other_thing.h 1234 winsock2.h c c visual..

How to use QueryPerformanceCounter?

http://stackoverflow.com/questions/1739259/how-to-use-queryperformancecounter

c windows timer share improve this question #include windows.h double PCFreq 0.0 __int64 CounterStart 0 void StartCounter LARGE_INTEGER..

How do I call native C++ from C#?

http://stackoverflow.com/questions/2211867/how-do-i-call-native-c-from-c

kernel32.lib user32.lib .. CSCPP.h #pragma once #include windows.h using namespace System namespace CSCPP public ref class Class1..

How to get available memory C++/g++?

http://stackoverflow.com/questions/2513505/how-to-get-available-memory-c-g

On Windows there is GlobalMemoryStatusEx #include windows.h size_t getTotalSystemMemory MEMORYSTATUSEX status status.dwLength..

How might I wrap the FindXFile-style APIs to the STL-style Iterator Pattern in C++?

http://stackoverflow.com/questions/2531874/how-might-i-wrap-the-findxfile-style-apis-to-the-stl-style-iterator-pattern-in-c

what I wrote up #define WIN32_LEAN_AND_MEAN #include windows.h #include string #include iterator #include exception #ifndef..

How to get a list of video capture devices (web cameras) on windows? (C++)

http://stackoverflow.com/questions/4286223/how-to-get-a-list-of-video-capture-devices-web-cameras-on-windows-c

will give out the list on the command line. #include windows.h #include dshow.h #pragma comment lib strmiids HRESULT EnumerateDevices..

undefined reference to `WinMain@16'

http://stackoverflow.com/questions/5259714/undefined-reference-to-winmain16

Windows API level program #define NOMINMAX #include windows.h int main MessageBox 0 Blah blah... My Windows app MB_SETFOREGROUND..

WChars, Encodings, Standards and Portability

http://stackoverflow.com/questions/6300804/wchars-encodings-standards-and-portability

user starts here #if defined _WIN32 defined WIN32 #include windows.h extern C int main setlocale LC_CTYPE int argc wchar_t const..

How to determine CPU and memory consumption from inside a process?

http://stackoverflow.com/questions/63166/how-to-determine-cpu-and-memory-consumption-from-inside-a-process

Do check the return codes... Total Virtual Memory #include windows.h MEMORYSTATUSEX memInfo memInfo.dwLength sizeof MEMORYSTATUSEX.. Virtual Memory currently used by current process #include windows.h #include psapi.h PROCESS_MEMORY_COUNTERS_EX pmc GetProcessMemoryInfo.. CPU currently used by current process #include windows.h static ULARGE_INTEGER lastCPU lastSysCPU lastUserCPU static..

C++, __try and try/catch/finally

http://stackoverflow.com/questions/7049502/c-try-and-try-catch-finally

the debugger being helpful #include stdafx.h #include windows.h #include iostream NOTE the value of the C C Code Generation..

Windows 7 timing functions - How to use GetSystemTimeAdjustment correctly?

http://stackoverflow.com/questions/7685762/windows-7-timing-functions-how-to-use-getsystemtimeadjustment-correctly

correct Now consider the following testing code #include windows.h #include iostream #include iomanip int main FILETIME fileStart..

Compile a DLL in C/C++, then call it from another program

http://stackoverflow.com/questions/847396/compile-a-dll-in-c-c-then-call-it-from-another-program

program like this worked though #include stdio.h #include windows.h int main HANDLE ldll int add2 int int mul int int ldll LoadLibrary..

How can I get a process handle by its name in C++?

http://stackoverflow.com/questions/865152/how-can-i-get-a-process-handle-by-its-name-in-c

share improve this question #include cstdio #include windows.h #include tlhelp32.h int main int char PROCESSENTRY32 entry entry.dwSize.. in OpenProcess you could try this #include cstdio #include windows.h #include tlhelp32.h void EnableDebugPriv HANDLE hToken LUID..

What is the difference between _tmain() and main() in C++?

http://stackoverflow.com/questions/895827/what-is-the-difference-between-tmain-and-main-in-c

wchar_t. The same applies to the string types defined by windows.h LPCTSTR resolves to either LPCSTR or LPCWSTR and for every other.. TCHAR is not a standard C type it is a macro defined in windows.h. wmain and _tmain are also defined by Microsoft only. share..

Image scaling (KeepAspectRatioByExpanding) through OpenGL

http://stackoverflow.com/questions/9011108/image-scaling-keepaspectratiobyexpanding-through-opengl

#endif oglWindow_H glwidget.cpp #ifdef _MSC_VER #include windows.h #include GL glew.h #include GL gl.h #else #include GL gl.h #endif..

C++ iostream Corruption using stringstream

http://stackoverflow.com/questions/10110048/c-iostream-corruption-using-stringstream

run this code #include iostream #include sstream #include Windows.h int main int argc char argv Logger logger logger.Log std stringstream..

Glew problems, unresolved externals

http://stackoverflow.com/questions/11059971/glew-problems-unresolved-externals

iostream #include fstream #include sstream #include Windows.h #include cstdio #include time.h #include GL glew.h #include..

C++ plugin for Unity “EntryPointNotFoundExeption”

http://stackoverflow.com/questions/11619986/c-plugin-for-unity-entrypointnotfoundexeption

#ifndef _WMIWRAPPER_H_ #define _WMIWRAPPER_H_ #include Windows.h #include sstream #include iostream #include WbemCli.h using..

How to append text to a TextBox?

http://stackoverflow.com/questions/12537456/how-to-append-text-to-a-textbox

the following code should be self explanatory. #include Windows.h static HWND textBoxInput static HWND button static HWND textBoxOutput..

How can I measure CPU time and wall clock time on both Linux/Windows?

http://stackoverflow.com/questions/17432502/how-can-i-measure-cpu-time-and-wall-clock-time-on-both-linux-windows

use boost this should work Windows #ifdef _WIN32 #include Windows.h double get_wall_time LARGE_INTEGER time freq if QueryPerformanceFrequency..

How to Calculate Execution Time of a Code Snippet in C++

http://stackoverflow.com/questions/1861294/how-to-calculate-execution-time-of-a-code-snippet-in-c

epoch on both windows and linux. #ifdef WIN32 #include Windows.h #else #include sys time.h #include ctime #endif Returns the..

Create an Application without a Window

http://stackoverflow.com/questions/224225/create-an-application-without-a-window

it. All you need to do to achieve all this is #include Windows.h int WinMain HINSTANCE hInstance HINSTANCE hPrevInstance LPTSTR..

How might I wrap the FindXFile-style APIs to the STL-style Iterator Pattern in C++?

http://stackoverflow.com/questions/2531874/how-might-i-wrap-the-findxfile-style-apis-to-the-stl-style-iterator-pattern-in-c

#include boost iterator iterator_facade.hpp #include Windows.h #include Shlwapi.h #pragma comment lib shlwapi.lib #include..

Get file handle to running executable

http://stackoverflow.com/questions/4750897/get-file-handle-to-running-executable

Here it is a way to do this. I hope this helps #include Windows.h #include iostream using namespace std declare a BY_HANDLE_FILE_INFORMATION..

Multithreading in c++

http://stackoverflow.com/questions/4768294/multithreading-in-c

this question One sample example for Windows #include Windows.h struct thread_data int m_id thread_data int id m_id id DWORD..

Possible problems with NOMINMAX on Visual C++

http://stackoverflow.com/questions/4913922/possible-problems-with-nominmax-on-visual-c

else in my program As far as I know this will make Windows.h not define the min and max macros such that many conflicts with..

C++ — how to write a sample code that will crash and produce dump file?

http://stackoverflow.com/questions/5028781/c-how-to-write-a-sample-code-that-will-crash-and-produce-dump-file

c visual c windbg share improve this question #include Windows.h #include Dbghelp.h void make_minidump EXCEPTION_POINTERS e auto..

C++ Boost.ASIO: passing accepted TCP connection from one opened socket to another using Windows APIs ( while works with Linux APIs)?

http://stackoverflow.com/questions/5326564/c-boost-asio-passing-accepted-tcp-connection-from-one-opened-socket-to-anothe

iostream #include boost asio.hpp #ifdef _WIN32 #include Windows.h #endif using namespace boost asio ip using namespace std int..

How to Log Stack Frames with Windows x64

http://stackoverflow.com/questions/590160/how-to-log-stack-frames-with-windows-x64

basically is a simple task Sample StackDump64.cpp #include Windows.h #include DbgHelp.h #include Winbase.h #include stdio.h void..

Volatile and CreateThread

http://stackoverflow.com/questions/6866206/volatile-and-createthread

mark done as volatile or not #include targetver.h #include Windows.h #include stdio.h #include iostream #include tchar.h using namespace..

How can I detect only deleted, changed, and created files on a volume?

http://stackoverflow.com/questions/7421440/how-can-i-detect-only-deleted-changed-and-created-files-on-a-volume

found as well as about their parent directories. #include Windows.h #include stdio.h #define BUFFER_SIZE 1024 1024 HANDLE drive..

getting a windows message name

http://stackoverflow.com/questions/8824255/getting-a-windows-message-name

easily. You need to copy all the message definitions from Windows.h and put them in a C file like this #define X x x #x struct WindowsMessage..

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

0x0501 #endif #include stdio.h #include tchar.h #include Windows.h int _tmain int argc _TCHAR argv _TCHAR hiddenString1 _T 4537774B..

Delphi problems converting VirtualProtect EAT hook routines from C to Delphi

http://stackoverflow.com/questions/9484319/delphi-problems-converting-virtualprotect-eat-hook-routines-from-c-to-delphi

forum posting this code which does EAT hooking #include Windows.h #include Psapi.h #include string #if PSAPI_VERSION 1 #pragma..