This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MAP | |
ParseTokenStringIntoQueue(CONST *STRING pString,STRING pToken,*QUEUE OutQueue,BYTE pBlanksOk=0),LONG,PROC !Return Count | |
END | |
ParseTokenStringIntoQueue PROCEDURE(CONST *STRING pString,STRING pToken,*QUEUE OutQueue,BYTE pBlanksOk=0)!,LONG,PROC !Return Count | |
SLen LONG,AUTO !pString Length | |
Ndx LONG,AUTO | |
TokenVal BYTE,AUTO !When hunting for chars I like VAL compares | |
BegPos LONG(1) !BegPos = 1 required to work right | |
EndPos LONG,AUTO !EndPos = 0 required to work right |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MAP | |
SmashSpaces PROCEDURE(*string InOutText, BYTE Leave1Space=0) | |
MODULE('RTL') | |
LenFastClip PROCEDURE(CONST *STRING Text2Measure),LONG,NAME('Cla$FASTCLIP'),DLL(dll_mode) | |
!RTL has had this since at least C55. It is much faster because it passes *STRING and is CLIP and LEN in one call | |
END | |
END | |
SmashSpaces PROCEDURE (*string Txt, BYTE Leave1Spc=0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MAP | |
Err4Msg PROCEDURE(Byte NoCRLF=0),STRING !Fromat ErrorCode() & Error() & FileError... for Message() Stop() Halt() or Log file (NoCRLF) | |
END | |
!----------------------------------------- | |
Err4Msg PROCEDURE(Byte NoCRLF=0)!,STRING | |
!Example: IF ERRORCODE() THEN STOP('Failed ADD(xxx)' & Err4Msg()). | |
!Note: Return starts '<13,10><13,10>Error Code:' so no need to put in the Message() | |
CODE | |
IF ~ERRORCODE() THEN RETURN ''. | |
IF ~NoCRLF THEN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MODULE('RTL') | |
LenFastClip PROCEDURE(CONST *STRING Text2Measure),LONG,NAME('Cla$FASTCLIP'),DLL(dll_mode) | |
END | |
MODULE('RTL') | |
LenFastClip(CONST *STRING Text2Measure),LONG,NAME('Cla$FASTCLIP'),DLL(dll_mode) | |
END | |
!Use LenFastClip() or FastClip() instead of LEN(CLIP( string )) | |
!This has been around since at least C55. It runs much faster by passing *STRING. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// from https://github.com/WhitakerDaniel/UnsignTool | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
// For information on ImageRemoveCertificate, see: https://docs.microsoft.com/en-us/windows/desktop/api/imagehlp/nf-imagehlp-imageremovecertificate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- #################### Clarion110.RED #################### -- | |
-- Project Redirection for Clarion 11.0 to Copy the Clarion10\Bin\Debug DLLs only for Debug builds | |
-- This RED has a [Copy] *.dll = %BIN%\debug | |
{include clarion_DebugDllCopy.red} | |
-- this includes the normal RED -- | |
{include %REDDIR%\%REDNAME%} | |
-- review: https://clarionhub.com/t/how-to-improve-the-call-stack-when-your-program-gpfs/188 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tips: https://clarionhub.com/c/ide/tips/19 | |
IDE: https://clarionhub.com/c/ide/9 | |
Msbuild example for Clarion | |
https://clarionhub.com/t/msbuild-example-for-clarion/274/10 | |
FIXED statement in EXP for 4% smaller EXE without .reloc table | |
https://clarionhub.com/t/fixed-statement-in-exp-for-4-smaller-exe-without-reloc-table/3450/4 | |
How to successfully start the debugger from the command line? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!Use the POPUP('xxx', X, Y, 1=Relative) to position a POPUP() right under a Button so it appears to drop down | |
!The fourth parameter is not documented well. Pass 1 to indicate the X/Y are Relative so can use Clarion GetPosition() | |
! | |
!Replace existing Popup() placing the ?Control as the first parameter | |
!Example: OF ?MenuBtn ; CASE PopupUnder(?,'Copy|Delete') | |
!--------------------------------------- | |
MAP | |
PopupBeside(LONG BesideCtrlFEQ, STRING PopMenu),LONG | |
PopupUnder(LONG UnderCtrlFEQ, STRING PopMenu),LONG | |
PopupBeside PROCEDURE(LONG BesideCtrlFEQ, STRING PopMenu),LONG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!DEP Policy Test by Carl Barnes released under the MIT License | |
!C11.13620 has a new Project DEP setting. This does NOT require 13620 | |
!You do NOT need the new 13620 DEP Project setting to turn on DEP, just call SetProcessDEPPolicy(1) | |
!You can add this procedure in your application to check DEP status at runtime on the end user machine. | |
!It probably should be wrapped in a simple CLASS. | |
! | |
!FYI - DEP sets the IMAGE_DLLCHARACTERISTICS_NX_COMPAT bit in the IMAGE_OPTIONAL_HEADER‘s DllCharacteristics. | |
!-------------------------------------------------------------------------------------- | |
!Must DEP be turned On in Both EXE and DLL projects? NO. Only the EXE the project. | |
! It is suggested to turn on DEP in the DLL as an FYI it works with DEP. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!Add local ReportPrint() | |
!Define: DbgString BYTE | |
! | |
!Change PRINT(Rpt:Detail) to ReportPrint(?Detail,'Rpt:Detail') | |
!If desired set DbgString=1 and each Band gets a String Label 'Rpt:Detail' | |
MAP | |
ReportPrint PROCEDURE(LONG BandFEQ, STRING BandName) | |
END | |
DbgString BYTE |