DORSETRIGS
Home

pinvoke (12 post)


posts by category not found!

How to call DrawThemeTextEx in .NET

How to Call Draw Theme Text Ex in NET When it comes to creating aesthetically pleasing Windows Forms applications the ability to customize the appearance of tex

3 min read 08-10-2024 36
How to call DrawThemeTextEx in .NET
How to call DrawThemeTextEx in .NET

.NET signature to p/invoke GetSystemDEPPolicy function

Understanding NET Signature to P Invoke Get System DEP Policy Function When working with Windows APIs in NET applications developers often need to leverage Plat

3 min read 08-10-2024 34
.NET signature to p/invoke GetSystemDEPPolicy function
.NET signature to p/invoke GetSystemDEPPolicy function

Do I need 2 different PInvokes to Get and Set mouse speed?

Do I Need Two P Invokes for Mouse Speed A Deep Dive The Problem You re working on a program where you need to adjust the mouse speed You ve heard about using P

2 min read 07-10-2024 29
Do I need 2 different PInvokes to Get and Set mouse speed?
Do I need 2 different PInvokes to Get and Set mouse speed?

How to deal with files with a name longer than 259 characters?

How to Deal with Files with a Name Longer than 259 Characters When working with files on a Windows operating system you may encounter a frustrating limitation f

2 min read 26-09-2024 75
How to deal with files with a name longer than 259 characters?
How to deal with files with a name longer than 259 characters?

Move top menu from a hosted program to the main wpf app

How to Move the Top Menu from a Hosted Program to the Main WPF Application Moving a top menu from a hosted program to the main WPF Windows Presentation Foundati

3 min read 24-09-2024 77
Move top menu from a hosted program to the main wpf app
Move top menu from a hosted program to the main wpf app

PInvoke memory management: strings inside structs passed by reference

Understanding P Invoke Memory Management Strings Inside Structs Passed by Reference P Invoke or Platform Invocation Services allows managed code to call unmanag

3 min read 18-09-2024 61
PInvoke memory management: strings inside structs passed by reference
PInvoke memory management: strings inside structs passed by reference

Why would I need `DangerousAddRef`/`DangerousRelease` around `DangerousGetHandle`?

Understanding the Need for Dangerous Add Ref and Dangerous Release around Dangerous Get Handle When working with unmanaged resources in NET especially when deal

2 min read 15-09-2024 55
Why would I need `DangerousAddRef`/`DangerousRelease` around `DangerousGetHandle`?
Why would I need `DangerousAddRef`/`DangerousRelease` around `DangerousGetHandle`?

Interop Delphi dll / C# - bad memory allocation or marshaling

Delphi DLLs and C Navigating the Memory Allocation Maze Interacting between Delphi DLLs and C applications can be a powerful combination but it also presents ch

2 min read 13-09-2024 67
Interop Delphi dll / C# - bad memory allocation or marshaling
Interop Delphi dll / C# - bad memory allocation or marshaling

How do I marshal a C# struct with delegate fields?

Marshaling C Structs with Delegate Fields A Comprehensive Guide Marshaling data between managed and unmanaged code is a common task in C While marshalling simpl

3 min read 13-09-2024 72
How do I marshal a C# struct with delegate fields?
How do I marshal a C# struct with delegate fields?

Unable to load DLL (Module could not be found HRESULT: 0x8007007E)

Unable to load DLL My Own dll The specified module could not be found HRESULT 0x8007007 E Troubleshooting DLL Loading Errors in NET The Problem You re trying to

3 min read 07-09-2024 65
Unable to load DLL (Module could not be found HRESULT: 0x8007007E)
Unable to load DLL (Module could not be found HRESULT: 0x8007007E)

Read system clipboard as stream instead of string

Reading the System Clipboard as a Stream A Practical Guide Copying large amounts of data to the clipboard can lead to unexpected behavior especially when using

4 min read 06-09-2024 117
Read system clipboard as stream instead of string
Read system clipboard as stream instead of string

Get handle to desktop / shell window

How to Get a Handle to the Desktop Window in Windows A Comprehensive Guide Determining if the user is focused on the desktop window is a common task in Windows

3 min read 29-08-2024 59
Get handle to desktop / shell window
Get handle to desktop / shell window