473,395 Members | 1,466 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

CreateProcess ignores dwX,dwY parameters in STARTUPINFO

I am trying to create a process at a particular set of coordinates (for
example 1,1) but the CreateProcess api seemingly ignores the settings in the
dwX and dwY properties of the STARTUPINFO structure which I have initialized
as follows:

STARTUPINFO si;
ZeroMemory((PVOID)&si, sizeof(si));
si.cb = sizeof(si);
si.dwFlags = STARTF_USEPOSITION;
si.dwX = 1;
si.dwX = 1;

PROCESS_INFORMATION pi;

and start the application as follows:

CreateProcess(NULL, "notepad.exe", NULL, NULL, FALSE,
CREATE_DEFAULT_ERROR_MODE, NULL, NULL, &si, &pi);

The application window is not displayed at coordinates 1,1.
Mar 23 '06 #1
1 2661
Hi itmanager!
I am trying to create a process at a particular set of coordinates (for
example 1,1) but the CreateProcess api seemingly ignores the settings in the
dwX and dwY properties of the STARTUPINFO structure
I doubt that CreateProcess ignores these settings.
The problem is that the called application must handle these parameters
which are passed in WinMain...
CreateProcess(NULL, "notepad.exe", NULL, NULL, FALSE,
CREATE_DEFAULT_ERROR_MODE, NULL, NULL, &si, &pi);


And it seems that notepad is not using these values...

See: GetStartupInfo
http://msdn.microsoft.com/library/en...tartupinfo.asp
Greetings
Jochen
Mar 23 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: david.humpherys | last post by:
os:winnt python2.3.2 I have a exe that dumps info to the command line. I want to run this process and capture the stdout into a file. I think i'm close... any help appreciated. dh...
1
by: afatdog | last post by:
int retValue; string Application = Environment.GetEnvironmentVariable("windir") + @"\Notepad.exe"; string CommandLine = @" c:\boot.ini"; Doghole.MKernel32.PROCESS_INFORMATION pInfo = new...
0
by: Girish NS | last post by:
Hi, I 'm trying to start mlcfg32.cpl thru CreateProcess(). The .cpl file is in C:\Program Files\Common Files\System\Mapi\1033 folder instead of C:\WINNT\system32 where the default control panel...
3
by: kal | last post by:
Hi, I am trying to write an application that will launch a second application using CreateProcess... SECURITY_ATTRIBUTES sa; STARTUPINFO si; PROCESS_INFORMATION pi; ::ZeroMemory( &sa,...
5
by: Stefano Camaiani | last post by:
Hello, please someone have the working code on how to call the CreateProcess API in Vb.Net? I need to call the CreateProcess API directly and i should not use the Vb.Net Process functions like dim...
0
by: Mike Dole | last post by:
I'm trying to run a DOS executable with CreateProcessWithLogon instead of running it as a batch job. It runs fine as a batch job but doesn't run when the workstation is locked, that's why I wanna...
1
by: Jai | last post by:
Please provide sample code for using Createprocess in VB.NET. The code I am using is given below. But I get "Error 91: Object referrence not set to an instance of the object" at CreateProcess...
1
by: stefan.sedich | last post by:
Hi I am trying to open an email in outlook with the following string command = "c:\\Program Files\\Microsoft Office\\OFFICE11\\OUTLOOK.EXE c:\\a.msg"; StartupInfo si = new StartupInfo();...
3
by: wtfdan | last post by:
When I call the method perform_single_upload() in this loop: ---------------------------- private: System::Void start_uploads(int i) { i = 0; while(i < master_list->Length) { //Create a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.