I am trying to use the WINAPI ReadConsole() to wait for any keypress at the end of my Win32 console application.
CONSOLE_READCONSOLE_CONTROL tControl;
char pStr[65536];
DWORD dwBufLen = 1;
DWORD dwCtl;
tControl_c.nLength = sizeof( CONSOLE_READCONSOLE_CONTROL );
tControl_c.nInitialChars = 0;
tControl_c.dwControlKeyState = 0;
tControl_c....
I'd like to use SChannel or some other Microsoft API to support TLS for my TCP/IP application. Ideally what I'd like to do is use SChannel to create a kind of TLS tunnel within my app so I can pass off a SOCKET handle to another library. Is this something SChannel can do for me or do I have to implement the tunnel myself?
...
Hi,
I used a win 32 console application application to test a crash reporting mechanism. But when I run the Release exe, I got this error : Missing Language File or Wrong Language File Version. Can someone please explain what is the matter here and how to overcome it??? I use Visual Studio 2008 pro.
...
I am using my own Custom View to show the files and folders and also using a search box to jump to a specific folder. In that case How to send a message to File Open/Save dialog to enforce it to change the current displayed folder.
e.g. If the dialog shows files and folders of current displaying folder "C:\", I want an API (or any piece...
How to lock file in Windows so that this file can be opened/read/wrote only by one process?
I found out that file can be locked with CreateFile by giving 0 to dwShareMode flag. It works but only the returned handle can be used to work with file. But I want to be able to lock the file to other processes and at the same time to create mul...
I have a CRichEditCtrl, and an algorithm works on its contents in-place, iterating through the contents and making changes. This seems to cause it to re-paaint every time, which causes flickering and a noticeable time to complete the operation, especially if the control starts scrolling.
I wondered if there's a neat way for me to stop it...
I'm writing a GUI Applikation which needs to use native Windows Controls. I'm also using a very exotic programming language with an otherwise complete runtime library. This means i have to write a GUI toolkit language binding anyway.
Without the benefits of being cross platform, C++ and having a lot of other non GUI stuff is it worth u...
Hello,
how to code HTTP URL blacklisting driver for both XP and Vista/7?
I need it for special software for schools
any ideas about HTTPS or VPN? I was thinking about firefox, IE,... extension. Not bulletproof, but better than nothing. It's just school.
Thanks
...
I want to create a WindowsIdentity for a given user. I don't need it for impersonation, just for group membership checks. I need it to work with and without a domain (none of that S4U Kerberos delegation stuff). The constructor for WindowsIdentity that takes a username only seems to work for domain scenarios.
Is there any other way I ca...
I have an embedded IWebBrowser2 control using straight C++ (windowed, not windowless) and when someone hits the Tab key to go between fields in the browser, it jumps focus out of the web browser.
Any ideas on what I need to implement or what I could be screwing up?
Thanks!
...
I've been using the IE Browser component that is part of Windows. But I'm running into problems with security settings. For example, users get security warnings on pages with Javascript.
So I'm looking at using the Mozilla ActiveX control instead. It's especially nice because it has a compatible interface. It works well if I let it inst...
Hello all,
I know we could take some advantages from creating private heap of Windows especially for frequently allocated and de-allocated small chunks. But I think the normal approach is to allocate a large memory from default heap and manage the allocations and de-allocations ourselves. My question is which way is advantages and disad...
xperf (part of Windows Performance Analysis Toolkit) is very helpful in tracking memory usage with its heap analysis. However, my app uses a custom allocator -- it grabs chunks via VirtualAlloc directly and manages its own heap. I'd like to generate HeapAlloc/HeapFree/etc. events myself from my own allocation functions, so that I can u...
The IWebBrowser2 control has password edit boxes which are squares. This happened many years ago if you were on an XP machine, and you had a password edit field without a manifest file, you would get squares (no character found for the * they put in there with that font). My application has a manifest file. However I don't know how to...
Basically I want to get bezier control points from a ttf font and then draw them. I was basically wondering 2 things.
Does it return an array of points or is it more complex?
How can you tell the points of 1 contour from another ex: the letter O which has 2 contours?
Thanks
...
I'm trying to debug and resolve some issues with a Win32 macro application written C++ however I'm having the strangest issue.
I have to launch a 16-bit program and then simulate entering data into and have been using ShellExecute for over two years now. I haven't touched this actual code at all, but now it doesn't work.
I'm doing Shel...
I have work I need to complete in a DLL as soon as it is loaded. The work involves synchronization and so can't be done inside dllmain. Is there a way to trigger code to execute as soon as dllmain (or all dllmains) is complete?
...
On success, ShellExecute returns a handle.
Do we need to close this handle, and if so, how ?
According to examples published my Microsoft, we need not close this handle. But the doc of ShellExecute itself is mute on the subject. Can you confirm we indeed do not need to close this handle ?
But then, how can a handle be valid and in no...
In Win32 layer, we often meet ERROR_PATH_NOT_FOUND, ERROR_NAME_NOT_FOUND.
When does WinAPI(eg CreateFileW, RemoveDirectoryW) return these values?
And What's the difference?
If I write a file system driver, when do I set STATUS_OBJECT_PATH_NOT_FOUND or STATUS_OBJECT_NAME_NOT_FOUND?
How do you determine?
I'm so confused.
Is there anyon...
The described setup with 2nd monitor to left of primary causes WM_NCHITTEST to send negative values which is apparently not supported according to this post.
I have a custom control written in win32 that is like a Group control. It has a small clickable area. No MOUSE events are coming to my control when the window containing the cust...