Jump to content

Search the Community

Showing results for tags 'winapi'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
  • Delphi General Discussions
    • Tips / Blogs / Tutorials / Videos
    • Delphi Third-Party
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Delphi-Version

Found 2 results

  1. In OTL (3.0.7), OTLCommon.TOmniAffinity.GetMask calls DSiGetSystemAffinityMask, DSiGetProcessAffinityMask and DSiGetThreadAffinityMask which all call Winapi.windows.GetProcessAffinityMask, which can fail (I don't know under what conditions, but clients are reporting that it happens under Wine and also on at least one windows 10 system). If it fails, the var returns lpProcessAffinityMask and lpSystemAffinityMask are undefined. OTL release 1.40 made some changes to support 64 bit, and so I think in most places this behaviour won't show. However, for example OTLCommon.TOmniAffinity.GetCount has affMask := Mask; where affMask is a DWORD and mask is the NativeUInt property. An ERangeError won't be thrown unless: 64 bit arch range checking on GetProcessAffinityMask throws the second 64-bit param (lpProcessAffinityMask) value comes back as an invalid 32 bit value (I assume, under whatever conditions that trigger this issue, winapi doesn't change the stack val, so for example whatever was in that position happened to be an invalid 32 bit value) So my suggestion is that anywhere getProcessAffinityMask is called (I think just 3 places), it is checked for failure and if so some reasonable value is returned, eg if not GetProcessAffinityMask(GetCurrentProcess, Result, systemAffinityMask) then result := 1;
  2. I have a normal application example (the code is this, but not is a service) that make screenshots of a non secure active desktop created by a 3rd's application. For example: https://i.stack.imgur.com/NJoOG.jpg This 3rd application is a "browser application" that uses CEF to render the websites. My goal is open a fullscreen form in foreground (covering all screen above) and be able to make screenshot of the content behind of this fullscreen form (the 3rd application). I searched by some hint about this and found these similar discussions: How do I capture desktop screenshot behind full screen form? Screenshot using Magnification API: SetThreadDesktop fails when alternates to a new desktop I also had tested using PrintWindow api (to capture only the 3rd's application), but this results in a black screen (in chromium content) because probably the 3rd's application uses CEF with hardware acceleration resource active. For example: https://i.stack.imgur.com/taMdX.png All works fine in Windows XP, 7 (disabling Aero theme) - with ALPHABLEND = TRUE on fullscreen Form. The second discussion found seems more near of solution to my trouble, because this uses a api apparently able to remove a determinated window of screencapture. I tested this example left by author, works only if call ConfigMag() prodecure after routine that contains SetThreadDesktop api. Eg: if InputDesktopSelected then xGetScreenToBmp(idx) else if SelectDesktop(nil) then // result of SelectDesktop() is a routine that calls SetThreadDesktop begin ConfigMag; xGetScreenToBmp(idx); end; except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; Readln; Already if i want make screenshots periodically, this will fails like was said by author. Then my trouble still not was solved.
×