

RTollison
Members-
Content Count
112 -
Joined
-
Last visited
Everything posted by RTollison
-
tfileopendialog tsclient on folder changing event
RTollison replied to RTollison's topic in General Help
i created a simple program just to shcreate while change the variable text \\tsclient on the first shcreate command of \\tsclient comes up with c:\users\xxxx\documents then when i execute it a second time with the same execute command i get c:\users\xxxxx\desktop its run in a loop is my meaning of second time thru the loop. the third time thru the loop it fails th shcreate. i have the shcreate within the folderchanging of a tfileopendialog event. -
tfileopendialog tsclient on folder changing event
RTollison replied to RTollison's topic in General Help
it was being sent in as variable and it is \\tsclient something is special about \\tsclient because i did a net use z: \\tsclient\c\myfolder and ran that shcreate against z: and it worked. i tried variations 'tsclient', 'network\\tsclient' i am trying to force the lookup path to be tsclient and let user select from tsclient\? only. the shcreate will work if i only select one of the shares but not the root. NOTE: Yes the defaultfolder is \\tsclient but that shcreate is for verifying that the user stays within tsclient I will keep doing some searching, found an article referencing 'my pc' and other special names so maybe i will eventually find tsclient out there somewhere. -
Delphi 10.2, Indy 10.x Just trying to understand why this works. i have a dll that uses https to connect to our server. Works 99% of all our clients but for some outliers i kept getting 10061 connection refused error. after a bunch of trial and error while working with clients IT dept we finally tried running fiddler to help track down the issue. this tracking had me add proxyparams.proxyserver and proxyport to track in fiddler. well it would work without error. after rollbacks and testing we discovered that by leaving the proxyserver 127.0.0.1 in place that it would work and connect to our server and do whatever was needed. now any time we get the 10061 our support sends over the proxyserver version of the dll. what is the reason or area that we should look at to find the source of the issue to not have to use the workaround proxyserver. we bypassed AV, firewall off and allow access from internet explorer (edge, chrome, firefox,...)
-
yes all of our clients are on their own LAN. The original site with issue happened about 3 yrs ago and got "resolved" by adding the proxyserver. all of our clients get the non proxyserver version. but along the way some other outlier sites ,3-5 maybe, would have the same 10061 error and we send over the proxyserver version of dll and they work. as for the original workstations we stripped that thing like a banana and still it would not connect. When I said it must be something on their server and that is pretty much where the investigation ended. Then last month i had a support rep ask where was the "special" version of the dll because a client was getting the 10061 error. So before sending over the odd dll i asked client if I could do some testing. the first thing i did was ask clients IT to allow an AV exception for the folder that has our software/dlls in it. No affect. IT then un-installed the AV and still no affect. next the site and I started on the firewall and again they just turned it off with no affect. they then went into all the ie's installed on workstation setting an allow access to our URL, no affect. So we decided to move on for now and I sent the odd dll over and it worked. so clients IT, turned firewall on and installed AV and then tested again and it worked still. when i said "maybe" something on the server is blocking access and asked if I could just look around and was shut off. "We don't allow anyone else direct access to our server!" verbatim. The thing of it is, over two months ago this very client was working without the proxyserver version and i asked what on their system changed we got the standard issue of 'nothing changed except we installed windows updates and your software updates'. we didn't change anything related to this feature and windows update has done anything to any of our other clients (> 1,200). I even asked the IT what software they recently installed on that server they said nothing. I just know something was done on the server since the workstation had nothing on it to block any traffic.
-
i think(pretty sure) it is the third issue. all the other users are working fine and no pending connections. Our IT looked at the logs and showed nothing coming thru for this client. It just that the clients IT uninstalled the AV, turned off the Firewall and allowed access via IEs. They insisted it was something on our end even though i could use clients credentials and it would work. I asked if they had something on their server that might limit access and of course they adamantly swore the was nothing else. I am pretty sure that we had the workstation cleared but when i wanted access to the server it was no unless you have something specific. So I posted here. I was trying to understand why a proxyserver would allow whatever blocking the dll would now work. Since our IT said that nothing was coming from that workstation/site i guessed that the clients server has to be blocking the connection request but some clients IT are pretty touchie about letting a crazy dev on their system opening up connections. Thank you and i will take time to understand wireshark instead of fiddler.
-
if you were given a unc path how can you determine the \\server\share part of say \\server\share\myfolder
-
yes but i am not a network educated so i dont know if there is a limitaion so if \\server\share is gospel then i can run with that. thanks
-
currently use a loop and random to get a value between a range. first on was simple enough value1 := random (250) + 1 (value from 1 thru 250) second halfway simple value2 := random(500) + 1; set initial random value while value2 < 251 do value2 := random(500) + 1; value3 := random(750) + 1; while value3 < 501 do value3 := random(750) + 1; value4 := random(1000) + 1; while value4 < 751 do value4 := random(1000) + 1; sometimes it is pretty quick, other times is seems to hang for a bit. < 10 seconds so that got me to thinking, is there a better way to random values bewteen a range?
-
holy crap thank you all again. you really don't know how much i appreciate this. beein fighting a bad sinus/ear infection and am way too tired to be using what little of my brain is functioning. thank you , thank you, thank you.
-
got that implemented, thanks again. now he asked be something else and if i am correct, he is asking for overlapping numbers with without duplicating them. i can deal with any duplicates with a while statement but here is basically what is asking for. value1 = 1-300 value2 = 100-550 value3 = 250-750 value4 = 500-1000 not sure what he is looking for but he wanted me to let him enter the ranges instead of the hardcoded ranges (which is what he said he wanted but now wants to expand upon for his own purposes). i asked about any of the overlaps if he wanted to force then higher and he said that the overlapping is fine. so if we retrieve values like value1=225 value2=200 value3=299 value4=500 That would be ok. told him that I had no idea how this is helping. why not throw darts at a board. but he said now he could put his dart board away.
-
thank you all. yeah i didnt think this one thru very well did I. used to our cobol random command and didn't even go to the point of adding a larger value than 1. sorry for such a stupid question...
-
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.
-
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;
-
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...
-
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.
-
you have my attention, but by System API what are you referring to. i can google just need something to look for. Thank You
-
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;
-
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.
-
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;
-
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.
-
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.
-
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.
-
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;
-
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.
-
no explorer option allowed except thru this yet to be finished dll.