Skip to content

azkurban/win-service-manager-demo

Repository files navigation

win-service-manager-demo

Demo hybrid WPF/C++ app using PInvoke for Windows Service Control management.

Solution:

WPF app project (C#, .NET 3.5): ServiceMan

This application can work under all Windows 7+ (x86/x64) 0S versions with .NET 3.5 Framework installed.

Console Test App (C#, .NET 4.0): NativeDllTestApp

.NET 4.0 have have been chosen for the test application due to fact that .NET 3.5 does not supported mixed debugging (from managed to unmanaged code).

Unmanaged DLL project (C++): svcman

Resources

Interop (Platform Invoke is used)

Books

.NET 2.0 Interoperability Recipes: A Problem-Solution Approach By Bruce Bukovics

Blogs

BadImageFormatException, x86 i x64

Please, refere to this article to learn how to proper build (or even configure without rebuilding) the app for the both x86 and x64 Windows OS versions.

C++ Unmanaged DLL

Microsof Documentation:

Starting a Service

Stopping a Service

NotifyServiceStatusChangeA function

Asynchronous Procedure Calls

GitHub:

Using NotifyServiceStatusChange for monitoring services:

microsoft/Windows-classic-samples/Samples/Win7Samples/winbase/monitorservices/monsvc/MonSvc.cxx

WPF

Microsoft Documentation

BackgroundWorker Class

GitHub

microsoftarchive/msdn-code-gallery-community-s-z/WPF Listview Context Menu/C#-WPF Listview Context Menu/C#/WpfListViewContextMenu/MainWindow.xaml.cs

microsoftarchive/msdn-code-gallery-community-s-z/WPF Listview Context Menu/C#-WPF Listview Context Menu/C#/WpfListViewContextMenu/MainWindow.xaml

Tutorials

The WPF Context Menu

Working with Background Workers in C#

About

Demo hybrid WPF/C++ app using PInvoke for Windows Service Control management

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors