Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8955019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:26:53+00:00 2026-06-15T14:26:53+00:00

I have a Delphi (BDS 2006) application which sends keystrokes to QuickBooks accounting software

  • 0

I have a Delphi (BDS 2006) application which sends keystrokes to QuickBooks accounting software to traverse QuickBooks forms (invoices), copy text from the current edit control to the Windows clipboard (to gather data), do some calculations based on the gathered data, and finally write results on the form by sending keystrokes.

This application has been developed over a number of years, uses extensive (for me at least) Windows API techniques to identify the foreground window, focused window, etc., and is used by dozens of users worldwide…which I only tell you as evidence that it works on a lot of systems.

But not all. Lately I’m getting a lot of reports of failures, on Windows 7 systems (the version of QuickBooks doesn’t seem to matter). Debugging versions sent to the customers who’ve reported problems show that it is not copying anything to the clipboard–though it still seems to be able to do everything else (send keystrokes to traverse the form, and keystrokes to paste in the calculation result…which unfortunately, is now always zero because no data was gathered.)

Here’s the code I use to send a WM_COPY message to the edit control window in QuickBooks. (We can’t get this code to fail here, on either XP or Windows 7 systems–but it doesn’t work for several users.)

var
  iResult : DWORD;
begin
  ...
      //Edit control has the focus on the QB form, so try to copy its contents
  if SendMessageTimeout(Wnd, WM_COPY, 0, 0,
      SMTO_ABORTIFHUNG or SMTO_NORMAL,
      2000,
      iResult) = 0 then begin                 //0 = Failed or timed out

        //NOTE:  Users DO NOT get the following message--the 
        //SendMessageTimeout() simply returns without error, as if the 
        //WM_COPY is being sent correctly.

    ShowMessage('SendMessageTimeout FAILED');
    Abort;    
  end;

            //At this point, the clipboard has nothing on it, on users'
            //machines where it fails to work.
  ...   
end;

Not wanting to wear out the patience of the end users to whom we’re sending debug versions, I’m looking for ideas before we send out anything else for them to try/test…

Notes/Questions:

  • All other keystrokes are sent via SendInput, and they work fine. I believe we began using SendMessageTimeout(WM_COPY) instead of sending Ctrl-C as a keystroke for speed reasons–it allowed us to immediately access the clipboard on return, instead of waiting an unknown/indefinite amout of time for the Ctrl-C to be processed by QuickBooks.

  • I believe we’ve asked users to try RunAs…Administrator on our application, but that had no effect (I’ll have to verify that’s been done).

  • I’m wondering if the problem could be due to UAC conflicts? Our application currently is not digitally signed and uses no manifest. I’ve been reading about adding a manifest with UIAccess=True in it. But if our application can already send keystrokes to QuickBooks without problems, would setting UIAccess=True have any effect on allowing the SendMessageTimeout() to succeed? And will I need to use a digital cert. to get the UIAccess setting to have any effect?

  • If SendMessage won’t work without digitally signing & UIAccess in the manifest, is it possible we could fall back to sending Ctrl-C as a keystroke? (I wouldn’t think so; surely Microsoft wouldn’t allow that end-run around a security concept.)

I’d appreciate any comments to straighten out my thinking…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T14:26:55+00:00Added an answer on June 15, 2026 at 2:26 pm

    This might be related to “User Interface Privilege Isolation” (UIPI) instead of UAC. Check the integrity level of each process. A lower-integrity process is not allowed to send window messages to a higher-integrity process, unless the higher-integrity process explicitly allows it by calling ChangeWindowMessageFilter/Ex().

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Delphi application, which sends piece of text to a named pipe
I have a Delphi application using DevExpress cxGrid (which is connected to database). I
I have a Delphi application which contains a manifest file with a few dependencies
I have Delphi application with mydac stored procedure component which takes an utf8 encoded
I need loging all HTTP request (from any application). I have Delphi 7.0. Anybody
I have a Delphi 6 application that uses the Indy 9 components to maintain
I have a Delphi application that has a document browser as the main form.
I have a Delphi .CPL currently written with Delphi 7 which needs to update
I have a Delphi (2007) project which, when I opened it, gave a very
I have a Delphi 2009 application that runs a query over a database using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.