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 the slightly
     // returns a file-path starting with the disk identifer in a slightly odd
     // odd form "\DEVICE\HARDDISKVOLUMEn" (n is "1" for my C: drive), so we
     // form, i.e. "\DEVICE\HARDDISKVOLUMEn" (n is "1" for my C: drive) and even
     // strip that off and also strip off the "C:\", or whatever, from the
     // spookier things for mapped drives, so we strip off the "C:\", or whatever,
     // application file name DataFlex returns and uppercase both before
     // from the application file name DataFlex returns and uppercase both, then
     // comparing them.
    // 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.
     //      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 (Replace("\DEVICE\HARDDISKVOLUME", sImage, ""))    to sImage
                 Move (Right(sImage, iPathLen))                         to sImage
                Move (Pos("\", sImage))                                to iPos
                 Move (Right(sImage, (Length(sImage) - iPos)))           to 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