Jump to content

RTollison

Members
  • Content Count

    103
  • Joined

  • Last visited

Everything posted by RTollison

  1. 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
  2. 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.
  3. RTollison

    Copy bitmap from one app to another app bitmap

    and to confirm the cobol side creates handle for the bitmap. it is defind in the cobol program as 01 A-BITMAP HANDLE. so it is not like a bitmap object in delphi. that again is an obstacle that requires me to copy via handle and not bit-by-bit (only guessing again). i guess i could create a bitmap in the dll and assign it the handle from cobol if that is possible, as long as i dont save the bitmap to disk.
  4. RTollison

    Copy bitmap from one app to another app bitmap

    i am hoping that since the signature comes from the CreditCard machine that they are always the same size. that is what i am hoping for then the copying of the bitmap wouldnt have to worry about the size.
  5. RTollison

    Copy bitmap from one app to another app bitmap

    that is why i was asking about copying a bitmap from dll to another bitmap in a separate app. in the cobol side the loadbitmapfromfile is what creates the bitmap and assigns it a handle. I was figuring on loading up a bitmap that is just empty/blank. then try to copy the dll bitmap into that hanlde. at this point i do not know if it will work but that is what i have to work with.
  6. RTollison

    Copy bitmap from one app to another app bitmap

    Ok here is overall process/issue. i have a microfocus cobol program that uses a runtime (exe) to open an cobol compiled object file. in that program it has logic for printing bitmaps. However, it requires that the bitmap be a saved file. I had created the dll to load base64 encoded data and converted to bitmap and saved to disk. Then the cobol program would read the file and print then delete the bitmap file. But the bitmap is for a customers signature that quality control says 'No you will not save it to disk and delete due to security reasons.' So now i need to change the process so that the dll can copy the bitmap to the cobol programs bitmap handle. i figure that i will have to change the cobol to open a blank/empty bitmap and then send that handle to the dll to get the signature bitmap loaded into the cobol program. Cobol side is limited in what it can do, so the dll was needed to read/convert/save the bitmap. Since this is not a full delphi process i just posted a general question and then would work out the details on my own.
  7. I am needing to create a dll that will have options for opendialog and savedialog. I have the dll working but had a dev question. there are lots of open save dialogs available from different vendors. i have a TMS, DevExpress, Delphi and JV versions of the component. Anyone have any idea as to any type of advantage i might gain using any one in particular over the others. Down the road i might be looking to make some kind of as yet unknown changes. Figured i would ask in case anyone else has been down this road. Maybe a different component altogether?
  8. i have a calendar dll that pops up on the center of the form where it is called from. works fine but there is an issue. the calendar control is from TMS Software and i have worked with them but the issue doesn't happen to them. on the calendar control there are navigation buttons at the top of the control (previous year, previous month, next month and next year. The calendar is set to popup center of form (long story best solution) so if a developer of the application form put a button in a select spot on their form when calling the dll to popup the calendar IF the MOUSE is OVER any of the prev, next buttons i get an memory access violation, click ok and the calendar works great. move along. since that window are is limited if the user, say clicks the bottom right of a button then no error. But if they click the middle then the error pops up. So i know it has something to do with probably trying to get/display the Hints (my guess). i have sent a sample project to TMS and they don't get the error. so they sent me back the compiled project and I also don't get the error. Made sure that we are on the same version and we are. Now my question is this, is the a way to stop the processing of the hint while the control/form is being created. First thing the dll does is frmCalendar := TfrmCalendar.Create(nil); is there a way to stop hint message, create the control then enable hint messages?
  9. I managed to modify the source for the plannercalendar control and commented out the offending code without affecting the control (on the surface) but it is working within my code and it suits my purposes. have tested in multiple projects with the plannercalendar and it is working fine everywhere that i use it. Thanks.
  10. RTollison

    converting string to date time

    I have a string in an odd format and am needing to change to datetime format. <DateTime>2021-06-25 08:04:09</DateTime> strtodatetime wants the date to be dd/mm/yyyy time is there a strtodatetime that uses a formatdatetime option?
  11. RTollison

    converting string to date time

    thank you, i really appreciate the help.
  12. i have this routine to get the active window, that may have multiple buttons at various places on the parent window. when they user click on a button then i am calling a dll that currently tries to center itself on the parentwindow BUT i am needing to know if it is possible to get the rectangle coordinates of the button that actually got pushed. here is my current lines for gathering the window rectangle. ParentWindowHandle := GetActiveWindow; GetClientRect(ParentWindowHandle, Rect); is there a way to determine the button that was pushed and it location relative to screen so i can popup my control where the button is located and not in the center?
  13. Yeah the screen center seems ok for our clients and they can see the calendar popup pretty easy. when calling the dll we pass in a date that it will move the calendar to that date and when the user selects a date and clicks an OK button it sends the value back to the cobol program. pretty simple stuff. as for a mouse click not always used some users just use keyboard and are very adapt at using it. the buttons do not have a tab stop. the date field is the tab stop. like i said center of screen is fine, mgmt just asked if possible to put by button without a lot of effort and verification that it works in all situations. So thank you all very much.
  14. the GetFocus actually worked great but after i started testing the cobol programs and where it would pop up, it won't work out to well. some of our report type programs have these push-buttons at the bottom of the screen but the focus is at the top field on the screen. so as a user i could not want to change anything other than a date or multiple dates and just push the button at the bottom of the screen but the popup calendar is at the top. i checked if there was a way to force the focus to the button when pushed and there is not an option for down only that the button was clicked after the fact event. So i will do more thinking on this but in the mean time leave it as center of activewindow.
  15. i haven't tried it yet but i will do so today.
  16. i apologize for the lack of details. no excuses. i have been down this road to many times. was just wishing for a quick command like the getactivewindow but for a window control. even did a search for getactivewindow hoping some article would mention any info related to getting the control. Thats when i posted here doing the wish stuff for another command from people that would know. FYI my current dev language is COBOL and i have to tie into it for anything outside of it, such as this calendar dll. the original one was hokie and dated, so i created a new one that followed the parameters and decided that centering on the form was better than the main screen. that is when i was asked if we could popup at the button that was pushed. now we are here and i am going with not possible with 100% results.
  17. anything about the button is not available to me. the button click (not delphi) basically says call dll that will popup on the screen and allow user to select a date from a calendar. so my dll is only thing i have available to change. the original dev just created the popup calendar to be in center of the main screen which was ok since multi-screens weren't widely available. but then i got tasked with updating it and at the time the best i could do was the center of the active window. now i was asked IF i could change it and i said i would see what i could do. And so far it is not looking good.
  18. unfortunately no not in control of the source window. it used popup in the middle of the screen and i changed it to get the active window and put it in center of it, which is kind of odd since the button sometimes is near the bottom of the window.
  19. RTollison

    null terminated string array

    i am needing to update a null terminated string array. currently i have it in a string like this: one#0two#0three#0four#0#0#0#0#0#0#0#0#0#0.... i am needing to add five and six into the string but str := str + 'five' + #0 + 'six' + #0; doesn't actually work. what would i need to do to get the string from one#0two#0three#0four#0#0#0#0#0#0#0#0#0#0 to one#0two#0three#0four#0five#0six#0#0#0#0#0#0
  20. RTollison

    null terminated string array

    i am on 10.2 and i used Remy's suggestion for cleaning of the string/stringlist then now when i set the registry value it and check it with regedit it doesn't warn me about the empty values. So everything seems to working at this point and will be getting sent over to some QA people to try and break it.
  21. RTollison

    null terminated string array

    i got it all separated out into the stringlist and what looks to be a clean string with null separated values when I am trying to write to the registry (RegSetValueEx) but its after that and i run regedit and open the functions value to look at the info that it throws a warning about empty strings.
  22. RTollison

    null terminated string array

    haha i wouldn't take any bets on that. but thank you.
  23. RTollison

    null terminated string array

    here is what i currently have in place it all seems to run without errors/issues BUT when i run the regedit to verify the updated values I get a warning from the registry Data of type REG_MULTI_SZ cannot contain empty strings. Registry Editor will remove all empty strings found. I don't see any extra lines but it pops the first time around and after it saves it then reopen it looks the same but no warning message. reading of the registry and evaluating if two other values are needed or not. iType := REG_MULTI_SZ; // Type of data that is going to be read if RegQueryValueEx(hOpenKey, 'Functions', nil, @iType, PByte(sha_str), @iSize) = ERROR_SUCCESS then begin Edit11.Text := stringreplace(copy(sha_str,0,Pos(#0#0,sha_str) + 1),#0,',',[rfReplaceAll]); strlist.DelimitedText := Edit11.Text; for i := strList.Count - 1 downto 0 do if strList = '' then strList.Delete(i); if Pos('RSA/SHA512',sha_str) = 0 then begin cxCheckBox6.Checked := True; strList.Append('RSA/SHA512'); end; if Pos('ECDSA/SHA512',sha_str) = 0 then begin cxCheckBox6.Checked := True; strList.Append('ECDSA/SHA512'); end; sha_str := ''; sha_str := StringReplace(strList.DelimitedText,',',#0,[rfReplaceAll])+#0; end else cxCheckBox6.Checked := True; RegCloseKey(hOpenKey); end then writing of updated value if needed begin SetLength(sha_str, Length(sha_str) - 1); tname := dir + 'SHA512_Default' + _dt + '.reg'; RegistryExport(tname,'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Cryptography\Configuration\Local\SSL\00010003'); CleanUpExport(tname,'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Cryptography\Configuration\Local\SSL\00010003', 'Functions'); if RegCreateKeyEx(HKEY_LOCAL_MACHINE, 'SYSTEM\CurrentControlSet\Control\Cryptography\Configuration\Local\SSL\00010003', 0, nil, REG_OPTION_NON_VOLATILE, KEY_WRITE, nil, hOpenKey, pdI) = ERROR_SUCCESS then begin RegSetValueEx(hOpenKey, 'Functions', 0, REG_MULTI_SZ, Pointer(sha_str), Length(sha_str)*sizeof(Char)); end; end;
  24. RTollison

    null terminated string array

    i am stumbling along on this one. i have the same thing in place for updating numbers and string but when i got to this one i am flying blind and just winging it. so after googling around i came across this example for reading but the writing was just as simple by setting the string manually to 'one'#0'two'#0'three'#0'four'#0'five'#0'six'#0; so i am trying figure out how to take what is there and if necessary to add to the string/whatever and then write it back to the registry.
  25. RTollison

    null terminated string array

    sha_str : string; sha_str := ''; if RegOpenKeyEx(HKEY_LOCAL_MACHINE, 'SYSTEM\CurrentControlSet\Control\Cryptography\Configuration\Local\SSL\00010003', 0, KEY_READ, hOpenKey) = ERROR_SUCCESS then begin iSize := 0; if RegQueryValueEx(hOpenKey, 'Functions', nil, @iType, nil, @iSize) = ERROR_SUCCESS then begin SetLength(sha_str, iSize - 1); strSize := iSize; end; iType := REG_MULTI_SZ; // Type of data that is going to be read if RegQueryValueEx(hOpenKey, 'Functions', nil, @iType, PByte(sha_str), @iSize) = ERROR_SUCCESS then begin that is how i got to this point...
×