How to well use the WinAPI to manage the fullscreen mode on windows's window ?
Here is my problem :
I have an application which has to be fullscreen.
I use ChangeDisplaySettings() function (winuser.h) with the CDS_FULLSCREEN value to put my window to fullscreen mode when receiving a WM_ACTIVATE with (wParam == WA_ACTIVE || wParam == WA...
Hi All,
Is there a way to find the currently open file from an Excel or Word process?
For example, i want to get all the list of running processes in windows and which files they currently have open.
Thanks in advance!
...
Hi all
Here's the thing.
A two-way communication (RPC-style) is needed between Javascript on HTML pages provided by a web server online (with session-management and whatnot) and a windows EXE application running on the PC of the website visitor.
Both are parts of the same 'package' and should be able to communicate.
There is the us...
Hi guys
I'm starting with Android development and I have no idea what's wrong on the this command line:
C:\Documents and Settings\Gabriel.Esquivel.android\avd>android create avd -n Ev
o4G -t 9 -c 8000MB -s 480-800
Valid skins: WVGA854, WQVGA400, HVGA (default), WQVGA432, WVGA800, QVGA
Error: '480-800' is not a valid skin name or size ...
Please see the code below:
#include <windows.h>
int main(int argc, char* argv[])
{
HANDLE _mutex = ::CreateMutex(NULL, FALSE, "abc");
if (!_mutex)
throw std::runtime_error("CreateMutex failed");
if (::WaitForSingleObject(_mutex, INFINITE) != WAIT_OBJECT_0)
throw std::runtime_error("WaitForSingleObject failed...
So I'm trying to get the right Device Context so I can set the gamma ramp on individual monitors in an N monitor configuration (2+).
I've tried
[DllImport("gdi32.dll")]
static extern IntPtr CreateDC(string lpszDriver, string lpszDevice, string lpszOutput, IntPtr lpInitData);
With this method I'm using the string "DISPLAY" for lpszDr...
I need an algorithm that converts any file format to its .PRN file equivalent which will be compatible for a specific printer (for example, only in CANON printers).
Or I need a source code or way to know how printer drivers work. Printer drivers are the one who specifies or creates the .PRN file of any type. So please help me. Thanks!
...
ok im setting a cursor in a loop it works but when i move the cursor it just changes back to the way it was. im using win32 api and i used
SetCursor(LoadCursor(hInstance, MAKEINTRESOURCE(IDC_PROTECTED)));
any idea
...
Hi, I have read few articles about different Windows C entry pooints, wmain and WinMain.
So, if I am correct, these are added to C language compilers for Windows OS. But, how are implemented?
For example, wmain gets Unicode as argv[], but its Os that sends these arguments to program, so is there any special field in the .exe file entry...
Is there a good reason?
Are their internal functions (not exported) also stdcall convention?
...
Hi, Where can i find those and learn about a modern way to start off a project from scratch or any other recommended book?
...
It's my guess.
We list a files and directory by Windows Explorer.
If Windows Explorer meets a exe file, it does,
LoadLibraryEx(ExefileName, LOAD_LIBRARY_AS_DATAFILE)
Then extracts the icon, and represents it.
But I'm not sure.
Is there anyone who knows well about this?
I'm finding a nice case with LOAD_LIBRARY_AS_DATAFILE
Is th...
Hi,
I know that to receive notifications about win32 process creation or termination we might implement a NT kernel-mode driver using the APIs PsSetCreateProcessNotifyRoutine() that offers the ability to register system-wide callback function which is called by OS each time when a new process starts, exits or is terminated.
My question...
Or do I have to use threads? (C++)
...
Hi,
I am playing around with lucene and 40GB of data (~500M of tuples, 2 fields behaving like key - value). I have created -- a suprise -- a 35 GB index which does not work. Therefore I want to create a set of smaller indicies but, for that, I need information about maximum size.
...
I have two processes, a producer and a consumer. IPC is done with OpenFileMapping/MapViewOfFile on Win32.
The producer receives video from another source, which it then passes over to the consumer and synchronization is done through two events.
For the producer:
Receive frame
Copy to shared memory using CopyMemory
Trigger DataProduced...
I want to find out for how long (approximately) some block of code executes. Something like this:
startStopwatch();
// do some calculations
stopStopwatch();
printf("%lf", timeMesuredInSeconds);
How?
...
Hello,
I am implemeting a plugin for Winamp. I have a MessageBox when the plugin starts which asks the user for a certain task. However, the problem is that this MessageBox goes in the background as Winamp starts. I would like this MessageBox to have focus - or wait for an answer.
The relevant code:
int answer(MessageBoxA(
plugin....
We are developing an NDIS protocol and miniport driver. When the driver is in-use and the system hibernates we get a bug check (blue screen) with the following error:
LOCKED_PAGES_TRACKER_CORRUPTION (d9)
Arguments:
Arg1: 00000001, The MDL is being inserted twice on the same process list.
Arg2: 875da420, Address of internal lock trackin...
When I call pthread_exit from main, the program never gets to terminate. I expected the program to finish, since I was exiting the program's only thread, but it doesn't work. It seems hung.
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
int main(int argc, char *argv[])
{
printf("-one-\n");
pthread_exit(NULL);
...