Hi,
I'm creating a process and making a lot of kernel objects requisition to the system. My code is that:
int main(){
//Cria processo para o Data Viewer Unit
LPSTARTUPINFOA si;
PROCESS_INFORMATION pi;
// Start the child process.
if(!CreateProcessA(
"E:\\Documents\\Faculdade\\Matérias\\Automação em Tempo R...
Hello:
I have a simple code running in a DLL called from MFC application. Generally it implements the example that is shown in msdn article - http://msdn.microsoft.com/en-us/library/ms682499%28VS.85%29.aspx. Except I just want to create any process (say shell script). All the process creation is done fine with no errors. However, ReadFi...
Our application requires HASP SRM device driver to be installed in order for ours to install and run.
At this time, only their 5.50 drivers work consistently on all tested platforms (both their 5.75 (official) and 5.86 (beta) drivers crash on about 1 in 3 computers tested).
Hence, their 5.50 drivers are good, anything else currently av...
Hi,
I'm trying to use CreateProcess to launch a powershell script from within my application.
I've used the Microsoft example (http://msdn.microsoft.com/en-us/library/ms682499(VS.85).aspx) to create the child process and redirect the standard out/in/err pipes.
The only issue left to solve is why the child process (powershell) do not ...
I have this api routine that I use regularly to capture dos output. Recently a strange bug has been found where it doesn't seem to allow dns calls. For instance nslookup will return the "No response from server" error with Server: UnKnown. Ping will work if you supply it an IP address, but not if it has to make a dns call. This problem i...
I'm trying to launch a Java app from a C++ app using the following code:
#include <windows.h>
#include <memory.h>
#include <tchar.h>
int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) {
STARTUPINFOW siStartupInfo;
PROCESS_INFORMATION piProcessInfo;
memset(&siStartupI...
Hi folks,
I am currently working on a C++ programm which calls another C# programm I have code-level access to. However when I call the program using CreateProcess(0, temp2, 0, 0, false, 0, 0, 0, &si, &pi) where temp2 contains the executable including command line parameters the C# program starts but the OnLoad event of the MDIForm (= m...
Hello all,I have my main application ,from my main application I will be calling another
module(third party) to perform a small operation in my main application,when I call that module..it processes for a particular time say 5 sec.while its proccessing it shows the process in the commmand window with some information..now my main applica...
Is there a way to link an existing .exe file with other C++ source files during compilation? What I'm actually trying to do is to compress and decompress some files in my console program using LZMA(7zip) SDK but unfortunately it's very difficult to use for a newbie.
There is a command line version of LZMA called 7za.exe and I am wonder...
CreateProcess() returns false when the commandline contains a path.I don't understand why.
Here I simplified the operation:
function ExecProcess(path:string):boolean;
var StartupInfo:TstartupInfo;
ProcInfo:TProcessInformation;
begin
FillChar( StartupInfo, SizeOf( TStartupInfo ), 0 );
StartupInfo.cb := SizeOf( TStartupInfo );
...
Hi
I am using CreateProcess() to run an external console application in Windows from my GUI application. I would like to somehow gather the output to know whether there were errors. Now I know I have to do something with hStdOutput, but I fail to understand what. I am new to c++ and an inexperienced programmer and I actually don't kn...
I'm trying to start SQLServer2008SP1 express installer from the NT service process. Process is started successfully, I can see it in task manager, but it does nothing, just stays inactive until I kill him.
I'm starting the process with the following command:
szCmdLine = "Setup.exe /Q /HIDECONSOLE /ACTION=install /CONFIGURATIONFILE=Con...
I wrote
function CreateProcess(
lpApplicationName:String;
lpCommandLine:String;
lpProcessAttributes:IntPtr;
lpThreadAttributes:IntPtr;
bInheritHandles:Boolean;
dwCreationFlags:Int32;
lpEnvironment:IntPtr;
lpCurrentDirectory:IntPtr;
...
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 am trying to work out why an NPAPI plugin I have written, which works fine in terms of performing operations triggered via Javascipt calls, cannot use CreateProcess() or ShellExecute() to launch an application from a path specified via the Javascript call.
I can seemingly use either of these methods and they return success, i.e. no e...
Hi.
I wish to call a x64 exe from x86 process/exe, for example:
open x32 cmd : %windir%\SysWoW64\cmd.exe
start notepad: notepad.exe <- it will be x32 notepad (according to taskmanager = *)
Is it possible to execute the x64 notepad from the x32 cmd ?
My problem is the process I'm executing must run as x64, I don't want it to wor...
I have two processes, A and B. At some point A creates B. After B is created, if A's process tree is killed, I want B to still be around.
I am using CreateProcess() to create B, and I can't seem to find any way to make it create the process without it being a child. Same thing with ShellExecuteEx(), but I am probably missing some flag.
...
Edit :
Fixed, the issue was with the spawned EXE that did not handle the parameters properly (perl script that was byte compiles)
Thanks again.
Max.
(probable duplicate of http://stackoverflow.com/questions/1135784/createprocess-doesnt-pass-command-line-arguments)
Is there a difference between passing an argument vs. passing a par...
In Windows, I currently have two programs working as follow. Program A calls Program B with some parameters, which causes Program B to return some text then exits. Program A calls Program B again with other parameters, which causes Program B to do more things.
When Program B starts, it needs to do some time consuming loading. The method...
Hi,
I have a problem with GetCommandLine API.
It usually returns the executable name followed by a space and arguments. As documentation says, the first token may not have complete path to image and blah blah blah.
I never had problems until now that I used CreateProcess with lpApplicationName not NULL
If I use:
CreateProcess(NULL, ...