- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I was using 'winexec' to edit data files using notepad in my application.I read recently that winexec is good only for 16 bit and createprocess should be usedfor applications.
However I am not able to use createprocess successfully.For starters I do not know what to use for the startupinfo and process information structure.Can anyone give me an example using createprocess.
Can Shellexecute be used instead or is it also only 16 bit compatible?
--rswy
I was using 'winexec' to edit data files using notepad in my application.I read recently that winexec is good only for 16 bit and createprocess should be usedfor applications.
However I am not able to use createprocess successfully.For starters I do not know what to use for the startupinfo and process information structure.Can anyone give me an example using createprocess.
Can Shellexecute be used instead or is it also only 16 bit compatible?
--rswy
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Example code:
program ed use dfwbase use kernel32 implicit none type (T_STARTUPINFO) si type (T_PROCESS_INFORMATION) pi call ZeroMemory (LOC(si), SIZEOF(si)) call ZeroMemory (LOC(pi), SIZEOF(pi)) si%cb = SIZEOF (si) si%dwFlags = STARTF_USESTDHANDLES if (CreateProcess(NULL,'notepad junk.txt'c,NULL,NULL,FALSE,0,NULL,NULL,si,pi) /= 0) then print *, 'Process created', pi%dwProcessId else print *, 'CreateProcess error', GetLastError() end if end program edJames

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page