Let say I have three thread handles
HandleList[0] = hThread1;
HandleList[1] = hThread2;
HandleList[2] = hThread3;
/*All the above are of type HANDLE*/
Before closing the application, I want the thread to get its task done. So I want to make app wait till thread completes.
So I do,
WaitForMultipleObjects(3, HandleList, TRUE, INFINITE...
In Delphi 2010, I want to allow users to browse and select a folder. The folder is on a device (?) created by a DSLR:
The folder is visible in the Windows Explorer as shown above. And, the folder is visible in a TOpenDialog, allowing them to browse into the folder and choose a file.
Unfortunately, I have been unable to get either S...
Hi,
I need to get the text of an error code that i got from the GetLastError function.
I saw a few examples but i want a function that get the code and return the string.
Thank's you all
...
Dear all,
when i include #include to use the IOCTL_MOUNTMGR_QUERY_POINTS
i get the below error
fatal error C1083: Cannot open include file: Mountmgr.h: No such file or directory
How can i solve this error.
Please guide me
...
hi,
I would like to detect the direction of the current typing (input) language.
I may detect the language by means of "GetKeyboardLayout", but then I'll have to check if it equals to Arabic or Hebrew and so on, is there any way just to detect the direction, i.e. left to right or right to left.
thanks!
mike.
...
I want to add a simple panel to a dialog created using Visual Studio resource editor, but the resource editor doesn't allow this - I need to add my own CWnd as a dialog child. However that way I think I have to use CWnd::Create manually, and pass in names for the class and the window.
I want to create an ID like IDC_MYPANEL, and as much...
We have some code that works and it's a Win32 app with a GUI, but I would like to be able to trigger it from the command line as well (silent mode). Is there any easy way to do this? Or do I have to create another project as a command line application?
...
In the WIX setup I've got, when upgrading the application I have set a requirement to close down applications which might hold on to files which needs to be updated:
<util:CloseApplication
Id="CloseMyApp"
Target="[MyAppExe]"
CloseMessage="yes"
Description="!(loc.MyAppStillRunning)"
RebootPrompt="no"
ElevatedClos...
Hello!
I have some code which shows a simple dialog box and handles user action (written using plain WinAPI).
// Display dialog and handle user action
LRESULT choice = DialogBoxParam(NULL, MAKEINTRESOURCE(AP_IDD_DIALOG), NULL, (DLGPROC)DialogCallback, NULL);
Is there any way to hardcode the resource file dialog.rc, which is used to ...
In x86, I get the function address using GetProcAddress() and write a simple XOR EAX,EAX; RET 4; in it. Simple and effective. How do I do the same in x64?
bool DisableSetUnhandledExceptionFilter()
{
const BYTE PatchBytes[5] = { 0x33, 0xC0, 0xC2, 0x04, 0x00 }; // XOR EAX,EAX; RET 4;
// Obtain the address of SetUnhandledExceptionFilt...
I want to use this function to get contours and within these contours, I want to get cubic bezier. I think I have to call it with GGO_BEZIER. What puzzles me is how the return buffer works.
"A glyph outline is returned as a
series of one or more contours defined
by a TTPOLYGONHEADER structure
followed by one or more curves. Eac...
Hello,
I want to know the types and details in a plain Win32DLL just like we can get in case of COM.In COM every thing embed inside idl and results in TLB, here we get every thing , MSFT exposes APIS by which we can extract types.
In case of Win32 I strongly needed types defined in it and all details of that type(e.g what are members i...
Hi !
I wanted to create a custom combo box like this (as in MS Word),
Are there any Win32 API calls (I can't use MFC) to get this job done, (like ChooseColor() or ChooseFont()? If there aren't any, can anyone please tell me how to do this? Thanks you.
Regards,
EDIT:
Creating the Owner-Drawn Dialog Box!! Is this the only way ?
http:...
Dear all,
I am not able to know how to use the IOCTL_MOUNTMGR_QUERY_POINTS .
I have searched the internet and found some sample code to try with.
but i am not sure whether its correct or not....
can you please let me know how to use the IOCTL_MOUNTMGR_QUERY_POINTS to get the drive letter
Thank you for your time
below is my source c...
How to get PIDs of processes that are using a given file name and mutex name?
(Not by custom kernel driver, but in C# in user mode.)
UPDATE: Thanks to Daniel Renshaw I found a script that lists all handles with PIDs. (Using a not undocumented and unfrozen functions.)
...
Is there a way to handle "Pin this program to taskbar" user action in the code? Is there such an event in Taskbar API? My search didn't give any results.
The reason behind this: my X.exe is launched through some other Y.exe executable, and if user clicks 'Pin' while Y.exe is running, I want to change this shortcut to the actual X.exe.
...
Hello,
I am trying to give my ComboBox an in place tooltip for long strings. However when I call SetWindowPos on the tooltip, the position is never changed. Called when TTN_SHOW is received:
::SetWindowPos(textTooltip, NULL, TipRect.left, TipRect.top, 0, 0, SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOZORDER);
If I remove the SWP_NOSIZE flag ...
#include <windows.h>
int main()
{
int* i = (int*)malloc(sizeof(int));
*i = 5;
__try
{
free(i);
free(i);
}
__except
{
return -1;
}
return 0;
}
I am trying to learn more about windows SEH. My first test program is giving me some real trouble. I have looked at the msdn documenta...
I want to run the app in silent mode by passing in a parameter, otherwise I will show the window.
...
Is it possible to determine the day of the week, using SYSTEMTIME, if a date (month-day-year) is provided or is this structure one-way only?
What is the most lightweight way to accomplish what I am asking if SYSTEMTIME cannot do it (using Win32)?
...