885 questions
1
vote
1
answer
105
views
AccessViolationException in unmanaged function call
I'm trying to write a wrapper for a C library, but I got AccessViolationException on a function call.
I tested the wrapper on my own library. The approach is:
[DllImport("library.dll", ...
3
votes
1
answer
212
views
How to free memory in cpp that is allocated in c# on linux
My function that returns a string looks like this in c#:
[return: MarshalAs(UnmanagedType.LPWStr)]
public static string? GetText()
{
return SomeClass.SomeMethodThatReturnsAString();
}
And function ...
1
vote
1
answer
31
views
OutProc COM from Managed client not closing the out proc server exe
I have a Outproc COM server exe created in C++ using ATL which implements interface methods.
I have 2 test clients to test this. One is native C++ and other is Managed.
Native test client ...
1
vote
1
answer
527
views
Azure function trigger unable to access storage account with key access off
I'm testing an Azure function that has a blob trigger then writes a message in a message queue.
I have "Allow storage account key access" disabled as we want to use Managed identities to ...
0
votes
1
answer
339
views
Managed App Configuration in MAUI for MDMs (InTune, MiraDore etc)
We distribute a managed android version of our mobile app to several large customers for their MDMs. This lets them control the roll out to hundreds of devices. The MDMs in play currently are InTune ...
3
votes
1
answer
88
views
Dispose(bool) for a managed wrapper, is it native or managed in the end?
In the dispose pattern documentation, this is suggested on how to dispose object:
protected virtual void Dispose(bool disposing)
{
if (_disposed)
{
return;
}
if (disposing)
...
0
votes
1
answer
754
views
Azure Container Apps - Restrict API access with managed identities
I have a .NET Core API app running in Azure Container Apps (ACA), I want to restrict access to it to only allowed authentication by managed identity, MS Doc mentions it's possible, but no details.
On ...
6
votes
1
answer
2k
views
Cloudflare Managed Challenge on API for SPA causing challenge not to be seen
I have a SPA that uses NextJS for the frontend, and calls a PHP API. Sometimes a user is able to access the frontend once, but then Cloudflare may require a Managed Challenge, which makes some API ...
1
vote
1
answer
437
views
C# safety concerns for pointer to "ref struct" with managed fields. Ignoring warning CS8500
Consider the following code:
public class SomeClass
{
public bool someBool;
}
public ref struct RefStructWithManagedFields
{
private SomeClass? _managedField;
...
1
vote
0
answers
322
views
Error: Unable to resolve module when using shared library
I am building react native mobile app via npx eas build -p android with expo 49. This error is just related to path while building hence I haven't included environment info in detail. App is running ...
0
votes
1
answer
233
views
Creating multiple different Azure Win servers with managed disks using For_each argument
New to terraform I've been using the count argument to create VMs in Azure. Best practices suggests using For_each argument over using count. I've encountered issues where I wanted to change certain ...
1
vote
2
answers
1k
views
Managed Bootstraper Application (for .Net Framework ) for Wix Toolset v4 Bundle
Been struggling for days to find a working example for a Managed BA for Wix Toolset v4. Most of them are in v3. I have exactly the same issue with this existing question here, and some similar ...
0
votes
0
answers
127
views
Unmanaged exports library not working for c# http requests
I wrote a c# dll with some functions that make requests using the inbuit httpclient from the System.Net package. That dll is called from within a Delphi program, the functions are exposed via the ...
0
votes
0
answers
150
views
Encoding Problems with C++ std::string to C# managed System::String
I'm implementing a C++ DLL which has to interoperate with C# code (and Unity framework), hence I need to be able to convert a std::string to System::String in C++. For this purpose, I wrote the ...
0
votes
0
answers
48
views
How to Delete Managed Code Libraries from Inno Setup Temp Directory at DeInitializeSetup
The problem is Inno (V6.2.2) fails to delete the temporary directory because there are still files in it that are not unloaded. Inno Setup's UnloadDll doesn't work on managed libraries.
Before this is ...
0
votes
1
answer
439
views
How to use Peverify.exe (PEVerify tool)?
I saw a couple of post(this post specifically) talking about using peverify.exe to check whether the .net exe(or dll) contains unsafe code. But no matter what I do I keep getting File not found or has ...
-3
votes
1
answer
56
views
How to return managed this pointer
This is probably a simple noob user-error, And I feel dumb not figuring this out myself. I have some old unmanaged code that I need to convert to managed c++ .net, because I want to Serialize the ...
2
votes
1
answer
572
views
Setting up Django application on Hetzner Managed Server
I have a managed server from Hetzner for my wordpress websites and now I want to deploy a django application on it without renting a cloud server from hetzner.
The application runs on my computer with ...
0
votes
1
answer
931
views
c# - The 'ClientID' option must be provided - Azure API - Connect to AzureSQL using managed identity
I have built an API as an Azure Web app that will be hosted through Azure API Management Service. I need the app to connect to an AzureSQL database using a system assigned managed identity.
var ...
0
votes
2
answers
690
views
How to correctly pass a vector of struct from C++ to C#?
Here is my code in C++
struct myStruct
{
int cid;
float c;
float r;
};
int Predict(myStruct* p, const char* path2D)
{
std::vector<myStruct> result = SomeFunction(path2D);//e.g., ...
-1
votes
1
answer
675
views
How can I use MailComposer in my react native expo managed workflow project?
Error: Cannot find native module 'ExpoMailComposer'
this is the error I get as soon as I insert
import * as MailComposer from "expo-mail-composer";
in my code.
I believe the documentation ...
1
vote
1
answer
728
views
SQL Server managed instance how to backup database to local file system
We utilize SQL Server as a managed SQL instance. All input and output files / data is to the blob. I need to perform a full backup of a database and store it on local file system and restore it later. ...
0
votes
1
answer
203
views
IIS Managed module AddOnBeginRequestAsync not need result
Trying to save search log into local file. I need async handler for it, but AddOnBeginRequestAsync needs a IAsyncResult returned from BeginRequest, EndRequest. How to to this without it? return null - ...
0
votes
1
answer
588
views
Visual studio 2022 VC++ class wizard new class has a managed option
I am using visual studio 2022 with c++, and I wanted to use the class wizard feature to add a class, when I noticed that in the add class menu there is an unselectable option titled "Managed"...
1
vote
0
answers
142
views
How can I override a virtual method of a .NET class in Python using PythonNet
I'm trying, without success, to override the virtual methods of a .NET class in a Python derived class.
Environment
Visual Studio 2022
Pythonnet version: 3.0.1
Python version: 3.10 64-bit.
Operating ...
1
vote
1
answer
84
views
Delegate getting GC even after pinning?
Related code here: https://github.com/AkazaRenn/FruitLanguageSwitcher/blob/main/Core/Hotkey.cs#L17
Callback code related class:
internal class Hotkey {
[UnmanagedFunctionPointer(...
0
votes
0
answers
133
views
Can not change dictionary of com.apple.configuration.managed
I am trying to change the value of for a key in the dictionary 'com.apple.configuration.managed' inside UserDefaults with Swift 5
This is my code:
if let dict = UserDefaults.standard.dictionary(forKey:...
0
votes
0
answers
405
views
Installing global WH_KEYBOARD hook from a second process breaks the behavior on the first one
I work on a product that uses accessories to send commands to the system. These accessories are basically USB keyboards and each of them has a different set of keys, on which we must act differently, ...
1
vote
0
answers
1k
views
Set .net version in a visual studio c++ project using Common Language Runtime Support
I have a visual studio 2019 C++ v142 project with Common Language Runtime Support enabled. The project uses the msclr interop to use a .Net dll. The current .Net dll is version 4.0. The project does ...
0
votes
1
answer
324
views
Installshield Installer MSI Error : Could not load assembly by name "abcd", Version : 6.0.0.0
In an Basic MSI project , a function needs to be called from a Managed DLL (C# built in .NET core 6.0). This DLL is added as Support file in MSI. When the MSI is invoked and the custom action is ...
-3
votes
1
answer
118
views
How to expose native to managed - C++/CLI on x64 Platform
I have a static lib in my project and I want to use this in my .net project.
I have taken this project as a starting point.
Exposing native to managed - C++/CLI
My use case is the Second Approach.
So ...
4
votes
1
answer
3k
views
Convert Expo managed workflow to bare React Native
I am going to convert current expo project from Expo managed workflow to bare React Native to use react-native-branch.
I run this command on terminal.
expo eject
I can run app on local environment, ...
1
vote
1
answer
84
views
How struct size effects automatic marshaling in .NET
I am working on a C# .NET wrapper that wraps an unmanaged C++ Driver. The logic is to create a C# class that has methods which wrap the DLLImport entries.
One of the functions of the unmanaged driver ...
1
vote
0
answers
446
views
Another maven dependency range not working as expected
I know this is a much discussed topic. There are severals pages with happy and sad endings.
I've read:
maven-dependency-range-does-not-work-as-expected
maven-version-ranges-do-not-behave-as-expected
...
3
votes
1
answer
151
views
VMMap v3.32 does not analyze Managed Heap on Windows 10 and Windows Server 2012 R2
Managed Heap tab is not populated
The VMMap utility does not show the memory details of the Managed heap. Have tried to run it on both Windows 10 and Windows Server 2012R2. Any inputs on how to make ...
1
vote
2
answers
1k
views
is it possible to force cudaMallocManaged allocate on a specific gpu id (e.g. via cudaSetDevice)
I want to use cudaMallocManaged, but is it possible force it allocate memory on a specific gpu id (e.g. via cudaSetDevice) on a multiple GPU system?
The reason is that I need allocate several arrays ...
-1
votes
1
answer
127
views
why dbghelp cannot resolve symbol from managed callstack?
What's the difference between managed callstack and native callstack, why cannot resolve the symbol from managed callstack by dbghelp? can anyone tell me the basic reason?
0
votes
2
answers
641
views
How can I check if a .NET dll uses unsafe code?
Given a .NET assembly (DLL or EXE), how can I make sure it does (or does not) use unsafe code, with a command line tool?
1
vote
1
answer
2k
views
Azure SQL MI - advantages of using a private endpoint
Seems like an easy question but since SQL MI already requires a subnet delegated to it, Why Would you use a private endpoint? You already have a private IP address which will keep traffic contained to ...
7
votes
1
answer
9k
views
VS2022: Is there a faster way to toggle "Enable Native Code Debugging" setting?
I work on a solution with both managed (C#) and native (C++) code. The managed code calls into the C++. I typically have native code debugging disabled because it makes the whole experience slower ...
1
vote
2
answers
262
views
Mouses cursor speed UWP C++/CLI
I am trying to get the mouse cursor speed in a windows UWP app using C++/CLI. In a traditional Win32 App I would use the SystemParametersInfo function, something like:
SystemParametersInfo(
...
0
votes
0
answers
216
views
Marshalling const std::string parameters [duplicate]
When I try to import the function
extern __declspec(dllexport) void SomeNativeFunction(const std::string param1, const std::string param2);
defined and declared in SomeNative.Dll into a .NET ...
0
votes
0
answers
23
views
Azure Managed storage account communication happens over public or private endpoint
Can we enable private endpoint for managed storage account and does the communication happen over Private or public endpoint for the account.
0
votes
0
answers
583
views
Is it possible to expose my own methods to C# in a custom native CoreCLR host environment?
I've been following this guide to create my own .NET Core 6 host from an unmanaged C++ application using hostfxr.h and nethost.h, and interface with a managed DLL written in C#. I can retrieve and ...
0
votes
0
answers
46
views
How to Call c++ functions from a c# project [duplicate]
I have made a c++ mfc project and c# class library the mfc project is compiled using Common Language Runtime Support (/clr), and the c# project is included by reference in side the mfc app.
The mfc ...
1
vote
1
answer
443
views
Hive - incomplete rows in select from managed partitioned table
I need to copy data from a CSV file to a managed partitioned table in Hive.
CSV file rows are:
id,nome,cognome,ruolo
16,Mike,Maignan,Portiere
23,Fikayo,Tomori,Centrale
24,Simon,Kjaer,Centrale ...
-1
votes
1
answer
546
views
Azure managed application defintion and terraform scripts
Is it possible to create an "azure managed application definition" using createUIDefintion.json file and terraform scripts, instead of a mainTemplate.json (arm template) ?.
-1
votes
1
answer
284
views
Azure Managed Instance - Virtual Machine
I have setup an Azure VM that is linked to my Managed SQL, but I need to install SSMS and ODBC drivers but the machine tells me nothing can be installed.
Also, I did the install from this (https://...
2
votes
0
answers
410
views
AWS Managed Grafana - Unable to connect to Amazon Document Db as MongoDB data source
hello i am unable to connect to document DB from amazon licensed managed grafana service . Both services are in same region US East ohio.
i am using following conn string to connect with certificate ...
0
votes
1
answer
128
views
JMeter request params not populating managed bean
I'm writing a JMeter script to test some ajax-based JSF 2.3 pages. I am able to authenticate and create a user session against my application, but when I attempt to provide data to a form, the input ...