I am trying to call DeviceIoControl from C# for IOCTL_DVD_* control codes. Having read a lot of information and trying a number of examples I have not made much progress.
What I am trying to eventually do is get a DVD_LAYER_DESCRIPTOR structure about the media currently in the DVD drive. I can call CreateFile successfully on the DVD d...
I was going through a legacy code and found that the code uses SuspendThread Function to suspend the execution of a worker thread. Whenever the worker thread needs to process a request, the calling thread resumes this worker thread. Once the task is done the thread suspends itself.
I don’t know why it was done this way. According to me...
Hi all,
I am writing a Network program, and i am using NP_ENUM_NETWORK in my win32 application.
when i serach in my system i am not able to locate this enum
can i know in which header file, i wil get this enum.
is there any SDK provided by microsoft for network application development where i can get this enum.
with regards
Vinayak...
Hi
Can anyone tell me how to create a process in VC++? I need to execute
regasm.exe testdll /tlb:test.tlb /codebase
command in that process.
...
I have a Win32 application, and there are some animiation UI in my application, to make the animiation more smooth, I called timeBeginPeriod to improve the time resolution, but I found the system clock will delay some seconds if my application is running very long time. Does the timeBeginPeriod affect the system clock?
...
It's been yonks since I've done any VB6...
I need to take control of the mouse pointer and move it smoothly between two points.
Is the best way to do this a combination of GetCursorPos, SetCursorPos and a timer or two, or is there a better way?
Thanks for any help.
...
I have a Windows Mobile 6 Professional native project that runs ok on Win Mobile devices. Now I need a version that runs on Windows Embedded CE 6.0 RC2. What is the best path for this conversion? Can I just change few project settings / add new platform with configuration manager OR I have to start with new smart device project and impor...
Dear All,
I am developing an application to get the networks available on the system. Trying to run the same on windows vista. (The below code is based on the link : http://msdn.microsoft.com/en-us/library/ms697388(VS.85).aspx)
Below is the Code Snippet:
#include "Netlistmgr.h"
#include "Objbase.h"
INetworkListManager* pNLM = NULL;
...
I feel like there is an obvious answer to this, but it's been eluding me. I've got some legacy code in C++ here that breaks when it tries to call OpenThread(). I'm running it in Visual C++ 2008 Express Edition. The program first gets the ThreadID of the calling thread, and attempts to open it, like so:
ThreadId threadId = IsThreaded...
I need to draw text onto a window HDC along a circular path using C/C++, and I'm getting google-eyed from searching for several hours. Can someone point me to a good reference?
...
Windows 7 has a very nifty way of showing "Contributing Artist" metadata in Windows Explorer. In wonder how can I access that metadata from C++? Maybe you even point to some source code? Greatly appreciate in advance.
...
Here's a simple OCaml program: helloworld.ml
print_string "Hello world...\n" ;;
I'm using OCaml 3.11.0 (MSVC built), VS 2008, and of course FlexDLL
Here's how I compile it (ran from the VS 2008 shell):
ocamlopt helloworld.ml -o helloworld
No executable created. Is there something wrong?
The program compiled and ran on Linux, though...
Just checking if there's any best practice when writing a Windows Service.
The Service (Single-thread) needs to work at specified time intervals, right now I can only think of:
Use sleep(), then check the time in a loop?
Use a TTimer?
Any advice?
...
I need to find the cluster size of the users hard drive, through C or C++. The hard drive uses NTFS (though I'd appreciate knowing how it's done on other file systems as well).
I guess what I need is some combination of win32 API calls, but I don't know which.
For instance, typing "fsutil fsinfo ntfsinfo c:" in the windows console give...
I am using the Win32 API call SetForegroundWindow to set focus to another application's window. I am then using SendKeys to send keystrokes to that window.
This works well apart from when a modal window (such as a File Open dialog) is open. In this scenario I want to set that modal child window as the foreground window.
Using my main a...
Hello! I'm trying to query the value located in the Process Enviornment Block, pointed to by the FS segment register. Attempting to compile code with the fs:[0] segment included results in an error (error A2108: use of register assumed to ERROR).
How do you query the segment registers?!
Thanks
...
I know that GetProcessTimes can be used to retrieve the time a process spent in user mode (as opposed to the time it spent in kernel mode or the time it was suspended). Unfortunately, it seems that the resolution is only 16ms (the same as GetTickCount).
Is there a way to retrieve the time with greater precision?
...
Hi,
I need a way to prevent the user of a windows mobile based phone to launch my application exe file directly.
I have the following scenario: My windows mobile application has two exe files, one has a shortcut in Applications Menu and the other must be hide for the user. What i want is to not allow the user to manually execute my hid...
I am trying to get a list of shares on a specific machine. So I decided to use the Windows API NetApi32.dll. Here is my code snippet:
Dim svr As String = Environment.MachineName
Dim level As Integer = 2
Dim sharesRead As Integer, totalEntries As Integer, nRet As Integer, hResume As Integer = 0
Dim pBuffer As IntPtr = IntPtr.Zero
nRet =...
How to add properties to a file like the Windows Office?
In Windows, is possible to edit fields from a file like Title, Subject, Keywords etc. How to do the same with an arbitrary file from C/C++ without using Office?
Do you have any hint about API, DLLs or general tricks?
...