Process Pool Demo: Difference between revisions
m
Update
m (Typo fix) |
m (Update) |
||
Line 232: | Line 232: | ||
// Finally it calls ProcessImageFileName to see if that is one of the | // Finally it calls ProcessImageFileName to see if that is one of the | ||
// processes running for THIS WebApp. However ProcessImageFileName | // processes running for THIS WebApp. However ProcessImageFileName | ||
// returns a file-path starting with the disk identifer in | // returns a file-path starting with the disk identifer in a slightly odd | ||
// | // form, i.e. "\DEVICE\HARDDISKVOLUMEn" (n is "1" for my C: drive) and even | ||
// | // spookier things for mapped drives, so we strip off the "C:\", or whatever, | ||
// application file name DataFlex returns and uppercase both | // from the application file name DataFlex returns and uppercase both, then | ||
// | // compare THAT to the same length of the right-portion of the image name. | ||
// This may screw up if you have more than one identically pathed web-apps | |||
// on different drives - just so you know. <g> | |||
// | // | ||
// Note: that although the docs (and the declarations) use DWords, | // Note: that although the docs (and the declarations) use DWords, | ||
// on Vincent's advice we are using UIntegers in our code (the same | // on Vincent's advice we are using UIntegers in our code (the same | ||
// thing in reality) because you can use SizeOfType(UInteger) in the | // thing in reality) because you can use SizeOfType(UInteger) in the | ||
// | // Watches window when debugging, which you can't for DWord. | ||
Procedure FindWebAppProcs | Procedure FindWebAppProcs | ||
Integer[] aiWebAppProcs | Integer[] aiWebAppProcs | ||
UInteger[] auiProcs | UInteger[] auiProcs | ||
UInteger uiCb uiNeeded uiSize uiErr | UInteger uiCb uiNeeded uiSize uiErr | ||
Integer iOK i iLast iPos iSize | Integer iOK i iLast iPos iSize iPathLen | ||
Handle hProc | Handle hProc | ||
UChar[] ucaFile | UChar[] ucaFile | ||
Line 255: | Line 257: | ||
Move (Pos("\", sPath)) to iPos | Move (Pos("\", sPath)) to iPos | ||
Move (Right(sPath, (Length(sPath) - iPos))) to sPath | Move (Right(sPath, (Length(sPath) - iPos))) to sPath | ||
Move (Length(sPath)) to iPathLen | |||
Move 4096 to iSize | Move 4096 to iSize | ||
Line 284: | Line 287: | ||
Move (ResizeArray(ucaFile, uiSize)) to ucaFile | Move (ResizeArray(ucaFile, uiSize)) to ucaFile | ||
Move (Uppercase(UCharArrayToString(ucaFile))) to sImage | Move (Uppercase(UCharArrayToString(ucaFile))) to sImage | ||
Move (Right(sImage, iPathLen)) to sImage | |||
Move (Right(sImage, | |||
If (sImage = sPath) ; | If (sImage = sPath) ; | ||
Line 504: | Line 505: | ||
End_Object | End_Object | ||
Object oWebValue is a cWebForm | |||
Set piColumnIndex to 0 | |||
Set piColumnSpan to 4 | |||
Set psLabel to "Your entered value:" | |||
Set psValue to "Hello!" | |||
Set peLabelAlign to alignRight | |||
Set piLabelOffset to 250 | |||
End_Object | |||
Object oNote is a cWebLabel | |||
Set psCaption to "(This is a web property - psValue of oWebValue - so will not change unless YOU change it)" | |||
Set piColumnIndex to 4 | |||
Set piColumnSpan to 4 | |||
End_Object | |||
Object oButtonSpacer is a cWebSpacer | Object oButtonSpacer is a cWebSpacer | ||
Set piHeight to 20 | Set piHeight to 20 |