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

  • Home
  • SEARCH
  • 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 3805318
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T14:39:32+00:00 2026-05-19T14:39:32+00:00

For our software testing we have a test that lets us check to see

  • 0

For our software testing we have a test that lets us check to see if certain windows are open using the FindWindowByClassNameAndRegex P/Invoke call. The issue we’re getting is when we have windows open with more than a certain number of special characters we always get IntPtr.Zero as a return. Are there any known issues with this? Here’s some of the code we use to find the window: (in this case it’s for a firefox window)

Regex windowTitleRegex = new Regex(Regex.Escape(fullWindowTitle).Replace("\?", "."), RegexOptions.IgnoreCase | RegexOptions.ECMAScript);
curWindowHandle = NativeMethods.FindWindowByClassNameAndRegex("MozillaUIWindowClass", windowTitleRegex);

Where the title of the window is ~`!@#$%^&*()_-+={[}]|:;'<,>.?/\"àëÉùÙâÏûâÏûÊÛçîÀË«éïÂλœÇÔêôÈŒ\
(There’s no actual line break it’s just a formatting thing)

  • 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-05-19T14:39:33+00:00Added an answer on May 19, 2026 at 2:39 pm

    There is no Windows API function by that name. I’m guessing you’ve found some DLL that exports this function. Odds are always good that the regex this DLL uses is of some kind that doesn’t quite match the syntax that .NET’s Regex class uses. There are a lot of dialects.

    Best thing to do is to pinvoke EnumWindows(). You can use your own Regex in the callback to filter, GetClassName() gets you the window class name. If you already know the window name then just use FindWindow().

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

Sidebar

Related Questions

When testing our software on several different systems (98-XP-Vista-Seven-Linux-etc), I think that the best
We have some files on our website that users of our software can download.
I've had a bug in our software that occurs when I receive a connection
We noticed that lots of bugs in our software developed in C# (or Java)
I am working on a testing framework for the software that my company writes.
I have noticed that even though I have a lot of doctests in our
we try to deploy our software on Windows 7, and there are several sqlite3
Our software manages a lot of data feeds from various sources: real time replicated
Our software must be able to run on SQL Server 2000 and 2005. To
Our software manages libraries, museums, archives etc. We'd like to let the users (namely

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.