Skip to main content
Filter by
Sorted by
Tagged with
-1 votes
1 answer
61 views

I have several Visual Studio projects (Stored Procedures) that have been published to SQL Server 2014 (yes old I know - legacy software) that use System.Net.Http v4.2.0.0 so I know that the assembly ...
A. Guattery's user avatar
2 votes
2 answers
98 views

I am a beginner in C# trying to figure out how ref-safe-context is defined in C#. I declared a function Foo which didn't work since it tries to ref assign a variable with declaration-block to a ref ...
Louis Nicolas Davout's user avatar
-1 votes
1 answer
64 views

I was looking through references but could not find the proper solution. Basically I am planning to have a Managed CLR/C++ DLL (which has winforms, etc). Now to function it it needs to refer to ...
Humble_Aspirant's user avatar
2 votes
0 answers
93 views

If I create a new WinForms project targeting .NET Framework 4.7.2, and replace Program with the following code static class Program { /// <summary> /// The main entry point for the ...
lordmilko's user avatar
  • 321
1 vote
1 answer
107 views

I want to do something simple, Create a SQL CLR that converts data to XLS. I've tried Using OpenXML, but it keeps installing windowbase as a dependency, which uses system.XAML, which SQL server (2019) ...
Sean's user avatar
  • 47
1 vote
2 answers
56 views

In Java and C# and many common programming languages and runtimes using stack-based virtual machines, we write fundamental assignment expressions as simple as this: a = 1; and the compiler initially ...
2474101468's user avatar
2 votes
0 answers
72 views

I am trying to add some Dispose cleanup in a large hierarchy where the default dispose method used to do nothing. When I do so, I get very rare and difficult to reproduce bugs that make me suspect ...
John Melville's user avatar
1 vote
0 answers
222 views

I am trying to access a .NET DLL from python using pythonnet. The dll contains a library that has been converted to .netStandard2. However, I am getting an error when simply trying to import clr. Can ...
Siri Mudunuri's user avatar
0 votes
0 answers
358 views

we have a tool that was written in C++ CLR where its forms where also written as a Winform in C++ CLR, we plan to upgrade it to .NET 8 but it seems there is a pretty huge shift between .net framework ...
user2300947's user avatar
-3 votes
1 answer
60 views

A lot of my Python scripts interface with my C# code and when I make changes to my C# code, it breaks a ton of my Python scripts. I am running Visual Studio for all of my code and was wondering if ...
Zarif Rahman's user avatar
3 votes
1 answer
517 views

In the following bit of code, I'm using C# function pointers to omit using a delegate type, for faster performance. The code works fine when I use a delegate type marshalled as a function pointer, no ...
Mark Oostveen's user avatar
-1 votes
2 answers
108 views

I have a big class from extern library and I need to use a unmanaged callback in managed code. Unmanaged code simplified: typedef std::function<void(const std::string &, Float)> ...
The Overrider's user avatar
-3 votes
1 answer
48 views

I have a CLI/CPP Project (say ProjA). It is referring for some functions defined in another CLI CPP static library (say ProjB). I added ProjB as reference to ProjA. ProjB also has some unmanaged cpp ...
Humble_Aspirant's user avatar
0 votes
2 answers
165 views

I was researching call vs callvirt opcodes with all of the gotchas along the way. You can read the description online, but when you encounter this The callvirt instruction calls a late-bound method ...
Ivan Petrov's user avatar
  • 7,339
-2 votes
1 answer
582 views

I am trying to run a Windows Form in Microsoft Visual Studio 2022. When I attempt to run the solution I get the following error: "LNK1561 entry point must be defined", which links to this ...
shockin's user avatar
  • 11
1 vote
1 answer
54 views

The example below is from CLR via C# book that mimic a hybrid lock: internal sealed class AnotherHybridLock : IDisposable { // The Int32 is used by the primitive user-mode constructs (Interlocked ...
user22155685's user avatar
0 votes
1 answer
1k views

I am trying to create a a stored procedure in SSMS that makes use of CLR. I don't think the script matters, because it works on other machines. The error I'm receiving is: Msg 10335, Level 16, State ...
Vlad Charny's user avatar
0 votes
2 answers
304 views

I've seen a few examples of how to do this from C++ an unmanaged dll, to a C++ managed CLR dll. I currently have a C++ dll (NetPcapWrap), that references a C dll (npcap.dll). Since the npcap.dll is ...
MtnManChris's user avatar
1 vote
0 answers
44 views

I'm trying to follow the example here and I get to the first block of code before I get an error, The type or namespace name 'SqlProcedureAttribute' does not exist in the namespace 'Microsoft....
Patrick's user avatar
  • 2,587
2 votes
0 answers
382 views

I am working with a .NET Framework DLL from Python using Python.NET. The DLL allows you to fetch the parent of a given object, but will return the parent as an instance of the interface ...
leornian's user avatar
0 votes
0 answers
33 views

I've been working on a login form which I'm creating with C++ and SQL server database. The main login form reads everything correctly from the database but I get an error starting a new dialog box to ...
kinshuk's user avatar
-2 votes
1 answer
86 views

I have an unmanaged C++ class SRWindow that I want to wrap in C++/CLI. The wrapper class is called SEWindow and has a constructor that also creates an SRWindow object: public ref class SEWindow { ...
BSP0's user avatar
  • 1
0 votes
1 answer
368 views

below is the source code with my comment for Interlocked: public static class Interlocked { // Int32 old = location; // if (location == comparand) location = value; // return old; public ...
user22155685's user avatar
1 vote
1 answer
183 views

based on this article: https://www.albahari.com/threading/part4.aspx we know that volatile doesn’t prevent a write followed by a read from being swapped, and this can create brainteasers: class ...
user22155685's user avatar
2 votes
1 answer
485 views

I have been struggling with this topic for 1 week now and nothing I tried seems to work. I made a very simple C# class: namespace SimpleMathLib { public class SimpleMath { public float ...
Apache81's user avatar
  • 241

1
2 3 4 5
80