Using Inspector with Mixed managed/native applications

Using Inspector with Mixed managed/native applications

Hi All
If you have native code consumed by managed applications, this may interest you.
We have a large native C++ library, algorithmic in nature. We need to use it inside managed applications (written in one of the .NET languages). To achieve this, we wrap the C++ with Managed C++ wrapper classes packaged into an assembly, which the .NET application can use.
I wanted to find memory problems within my native code.
Initially I set my startup project to be the C# application. That did not work and I got this from Inspector:
This project type is not supported. Cannot start analysis.
Eventually, what I did is to set the startup object to be the native library, and in the Debugging options, I set my application as the startup command.
This was accepted, and Inspector ran and found the leak properly.
I would personally change Inspector to agree to start on a managed project, as it can always use native libraries internally. Anyway, at least there is a way around it.

2 posts / novo 0
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.

Quoting - malutka

Hi All
If you have native code consumed by managed applications, this may interest you.
We have a large native C++ library, algorithmic in nature. We need to use it inside managed applications (written in one of the .NET languages). To achieve this, we wrap the C++ with Managed C++ wrapper classes packaged into an assembly, which the .NET application can use.
I wanted to find memory problems within my native code.
Initially I set my startup project to be the C# application. That did not work and I got this from Inspector:
This project type is not supported. Cannot start analysis.
Eventually, what I did is to set the startup object to be the native library, and in the Debugging options, I set my application as the startup command.
This was accepted, and Inspector ran and found the leak properly.
I would personally change Inspector to agree to start on a managed project, as it can always use native libraries internally. Anyway, at least there is a way around it.

Thanks for sharing your experience. Although, Inspector does not support .NET officially, it might work with native part of mixed code. But be warned, we do not test Inspector with mixed code applications on regular basis and we cannot guarantee completely correct results of analysis.

-Vladimir

Deixar um comentário

Faça login para adicionar um comentário. Não é membro? Inscreva-se hoje mesmo!