Skip to main content

Questions tagged [winapi]

The Win32 API is the core set of application programming interfaces (APIs) available in the Microsoft Windows operating systems. This tag is for questions about developing native Windows applications using the Win32 API.

Filter by
Sorted by
Tagged with
4 votes
1 answer
3k views

Asking Windows for real-time priority

This code snippet is about asking Windows for the highest possible execution priority. Basically, we have to ask for real-time priority class for the entire process, after which each thread has to ask ...
coderodde's user avatar
  • 28.7k
4 votes
1 answer
2k views

Window Creation Wrapper Class

This Question now has a follow-up here I don't think that there is any new technique in my code but in my opinion it's ok all in all (with a bit of magic). Maybe you can find something to improve or ...
xourscode's user avatar
15 votes
2 answers
3k views

Win32 File API in VBA

Win32 File API Wrapper Based on a few fundamental frustrations with VBA (namely the lack of ability to work with files larger than 2GB, the lack of encapsulation of the file functions and the lack of ...
Blackhawk's user avatar
  • 1,134
6 votes
1 answer
195 views

Porting ProcMonDebugOutput from C# to VBA

This code has one public method. ProcMonDebugOutput(). It will sent a string of text to Process Monitor that process monitor will display. I'm basically ported ...
Justin Dearing's user avatar
6 votes
3 answers
3k views

Class to wrap Netapi32.dll functions

I have made a class for some Netapi32.dll functions in C#. I would like to know if there are any big problems with it or if there is some other function needed in general. Functions: ...
DarkPh03n1X's user avatar
6 votes
1 answer
181 views

Wormhole - a Windows shim app written in C with no stdlib

My application compiles and seems to work correctly, but this is my first C project so I welcome any criticism. I developed this in Pelles C with no standard lib. Efficiency and optimizations are more ...
x79's user avatar
  • 101
3 votes
1 answer
168 views

Wrapping WinAPI FindNextVolume as std iterator

This is my first attempt at creating an STL-style iterator. Is this code ok? ...
Felix Dombek's user avatar
  • 1,081
3 votes
1 answer
587 views

Hook COM Object and get data from SIEMENS Step 7 software to control PLC through events in their code modified at runtime

I'm a first traveler coding in WinApi, Hooks, COM objects. Then, I made a dll to inject (EasyHook) this in the target SIEMENS Step7 process and modify the software code at runtime: Maybe I want some ...
Acaz Souza's user avatar
5 votes
3 answers
2k views

WinInet C++ Wrapper

Because I don't like complex sequences of code for simple functions, I wrote a wrapper for http/https access in A++. Are there any bad programming practices I am using? Is there any functionality I ...
nimsson's user avatar
  • 655
3 votes
1 answer
546 views

Win32 GDI+ memory and style

I compiled this with wxDevC++, and it needs the GDI+ library and header includes for Windows, to compile. On a larger program I have had memory fluctuating from plus minus 4MBs. Not a lot, but why is ...
Evan Carslake's user avatar
1 vote
1 answer
3k views

Win32API program Main with Child windows design pattern

Below is the code of a development status project. I have designed a main window with 3 children. I am mainly interested in your comments on the design pattern used for drawing the child windows and ...
gedysan's user avatar
  • 31
3 votes
1 answer
1k views

DestroyWindow() non-existant windows

What I am working on has sets of window controls. Controls are constantly being either destroyed, or created. ...
Evan Carslake's user avatar
7 votes
1 answer
2k views

Testing if TreeView's node is checked

I have recently answered a question on Stack Overflow where OP wanted to programmatically determine if TreeView's node is checked or not, among other things. My ...
AlwaysLearningNewStuff's user avatar
6 votes
1 answer
5k views

WinAPI code for DNS queries

This is just some test code I'm doing to learn C++11. It compiles and runs consistently. But is anything wrong that will eventually (or under slightly different circumstances) fail? Besides ...
Jason Kleban's user avatar
5 votes
2 answers
2k views

Disk enumeration and file listing

I am writing C++ code to enumerate the whole HDD and drive listing. However, it takes more than 15 minutes to complete the disk enumeration of all drives (HDD capacity of 500GB) and compile the ...
Windows Programmer's user avatar
3 votes
1 answer
3k views

Using ::CreateToolhelp32Snapshot

I have a process, let's call it Proc1. It is installed in two different directories and one instance of each is running: C:\DirA\Proc1.exe C:\DirB\Proc1.exe When iterating through all currently ...
jliv902's user avatar
  • 1,952
2 votes
1 answer
1k views

RAII-style lockable objects

I am working on a Windows project using C++03 (C++11 is not an option), and without using Boost. I have several resources that are accessed by multiple threads at various times - a queue, for example, ...
icabod's user avatar
  • 173
1 vote
1 answer
62 views

Printing a range of numbers using configurable worker threads

I have written code to print a range of numbers using multi-threaded programming. It takes in the number of threads to spawn as input. It is working fine and giving the expected results. I just ...
Santhosh Pai's user avatar
3 votes
1 answer
2k views

std::string/std::wstring template wrapper for Win32 API

I have not completed this but want to make my own template library for wrapping the Win32 API to make it compatible with std::string/std::wstring... Here's a sample of what I've worked with so far. ...
Drew Chapin's user avatar
  • 1,059
-2 votes
1 answer
340 views

Zeroing memory on Windows

I need some useful functions that faster than the original. (Original - C++'s functions) For example: ...
MessyCode's user avatar
  • 113

1 2
3