Jump to content

RTollison

Members
  • Content Count

    101
  • Joined

  • Last visited

Everything posted by RTollison

  1. user wants a chart to show the records in a table. the tables structure is quite simple: date, value1, value2,... value10 a date and then 10 numbers, the numbers are not in any order and that is fine. they max out at 200. 11/01/23, 101, 12, 32, 157, 1, 77, 18, 182, 45, 133 11/02/23,.... 11/03/23,... in a mock up of the chart i put the series titles as the date and the data values i entered all down in 10 rows and showed him the sample and he said that was exact what he wanted. now in my dataset query i am pulling * with date range but now matter what i try to do in the dbchart i cant seem to replicate. there is no correspondence between the numbers start/end from date to date. even if the numbers are the exact same and in the same order then so be it. select * from table1 is basic query with a date range and that is working fine just not sure how to tie that data into the chart to get the same results.
  2. RTollison

    dbchart lines, not getting results desired

    here is what i found and tested. works to a degree (no series titles but he seems ok with it) just a mess looking to me. begin DBChart1.View3D:=false; DBChart1.Legend.Visible:=false; with DBChart1.AddSeries(TFastLineSeries) as TFastLineSeries do begin XValues.Order:=loNone; TreatNulls:=tnDontPaint; adodataset1.First; while not adodataset1.Eof do begin AddNullXY(0,0); //start a new line AddXY(0,adodataset1.FieldByName('num_1').AsInteger); AddXY(1, adodataset1.FieldByName('num_2').AsInteger); AddXY(2, adodataset1.FieldByName('num_3').AsInteger); AddXY(3, adodataset1.FieldByName('num_4').AsInteger); AddXY(4, adodataset1.FieldByName('num_5').AsInteger); AddXY(5, adodataset1.FieldByName('num_6').AsInteger); AddXY(6, adodataset1.FieldByName('num_7').AsInteger); AddXY(7, adodataset1.FieldByName('num_8').AsInteger); AddXY(8, adodataset1.FieldByName('num_9').AsInteger); AddXY(9, adodataset1.FieldByName('num_10').AsInteger); adodataset1.Next; end; end; end;
  3. RTollison

    open dialog

    is there a way with the TFileOpenDialog to limit the directory to a specified folder or downstream but not allow going upstream. c:\myfolder\ and any subfolder from there but not allow user to go above that to say c:\ or c:\yourfolder...
  4. RTollison

    open dialog

    well that really opens up a big can of worms doesn't it. i found all the file compares but not the same as a path parent/child comparison. Again you are correct in thinking about UNC/Mapped comparisons because that actually was the next question to come up. I will keep digging around and thanks for the heads up.
  5. RTollison

    open dialog

    you have my attention, but by System API what are you referring to. i can google just need something to look for. Thank You
  6. RTollison

    open dialog

    i appreciated the help enough to try and figure it out. knew the code was off the top but figured it was something to work with. i googled the heck out of those options but still not able to figure it out. and i like figuring it out if possible on my own. but my limited knowledge just didn't get past the mismatch stuff. as for the x0000000... error i googled it and it said i was denied access. again apologies for not going back directly but i wanted to figure it out and failed miserably. however i did (on the surface) get this to work. probably not the best solution but it seems to be working. procedure TForm3.FileOpenDialog1FolderChanging(Sender: TObject; var CanChange: Boolean); var Dlg: TFileOpenDialog; DefFolder: IShellItem; iOrder: Integer; Path: PWideChar; begin CanChange := False; Dlg := Sender as TFileOpenDialog; if Succeeded(SHCreateItemFromParsingName(PWideChar(WideString(Dlg.DefaultFolder)), nil, IShellItem, DefFolder)) then try begin Dlg.ShellItem.GetDisplayName(SIGDN_FILESYSPATH, Path); CanChange := ContainsText(Path, Dlg.DefaultFolder); end; finally begin DefFolder := nil; end; end; Path := ''; end;
  7. RTollison

    open dialog

    Yes sir, I got error messages about mismatch field types(compilig) and on one of the isparent functions it would compile but then i got an error message about access denied with 0000434 or something like that. I tried to resolve them but honestly, i could not figure out what needed to be done.(IShellItem is beyond my programming experience and i really hate bothering others when they have given me something to work with) so while doing the digging around i noticed that the ishellitem has a getdisplayname option (hoping for a string value) so i can then run containstext to check it that way.
  8. RTollison

    open dialog

    this is what i found to keep the folder from changing at all but just staying in the defaultfolder. I am trying to figure out how to update the compare command and do a isparent. i see there is a getparent option just not able to implement it on my own. procedure TForm3.FileOpenDialog1FolderChanging(Sender: TObject; var CanChange: Boolean); var Dlg: TFileOpenDialog; DefFolder: IShellItem; iOrder: Integer; begin CanChange := False; Dlg := Sender as TFileOpenDialog; if Succeeded(SHCreateItemFromParsingName(PWideChar(WideString(Dlg.DefaultFolder)), nil, IShellItem, DefFolder)) then try CanChange := Dlg.ShellItem.Compare(DefFolder, SICHINT_ALLFIELDS, iOrder) = S_OK; finally DefFolder := nil; end; end;
  9. RTollison

    open dialog

    all good and valid reasons for not creating the dll, but lets just say that i want the challenge because i have nothing better to do. so now i am committed to creating this dll for the sake of creating such a dll with this very dialog feature. NOTE: This very question has been asked by others in the past so maybe there is some kind of reward at the end of the rainbow.
  10. RTollison

    open dialog

    IT has already went down this road with locking up everything except clients own mapped drive. we had to create dlls already for accessing ftp, http, mapi, smtp and other functions. when clients were locked out of the servers c drive it broke some of our dll functionality. they had to open up locations randomly as clients were getting an error about some missing feature or whatever. so as it stands now they are locked out of most places that they shouldn't be allowed, but our cobol program runtime has a file explorer library that we use in some programs. like say a file extract for payroll ACH. now we open up the explorer window and in theory they would selelct the file from the folder we prompted to them. but a few have navigated to other folders and could use the preview to see what was in the other folders/files. So this new dll is to put an end to the wandering user. not about security but prevent the wandering user.
  11. RTollison

    open dialog

    my apologies it was a post you edited windows - How to retrieve creation date of an IShellItem? - Stack Overflow and thank you for this update. really appreciate it.
  12. RTollison

    open dialog

    i found this old post, Remy's, and i am wanting to figure out how to allow user to navigate downfolder and back up to initialidir folder. so if initialdir = v:\myfolder then they can go anywhere downfolder from there but can not go to v:\ stop at v:\myfolder. procedure TForm1.FileOpenDialog1FolderChanging(Sender: TObject; var CanChange: Boolean); var Dlg: TFileOpenDialog; DefFolder: IShellItem; iOrder: Integer; begin CanChange := False; Dlg := Sender as TFileOpenDialog; if Succeeded(SHCreateItemFromParsingName(PWideChar(WideString(Dlg.DefaultFolder)), nil, IShellItem, DefFolder)) then try CanChange := Dlg.ShellItem.Compare(DefFolder, SICHINT_ALLFIELDS, iOrder) = S_OK; finally DefFolder := nil; end; end;
  13. RTollison

    open dialog

    parallels with a published app that has limited UI for folder/file selection. we have restricted permissions set and stuff but some locations the user HAVE to have permissions, c:\... for some windows api stuff. well now all users can go nuts on some of those files if they are so inclined. we map a drive for each client but the base drive d is available to allow some navigation and stuff like that. so yes we have restricted access but a fileopendialog will let you go just about anywhere.
  14. RTollison

    open dialog

    no explorer option allowed except thru this yet to be finished dll.
  15. RTollison

    open dialog

    reason for this is cloud server and multiple clients. we give them a specific folder that is theirs but if we allow them to navigate to other clients folders it presents a security problem. we have permissions in place but not fullproof just yet.
  16. at the normal 10 threads it takes the 12-14 hours. the thycotic jumps to like 80% of cpu and stays around that percentage throughout the process. so it brings my system to a crawl because overall 100% of cpu stays pegged. from a cmd prompt if i execute the compile command with all the parameters it takes less than 1 second for most cobol programs a few take 3-4 seconds (lots bigger programs). i put 52 compiles into a batch file and they completed fairly quickly(< 1 minute). but those same programs in my mass compile program took 6 miniutes to finish. so for whatever the reason thycotic goes nuts and eats a bunch of cpu time which slows down everything. maybe i will just create a batch file with everything to compile with all the proper parameters and then just run the batch file. another code change but will see what happens. that would be faster overall but would go back to 1 compile command at a time. but still better than the 12 hours
  17. Sorry if you just type the ccbl32 with anything other than -help or with all the actual parameters it just throws up the -help option. no compiling. in my threading the default number is 10 but i wanted to see what was going on so i ran it up to 50 and that was when i noticed the thycotic.exe was going nuts as well. since creating a COM or whatever seems out of line i can tinker with process and TDOSCommand to create a fake threading. since the doscommand has an onterminated events then i can just spin up that many processes and let them run and decrease a counter when done. i should be able to make that work.
  18. C:\AcuCobol_925>ccbl32 -help COMPILER: ccbl [options] source_file -v Verbose compiler -w Suppress warnings -e Error output to named file -o Name object file -x Ignore CBLFLAGS environment -a Show all warnings -$ HP e3000 conditional compilation *** Listing Options *** -Li Print general information -Lo Name listing file -Lf Print full listing -Lx Print extended statistics -Ls Print symbol table -Ll Set page length -Lw Wide listing format -Lc Cross-reference listing -Lp Print preprocessed source -La Split out 'cautions' *** Compatibility Modes *** -Cr RM/COBOL(tm) compatibility -Ci ICOBOL(tm) compatibility -Cb Default organization is BINARY -Ce Use source/copy name extension -Cf Use fixed-length records -Ca Use ANSI ACCEPT and DISPLAY -Ck Indexed keys in SELECT order -Cm SELECT allows IBM COBOL syntax -C3 Version 1.3 compatibility -C4 Version 1.4 compatibility -C5 Version 1.5 compatibility -C## Version #.# compatibility -Cv IBM DOS/VS Cobol compatibility -Cp HPe3000 Cobol compatibility -Cg Ignore conditional compilation *** Video Options *** -Vh Default intensity is high -Vl Default intensity is low -Va Alternate ACCEPT intensity -Vq Quiet ACCEPT statements -Vc Imply CONVERT on numeric ACCEPT -Vd Imply CONVERT on numeric DISPLAY -Vx Always allow exception keys -Vb Treat BLANK LINE as BLANK EOL -Ve# Set EXCEPTION mode -Vu Imply UPDATE on ACCEPT -Vi Use item color on erase -Vg# Do not propagate COLOR *** Data Item Options *** -Db Treat COMPUTATIONAL as BINARY -D2 Treat COMPUTATIONAL as COMP-2 -D6 Treat unsigned PACKED as COMP-6 -D1 Put PIC 99 binary in one byte -Ds Imply SIGN IS SEPARATE phrase -D5 Treat BINARY as COMP-5 -Da# Align data on #-byte boundaries -Dm Minimize binary data size -Dl# Set SYNC boundary limit to # -Dy Imply SYNC for all binary data -Dz Relax size-checking rules -Di Initialize WORKING-STORAGE -Df COMP-1/COMP-2 are FLOAT/DOUBLE -Dw# Set maximum target word-size -DCa Use ACUCOBOL numeric formats -DCi Use IBM numeric formats -DCm Use Micro Focus numeric formats -DCn Use NCR numeric formats -DCb Use MBP numeric formats -DCr Use Realia numeric formats -DCv Use VAX/COBOL numeric formats -Dx# Set size of index data items -D7 Micro Focus binary data size -Dd31 Allow 31 digits in numeric items -Dv=# Default value of data -De Assume linkage is not aligned -Dq Treat QUOTE as APOSTROPHE --fastRefMod Use optimized method for reference modification --fpRounding=[OSVS|VSC2] Emulate OSVS or VSC2 style rounding --lastWSDataSeg=# Number of data segments used for WORKING-STORAGE --noAlignLit Do not use default algorithm for aligning literals --noTrunc Binary items not trimmed to picture on store --truncANSI Don't truncate stores in COMP-5 *** Debugging Options *** -Ga Include everything -Gy Include symbols (-Zs) -Gd Include source (-Zd) -Gl Include line numbers -Gs Include extra symbol info -Gz Prevent program from being debugged *** Miscellaneous Options *** -Zi Imply IS INITIAL PROGRAM -Zn Turn off local optimizer -Za Check array bounds at runtime -Zg Enable segmentation -Zc Optimize for space over speed -Zz Treat spaces as zero in numbers -Zr0 Disallow recursive PERFORMS -Zl Create large-model program -Zy Use 4-digit year in DAY/DATE -Zf Create #define file -Z3 Restrict code to version 1.3 -Z4 Restrict code to version 1.4 -Z5 Restrict code to version 1.5 -Z## Restrict code to version #.# -Zw Prepare for workbench import -Zm Include ADDRESS OF memory sizes -Ze Include XML symbol table --acceptRefresh Use current value of variable in screen ACCEPT --arithmeticVSC2 Truncate according to the rules of VS COBOL II --binaryMath (--bin) Use binary math when able to (default for 7.3+) --brand nnn Brand the object with serial number nnn --decimalMath (--dec) Always use decimal math package (pre-7.3 default) --newARC Use relaxed Abbreviated Combined Relation syntax --relaxRBUsing Allow radio button USING to be indexed data items *** Mapping Options *** -Mp List all paragraph names -Mr List all reserved words -Ms List all opened source files -Mv List all variable names -Mo Specify an output file -Ml List names in lowercase -Mu List names in uppercase -Mm List names in mixed case -Mc List all control properties -Mw List screen section info -Me List all entry points -Mx Create XCDs *** File Options *** -Fs Implied START TRANSACTION -Ft Transact all file operations -Fl Single lock mode default -Fo Set directory for XFD files -Fx Create XFDs for indexed files -Fa Create XFDs for all file types -F# Create version n XFDs [n=3,4,5] -Fc Preserve case of field names -Fe Create old format XFD files -Fv Include comments in XFD files -Fp ALL files are OPTIONAL -Fm Default lock mode is manual -Fn No file sharing by default --fileAssign=[DYNAMIC/EXTERNAL] Specify default file assignment --fileIDSize=[2/4/8] Specify size of file handles passed to COBOL *** Source Options *** -Sa Force ANSI source format -St Force terminal source format -Si Include lines based on pattern -Sx Exclude lines based on pattern -S# Set tabs every # columns -Sr Use RM/COBOL compatible tabs -Sd Include debugging lines ('D') -Sp Specify COPY search path -Sc Specify code system -Sl Force long line source format *** Warning Options *** -Wa Warn on misaligned using -Wl Warn on non-01 level using -Wr Warn on 01 level redefines too long *** Object-Code Options *** -n Generate native code for host --ia-32, --intel Generate Intel IA-32 code --pa_risc, --pa Generate PA-RISC 1.0 32-bit code --pa_risc_2.0, --pa2 Generate PA-RISC 2.0 64-bit code --powerpc, --ppc Generate PowerPC 32-bit code --powerpc_64, --ppc64 Generate PowerPC 64-bit code --power Generate POWER-compatible 32-bit code --sparc Generate SPARC 32-bit code --sparc_v9 Generate SPARC 64-bit code --noInlineCall Turn off inline CALL optimization *** ESQL Pre-compiler options *** -Pc Connect to database to check SQL -Pd Specify database for connection -Pi Specify SQL include directory -Pk Specify keyword set -Pp Specify database password -Pr Relaxed syntax checking -Ps Precompile and compile -Pu Specify database user name -Pw List keywords -Pv Relax rules for VARCHAR items -Pg Preprocess using next argument -Pe Include ESQL in listing & debug Additionally, the following commands may be used (as described above): -e filename; -Sa; -Sd; -Si; -St; -Sx The output will be sent to stdout unless otherwise specified *** Reserved Words *** -Rr Suppress RM/COBOL(tm) words -Rv Suppress VAX/COBOL(tm) words -Ra Suppress ACUCOBOL(tm) words -R8 Suppress 1985-standard words -Rs Suppress Screen Section words -Rw Suppress individual word -Rc Change reserved word -Ri Suppress ICOBOL(tm) words -Rx Ignore any particular word -Rn Make synonym for reserved word -R2 Suppress 2002-standard words *** Error options *** -Qm Max error count -Qp Skip to next period on error *** Conditional compile options *** /CONSTANT name value /[no]directive *** Internal table options *** -Td # Identifier and statement table -Te # Subscript statement table *** Interoperability options *** --javaclass Generate a .java class to call this COBOL program --javamain Generate a .java main to call this COBOL program --netdll Generate a .net DLL to call this COBOL program --netexe Generate a .net EXE to call this COBOL program INFORMATION: cblutil -info object_files ... LIBRARIAN: cblutil -lib [options] object_files ... -o Name new library file -v Verbose librarian -r Remove object files if okay CODE TRANSLATION: cblutil -native [options] object_files ... -o Name output file -v Verbose translator -Zc Optimize for space over speed -Zn Turn-off optimizer --ia-32, --intel Generate Intel IA-32 code --pa_risc, --pa Generate PA-RISC 1.0 32-bit code --pa_risc_2.0, --pa2 Generate PA-RISC 2.0 64-bit code --powerpc, --ppc Generate PowerPC 32-bit code --powerpc_64, --ppc64 Generate PowerPC 64-bit code --power Generate POWER-compatible 32-bit code --sparc Generate SPARC 32-bit code --sparc_v9 Generate SPARC 64-bit code RUNTIME: runcbl [options] [ object_file [parameters] ] -d Run with debugger -r Run debugger from script -e Direct error output to file -ee Redirect stderr to file -w Suppress warning errors -s Prevent user aborts (safe) -c Name configuration file -l List configuration file -v Print version number -# Set switch to ON -i Set input to file -o Set output to file -a Name assembly library -y Name COBOL library -x Show extended error messages -h Ignore hangup -b Background processing
  19. this compiler does not have batch mode (acu cobol) everything is in a whitewashed folder, IT said that anything in C;\coboldev would not be scanned (we made sure that the spelling was exactly the same) and everything involved here is in the coboldev folder. hard drive is SSD. Like i stated the only variance here is the AV. when i start running my program for all with say 250 threads, i watch task manager and i see my ccbl32.exe start up but then i see thycotic going nuts on cpu usage. i told IT no you not excluding that folder because everything of mine is in that folder. after much back and forth IT thought that the create process for the ccbl32 was doing something else that the AV was trying to monitor.
  20. sorry should have added more details as usuall. the "files" are cobol programs that have to be compiled into a cobol object so the cobol runtime can use them. our programs are broken down into sub-folders say "AA" thru "ZZ". rather than compile every "file" every time, i wrote an app that allows me to select which folders to compile. only ones that have changes or the once a month all "files" compiled. originally i used the "WinExec32V2" to spin up a process for every file in the group. this was definitely the wrong approach when compiling all files. So i added threading and a thread limiter. then i could spin up say 50 threads with a different file in each. this would then only take about 10 minutes for all files. Then the thycotic AV came along and now this threading process takes about 12 hours for all files. the compiler program has been whitewashed. i can run it manually and the AV doesn't nag me about are you sure its safe prompts. it did before getting it whitewashed. but the thycotic AV seems to snag/delay the threads and i am trying to past it somehow. like have it check the first one and deam them all safe from there. long shot i know, but i really hate the once a month process because my pc comes to a crawl all day long. so we (myself and IT) thought/hoped that if i had a registered object that thycotic would not keep checking it over and over. i have been tinkerying with TDOSCommand to see if thycotic would let a direct command run without checking every one of them. got interupted for the past 2 days on other projects hopefully wednesday will be a good day for changes/testing.
  21. RTollison

    Delphi 10.2 add Windows Codesign

    I am needing to add Windows certificate/codesign/whatever to my project. We have a corporate certificate and i am needing to figure out how to add it to my project so it show as trusted. where do i start in RAD Studio 10.2. NOTE: at this point, i am not sure what kind of file/certificate i will be given/using. Just told to add it to my project so our corporate AV would stop blocking the program.
  22. Have apps that use the createprocess and some that use shell obj to call OS related things. Now IT is/has to lock down security on server and is planning on removing access to all cmd.exe(not sure what ALL means but guessing they are going to remove it) and the powershell and all of its function from users. Does anyone know if removing access to cmd.exe will break createprocess or shellobj? irony is that i don't have rights the rename the cmd.exe to test on my own.
  23. RTollison

    security with no access to the cmd.exe

    FYI i do not have permission to run GPEdit.msc We are already pretty tight on security. Now we are looking to do the same with our clients and hosting servers. All i was hoping for was that someone else had already done something similar and knew for sure that createprocess still worked and that may shellobj would work but maybe some odd issues or whatever.
  24. RTollison

    security with no access to the cmd.exe

    work from home, so home pc is work pc. yes i do have a home pc (windows xp retired) and installing a VM would require corporate permissions to get an admin to install. it can wait until we have to deal with it then can do the testing to see what is blocked. who knows IT just might allow some things after all. Thanks
  25. I have a running app that has a bitmap object on it and i have a dll that creates a bitmap. without saving to disk or clipboard, i need to copy from dll bitmap to the app bitmap. i have the handle of the app in the dll and have the workings of trying to find the bitmap object in the app. but i need to figure out how would i go about copying the bitmap over.
×