Questions tagged [windows]

Questions involving programming on Microsoft Windows technology, including its API.

Filter by
Sorted by
Tagged with
-1 votes
1 answer
133 views

.net Windows app in a web page [closed]

I am developing a feature related to Microsoft Outlook which has support only for Windows library. However, I have to put this into a web page for the users. In the process of consuming the windows ...
3 votes
0 answers
1k views

How to replace or manipulate the Microsoft Desktop Window Manager (DWM)? [closed]

I'm in the midst of deciding which platform to use to implement a new kind of display server / window manager. It seems that it isn't possible to replace the DWM on Windows systems according to MSDN ...
  • 287
3 votes
1 answer
836 views

How to safely and cheaply delete a directory's contents that are constantly being deleted/overwritten

I'm coding something that will check a specific static location's directory, and if it exists, and a certain process has not run in n minutes, it deletes that directory's files and all sub-directory ...
3 votes
1 answer
3k views

Why does the Windows Clipboard require an STA thread?

To copy something to the clipboard in Windows (at least in .NET as far as I know) it has to be done on a separate thread that is in STA Mode. One example I have used is this. Thread thread = new ...
  • 601
1 vote
1 answer
79 views

windows users vs. custom [closed]

My application needs to support a "shift change" scenario. Essentially, a person is managing some assets. At the shift change, the person that was there leaves right as the replacement signs in. The ...
  • 361
-1 votes
1 answer
237 views

Is it safe to execute the "regedit" command on Windows? [closed]

I'm writing a Java application, I need to create a URI Scheme. I've seen a library creating a URI Scheme using the "regedit" command on Windows. Is it safe to execute "regedit" for this task? Is ...
3 votes
1 answer
69 views

Is there a convention for where to store crash-recovery files?

I work on an application where we have the potential to attempt a file save in the top-level exception handler. The intention would be save a file which can then be sent into the support team, ...
  • 196
1 vote
1 answer
672 views

MVVM viewmodel to view correlation in adaptive UI

I am making an mvvm application for the uwp platform and I am looking for advice on the following matter. Take for example the windows 10 e-mail application, which when full screen displays both the ...
  • 127
13 votes
4 answers
2k views

Should I deploy 32-bit only or both 32- and 64-bit versions for Windows?

I have a cross-platform application written in a compiled language. For Linux it is customary to have both amd64 and i386 builds available to user, so user can choose version, suitable for its ...
0 votes
1 answer
142 views

Testing a windows game application against older versions of windows

If I were to build a game using Visual Studio 2015 and (Most likely) SDL2, I think I'm right in assuming that in order for that game to run, the user's target windows version needs to have Visual C++ ...
user avatar
0 votes
0 answers
84 views

A callback for when data is received?

So, my understanding is that the Kernel could receive TCP at any time, and that generally a C program asks the Kernel synchronously/asynchronously if it has data available. Would it be possible for a ...
0 votes
1 answer
2k views

Best approach to write windows service

We got a situation where we need to write a windows service using c#, the service need to be install on a particular -single- server. Also service need to communicate with a DB to access certain table ...
  • 109
8 votes
1 answer
16k views

Can I write a cross-platform application (Mac and Windows) using C#? [closed]

I see lots of old information on this question, and lots of articles flying around the Interwebs, but I can't tell quite where things are at. Basically, I want to write C# code that I can then compile ...
34 votes
5 answers
10k views

Why don't Windows/Linux use relational Databases (RDBMS)?

Why don't Windows/Linux use relational databases (RDBMS)? I know they use file systems to store all data but don't you think it is more efficient to use databases like we use in web sites/web apps? ...
4 votes
1 answer
2k views

Decrypt data on any Windows computer by same user

I have a license system which currently locks licenses to a physical computer using CryptProtectData (with CRYPTPROTECT_LOCAL_MACHINE) and CryptUnprotectData. This is of course not the entire license ...
-1 votes
1 answer
2k views

How to know if an app is launched in windows service application [closed]

I'm trying to write a program which waits for a specific app (matlab in my case) to launch and does stuff when the app launches. I see that I had to write a windows service application and managed ...
  • 111
0 votes
3 answers
1k views

What is the explication for the difference execution time for the same instruction?

As you know when we run instruction in our code like long a = b; we will not have the same ticks each to be executed. first exeution it take 2ticks; second exeution it take 3ticks; third exeution it ...
  • 101
1 vote
3 answers
2k views

How to test Windows .NET TCP program handling of connection failure [closed]

I've written my own C# TCP communications module (using SocketAsyncEventArgs, although that's presumably irrelevant). My module runs at both ends of the connection, client and server. As part of the ...
  • 147
4 votes
4 answers
1k views

Is it the standard accepted practice to install software using VBScript? [closed]

Consider the following requirements Windows software which communicates with a web application using basic authentication The software is an MSI package The software requires a token to be placed in ...
1 vote
1 answer
2k views

Use of FindWindow and window handles within a Windows service

I've got a third-party vendor who is installing a series of Windows services to a (Windows 2008 R2) server in my control. Whilst attempting to run each service under its own least-privilege account, ...
3 votes
1 answer
118 views

Are Secure Desktop and separate process enough for hiding sensitive information in RAM?

In my program, I have an encrypted database on the file system with a password. It is decrypted in RAM, and the sensitive data get spread out too much in RAM for mistake to be auditable easily enough. ...
0 votes
1 answer
2k views

Longest x86 Instruction

I read the recent article "Longest x86 Instruction" https://web.archive.org/web/20160405202815/http://blog.onlinedisassembler.com/blog/?p=23 I attempted to reproduce the curious disassembly issue ...
1 vote
1 answer
1k views

Windows Firewall single rule with multiple IP addresses vs multiple rules with single IP address [closed]

I've tried finding some resources to help me on my dilemma, but wasn't successful in my approach. So here goes: I am implementing an automated firewall manager for Windows Firewall which will ban ...
8 votes
2 answers
701 views

What's the best way to handle Windows API errors in response to system messages or when I have nowhere to return them to?

This is going to be a really stupid question and I hope it's fine for Stack Exchange at all, let alone just this part of it... Right now, my custom Table control uses panic() functions that print an ...
  • 223
4 votes
1 answer
3k views

How much physical memory is consumed by the stack of a .NET thread?

In Stephen Cleary's article in MSDN magazine "Introduction to Async/Await on ASP.NET" he says that "every thread pool thread on a modern OS has a 1MB stack." (modern OS == Windows 7/8 for this ...
  • 230
32 votes
3 answers
8k views

Is address 0000000C a special address?

When programming sometimes things break. You made a mistake and your program tries to read from a wrong address. One thing that stands out to me that often those exceptions are like : Access ...
  • 12.8k
1 vote
3 answers
856 views

Is there actually an advantage to using Win API calls for file access?

I remember coding file access using the Win API about 15 years ago. It was much faster than using the FileStream of my language at the time (Delphi). I spent a while today experimenting in C# under ....
  • 151
1 vote
0 answers
121 views

Curiosity: Unassembled asm in Windows Bootloader

I found this little gem waiting for me in the Windows (10/TP) bootmgr located on the first 300+- MB partition. Can anyone explain to me what it does? Is there an assembler hidden somewhere? These all ...
  • 11
5 votes
1 answer
382 views

Requesting information regarding the use of MUI vs. the use of GetText for i18n/L10n of Windows desktop applications

I have spent the past two days investigating which technology I will use to support translations of text strings (as part of an overall internationalization migration) for an archaic (VC6) Windows ...
5 votes
3 answers
5k views

Why is Win32 API's WM_MOVE being called while dragging the window?

I have two callbacks for WM_MOVE and WM_MOVING. Oddly enough, WM_MOVE is being called while dragging the window. I expected WM_MOVE to be called only when I'm done dragging the window. MSDN says that ...
  • 173
3 votes
1 answer
3k views

Most efficient/cleanest way to Kill a recursive thread safely

I have a number of worker threads which all perform a flood-fill task on different regions of a bitmap. They all make calls to a recursive sub-routine with different parameters(coordinates). Fyi, I am ...
4 votes
3 answers
2k views

How to deal with Windows .NET configuration files

We use the normal app.config file for the configuration of the application. Although it works for now it has some pretty significant drawbacks: Upgrading an application with a modified app.config is ...
6 votes
4 answers
47k views

Detect or Prevent Screen Capture Applications

I am building an app that displays very sensitive information and as such, I want to be able to either Disable the ability to capture the screen Redact the portion of my app that is on the screen ...
  • 187
1 vote
2 answers
280 views

Program Compatibility - OS That Can Run Anything? [closed]

I know that programs that are built on one OS won't work on another, like a Windows program on a Linux distribution, and that there are programs that translate those system calls into system calls ...
2 votes
3 answers
129 views

Smart fallback for line endings in code files? [closed]

What do you recommend as a default fallback for line endings if the operating system cannot be determined? Example Mac OS up to version 9 uses carriage returns (\r) for line endings. Unix-like ...
0 votes
2 answers
11k views

Calling another program from a Windows Service

Problem: I am working on a service which will do some automated processing at a configurable time each night. It does some communication over the internet, formats some information, and creates a file....
  • 67
31 votes
6 answers
6k views

Do we need to test 32-bit software in 64-bit Windows?

I'm working in a software development team as software developer. I've been working on the same project for three years now. The software is a 32-bit desktop based C# application in .NET 4. Our target ...
  • 1,219
5 votes
0 answers
2k views

Is this Auto-Updating strategy for a program in C++ compiled with mingw32 for Windows correct?

I 've been thinking a lot on auto-updating, but wanted to check with you guys if you see any anti-patterns in my proposal: Context I'm coding a game in C++ and SDL, compiled in an Ubuntu (host) for ...
35 votes
6 answers
6k views

Why don't developers make installation automatic on windows? [closed]

This is the inverse to "Why don't developers make installation wizards on linux?", which is interesting, but made me think "Automatic installation is the natural way. Why do they use wizards?". So ...
35 votes
8 answers
12k views

Why don't developers make installation wizards on linux? [closed]

I'm sure it's not about laziness or anything like that but I fail to understand why developers of even mainly consumer facing apps don't make any sort of installation wizard where you go next-next-...
1 vote
0 answers
446 views

API for accessing CTS and DSR signals of serial port [closed]

I'm trying to improve another abstraction of the serial port. The project involved often needs to check one of the single control signals CTS and DSR. This is currently done by a call to ...
  • 630
6 votes
3 answers
5k views

How to securely implement roles in a Windows Form application?

As an ISV, what is considered best practice for implementing application role based security? In other words, only allow users to access certain features in the application based on what roles they ...
0 votes
1 answer
329 views

Simple unicode application?

I want to create simple language learning applications to help friends in learning languages. A simple Java console application would do the trick, but the Windows console does not seem to handle ...
  • 267
2 votes
1 answer
273 views

How do newly-created programming languages use Windows API features?

WinAPI is focused primarily on the C family, but how do new programming languages use those features without creating their own runtime/interpreter type thing? Do they hook directly into the DLL ...
  • 279
2 votes
1 answer
377 views

Drawing a custom rendered control in Windows - resizing

Some background: in order to learn GUI programming and drawing in Windows I'm starting to create my own GUI toolkit in Windows (so this is a didactic exercise, please don't suggest "use Qt" or "use ...
5 votes
1 answer
358 views

How to fix legacy code that uses <string.h> unsafely?

We've got a bunch of legacy code, written in straight C (some of which is K&R!), which for many, many years has been compiled using Visual C 6.0 (circa 1998) on an XP machine. We realize this is ...
  • 261
0 votes
2 answers
2k views

how to approach pharmacy software project [closed]

I would like to complete a pharmacy software proof concept. But I have a few questions I do not know. Physician information In order to refill or dispense a new RX the software needs to have access ...
0 votes
1 answer
265 views

Need advise for porting linux script to Win command line [closed]

I am creating app(script) that is used similar to RSS reader for specific webpage that doesn't have RSS. So my app downloads that html page in defined intervals, checks new items and parses them into ...
  • 19
8 votes
2 answers
3k views

Modern.IE VM license

Microsoft provides some VMs for testing purposes (advertised on Stack Overflow) and I'm trying to understand the license terms. The one I don't really understand is 1.b. You may use the software ...
1 vote
0 answers
6k views

Accessing a 32-bit DLL from a 64-bit process

I'm aware that it's not possible to load a 32-bit DLL into a 64-bit process. The DLL in question is a ODBC driver which is no longer supported (although it works fine) and no 64-bit version of it ...

1 2
3
4 5
7