BoxedApp SDK Help >> Functions

BoxedAppSDK_CreateProcessFromMemory [deprecated]

Description

Creates a process from a memory block.

This function is deprecated.
Please use usual functions like CreateProcess, WinExec, ShellExecute and so on to launch a process based on a virtual EXE. For example:

[ C++ ]
HANDLE h = 
   BoxedAppSDK_CreateVirtualFile(
      _T("1.exe"), 
      GENERIC_WRITE, 
      FILE_SHARE_WRITE, 
      NULL, 
      CREATE_NEW, 
      0, 
      NULL);
...
DWORD nWritten;
WriteFile(h, pData, dwSize, &nWritten, NULL);
CloseHandle(h);
...
CreateProcessA(NULL, "1.exe", NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);

Syntax

[ C++ ]
BOOL BOXEDAPPSDKAPI BoxedAppSDK_CreateProcessFromMemory(
	LPCVOID pBuffer, 
	DWORD dwSize, 

	LPCTSTR lpApplicationName,
	LPCSTR lpCommandLine,
	LPSECURITY_ATTRIBUTES lpProcessAttributes,
	LPSECURITY_ATTRIBUTES lpThreadAttributes,
	BOOL bInheritHandles,
	DWORD dwCreationFlags,
	LPVOID lpEnvironment,
	LPCTSTR lpCurrentDirectory,
	LPSTARTUPINFO lpStartupInfo,
	LPPROCESS_INFORMATION lpProcessInformation
);

[ Delphi ]
function BoxedAppSDK_CreateProcessFromMemory(
	pBuffer: Pointer;
	dwSize: DWORD;

	lpApplicationName: PAnsiChar; 
	lpCommandLine: PAnsiChar;
	lpProcessAttributes, lpThreadAttributes: PSecurityAttributes;
	bInheritHandles: BOOL; 
	dwCreationFlags: DWORD; 
	lpEnvironment: Pointer;
	lpCurrentDirectory: PAnsiChar; 
	const lpStartupInfo: TStartupInfo;
	var lpProcessInformation: TProcessInformation): BOOL; stdcall;



Copyright © 2004 - 2009 Softanics. All rights reserved.
BoxedApp is a trademark of Softanics.