ChrisRChamberlain
Programmer
Hi
I am developing a VFP application for use with Zeon corporation's PDFCMD Control Interface.
By way of background, this is a 32 bit command line program to provide basic PDF handling functions, expressed as "C:\path\pdfcmd c -c target.pdf first.pdf second.pdf..." etc.
The command line string is "assembled" by the interface into a memo field, .string, in a cursor named CMD_LINE, and executed through the following code:-
DECLARE INTEGER WinExec IN kernel32 ;
[tab]STRING lpCmdLine ,;
[tab]INTEGER uCmdShow
* 0 = Hide
* 1 = Normal
* 3 = Maximized
* 6 = Minimized
WITH THISFORM
[tab]DO CASE
[tab]CASE .opgShowWindow.Value = 1
[tab][tab]lnWindow = 0
[tab]CASE .opgShowWindow.Value = 2
[tab][tab]lnWindow = 6
[tab]CASE .opgShowWindow.Value = 3
[tab][tab]lnWindow = 1
[tab]OTHE
[tab][tab]lnWindow = 3
[tab]ENDC
ENDW
lcProg2Run = ALLT(CMD_LINE.string)
IF !WinExec(lcProg2Run,lnWindow) > 31
[tab]WAIT WINDOW [Unable to create PDF]
ENDIF
If the length of the command line is in excess of approx 300 characters, (it varies), Windows 98SE is likely to crash bigtime without warning, often requiring the use of the Reset button.
According to Zeon, there is no practical limit to the length of the command line string, so the problems appears to be with the way VFP is interacting with Windows through this WinAPI call, and therefore is there a limit on the length of the command line string?
Any ideas please?
Chris
I am developing a VFP application for use with Zeon corporation's PDFCMD Control Interface.
By way of background, this is a 32 bit command line program to provide basic PDF handling functions, expressed as "C:\path\pdfcmd c -c target.pdf first.pdf second.pdf..." etc.
The command line string is "assembled" by the interface into a memo field, .string, in a cursor named CMD_LINE, and executed through the following code:-
DECLARE INTEGER WinExec IN kernel32 ;
[tab]STRING lpCmdLine ,;
[tab]INTEGER uCmdShow
* 0 = Hide
* 1 = Normal
* 3 = Maximized
* 6 = Minimized
WITH THISFORM
[tab]DO CASE
[tab]CASE .opgShowWindow.Value = 1
[tab][tab]lnWindow = 0
[tab]CASE .opgShowWindow.Value = 2
[tab][tab]lnWindow = 6
[tab]CASE .opgShowWindow.Value = 3
[tab][tab]lnWindow = 1
[tab]OTHE
[tab][tab]lnWindow = 3
[tab]ENDC
ENDW
lcProg2Run = ALLT(CMD_LINE.string)
IF !WinExec(lcProg2Run,lnWindow) > 31
[tab]WAIT WINDOW [Unable to create PDF]
ENDIF
If the length of the command line is in excess of approx 300 characters, (it varies), Windows 98SE is likely to crash bigtime without warning, often requiring the use of the Reset button.
According to Zeon, there is no practical limit to the length of the command line string, so the problems appears to be with the way VFP is interacting with Windows through this WinAPI call, and therefore is there a limit on the length of the command line string?
Any ideas please?
Chris