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

learn more… | top users | synonyms (1)

0
votes
2answers
716 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 ...
0
votes
0answers
11 views

Default Application Compatibilty Manifest for new Visual-Studio projects? [migrated]

I'm currently fighting with some app compat settings, specifically a certain shim, and looking into the compatibilty section of the application manifest. Details aside, one thing that strikes me as ...
16
votes
9answers
2k views

What were the reasons why Windows never had a decent shell? [closed]

I was reading a topic on SO: Why are scripting languages (e.g. ...) not suitable as shell languages?. Especially I liked the answer by Jörg W Mittag, from which I learned interesting things about ...
-3
votes
0answers
44 views

Compiling C++ on windows [closed]

This is my first time posting something up there so any advice would be good. (I'm not a native english speaker, so i may be difficult to understand from time to time, don't hesitate to point out my ...
-1
votes
0answers
128 views

Cannot allocate very large memory blocks even though I'm compiling as x64 [closed]

Running on 64-bit Windows and compiling my code with Visual Studio 2015 in 64-bit mode, when I attempt to allocate large amounts of memory (e.g. 0xff_ffff_ffff bytes, or just under 1TB) the ...
-2
votes
0answers
54 views

Will it help to just recompile Open Office for 64-bit Windows?

On the Open Office website they only have one version of Open Office for Windows and it's 32-bit. A 64-bit version is available for linux, but not for Windows. The 32-bit version can run on 64-bit ...
0
votes
0answers
41 views

Compatibility with POSIX's fork() in Windows by means of the NT Native API [closed]

Small introduction for if the reader is not aware of the involved details: In the context of the NT architecture, the Native NT API, a.k.a ntdll.dll, is a fundamental part of the operating system, ...
14
votes
3answers
264 views

Supporting development for older OS

I am maintaining a large portion of legacy code, written in C. This code was initially written to be comiled against Windows 3 for Workgroups, and later a version for NT was created. This legacy ...
3
votes
1answer
89 views

Effect of demoting copy-on-write page to read-write on other processes

The Windows OS tries to conserve physical memory usage by allowing DLLs loaded in their base (desired) address in different processes to use the same physical pages with copy-on-write semantics; this ...
2
votes
2answers
322 views

Could someone write an opensource version of the Windows API?

I am wondering if it is both possible and how one would write an opensource version of the Windows API. What I mean by this is, say you #include <Windows.h> in your C++ application. Then you ...
1
vote
3answers
127 views

Use case for async/await?

Background Most of the applications that I write are hour long sequential tests for electronic equipment. The equipment under test has a specification that is a state-machine that looks like... Get ...
1
vote
2answers
89 views

Catching exceptions from child process

I am looking for any info. (I know some C++ with win32 and C#) The Idea: The idea is to help a program with missing files load. In the end I wanted to see if I could have my program launch a simple ...
0
votes
1answer
70 views

When should I consider using a string table resource over a string constant in my Win32 application?

I've written a fair bit of Win32 desktop apps as hobby projects throughout my career but I've never used resources of the type string table in any of them; usually I either hard-code strings or build ...
2
votes
1answer
30 views

What's a good strategy to go about registering 2-step hotkeys?

User32.dll exposes a RegisterHotKey function, to register, well, hotkeys: [DllImport("user32.dll", SetLastError = true)] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool ...
4
votes
1answer
136 views

A manual and automated CSV file upload solution for a website

Problem I run a website which has a requirement for a new feature - to enable users to upload CSV files into the website. The users will only ever need to upload 1 CSV file at a time, and only 1 or 2 ...
2
votes
2answers
83 views

Multiple windows

A while back I got into a discussion with a classmate about whether our application should use multiple JFrames, or windows. I'm a linux-user, and said yes. He's a windows-user, and said no. When ...
0
votes
0answers
45 views

Centralized management of app.config parts for self-hosted .NET services

What will be the best way to handle these scenarios, if they are not one-time, but regular: Self-hosted services on quite a bunch of machines are needed to be reconfigured to a different database in ...
2
votes
3answers
169 views

When does gcc not work on Windows [closed]

Everyone (who knows C) always tells me to be careful when using gcc to compile on Windows, yet they never actually tell me what the compatibility issues are. I'm left to believe that gcc is just 'not ...
2
votes
0answers
111 views

Speed: Named Shared Memory vs Memory Mapped File vs Normal Memory

Let's say I have a server, where clients who connect are constantly updating their inventory. I could simply save the changes in to the database after an item has been updated, or I could update the ...
2
votes
0answers
51 views

ODBC 3 Multiple Statements vs Multiple Connections

So right now I have a single thread to handle all the requests for the database. Let's say I have 400 requests per second for logins / logouts / other stuff, and 400 requests per second which are only ...
2
votes
0answers
50 views

Designing a web based smart card publisher

I'm working on an application that's supposed to have a web based GUI where you can insert some data. That data will be saved in persistent storage and a hex number generated and stored alongside. ...
1
vote
1answer
88 views

What's the historical reason of including DOS-stub in PE images?

I have been wondering this question recently. Why does PE images have to be executable in MS-DOS? I've read on the topic and most of the answers I've seen simply explain it with compatibility. But ...
-1
votes
2answers
161 views

Creating an ASP.Net MVC web application that can work on different operating systems

I have been developing and deploying many ASP.Net MVC web applications under Windows Server 2008 R2 & Windows Server 2012 R2, and I used IIS 7 & IIS 8. At the same time I know that I can ...
-1
votes
1answer
83 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 ...
6
votes
4answers
2k views

Is there much difference between X86 Assembly language on Windows and Linux?

I'm a complete beginner at Assembly, and my aim is to learn as much as I can to do with Assembly to one day I can reach expert level (I know I'm way off right now, but you never know). My only problem ...
2
votes
0answers
91 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 ...
0
votes
1answer
297 views

How many developers on the same virtualized Windows Microsoft machine?

How many c# developers on the same virtualized Microsoft Windows edition is it sensible to have? If everyone uses their own documents and settings folder, should I expect it should be fine? Only ...
3
votes
1answer
135 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 ...
0
votes
1answer
114 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 ...
1
vote
1answer
70 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 ...
-1
votes
1answer
123 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 ...
2
votes
2answers
567 views

Difference between mutex in windows and linux

Is that correct that a mutex object in Linux cannot be used for cross process synchronization as opposed to its Windows counterpart? If that is true - what was the idea to limit mutex synchronisation ...
3
votes
1answer
55 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, ...
1
vote
0answers
151 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 ...
0
votes
0answers
35 views

Looking for an elegant solution to monitor and start an application in non-administrator user login in Windows

I would to get some suggestions or idea about how to tackle this problem. Background I need to run an application on a Windows serve. The application has a dependency on MS Office and it interacts ...
20
votes
5answers
5k views

Why can't Windows services have a GUI?

I was using this feature in earlier Windows release like XP and NT. I was able to run a GUI from a Windows service. But it is not possible in the later versions. What is the reason behind the removal ...
13
votes
4answers
697 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 ...
4
votes
1answer
3k 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 ...
0
votes
1answer
76 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++ ...
0
votes
2answers
918 views

How are new[] and malloc implemented in Windows? [closed]

So when you call malloc or new [] from your C/C++ application, how does the CRT translate it into Windows API calls?
6
votes
2answers
1k 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 ...
0
votes
0answers
69 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 ...
25
votes
5answers
4k 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? ...
0
votes
1answer
471 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 ...
2
votes
2answers
390 views

What is the best way to maintain software tool chains?

Short Question What is the best way to create, maintain, and distribute software development tool chains? Background I am trying to develop a workflow / process to create an isolated environment in ...
7
votes
2answers
339 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 ...
0
votes
3answers
139 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 ...
3
votes
1answer
266 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
1answer
167 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 ...
3
votes
1answer
97 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. ...