managed

ODP.NET Oracle.ManagedDataAcess random ORA-12570 errors

倖福魔咒の 提交于 2019-11-28 20:36:15
I'm trying to migrate to Oracle.ManagedDataAcess from unmanaged version and receiving randoms ORA-12570 TNS:packet reader failure. I don't know why this error starts, but once it starts, every subsequent request gives the same error for about 10-30 minutes, then it works again for another 10-30 minutes and so on. So it is a random of subsequent failures for some time then subsequent success Already tried a lot of things, to resume: The environment: Oracle.ManagedDataAcess version 12.1.2400 (4.121.2.20150926) (nuget) (no gac reference installed on server that could override the bin version)

How do i prevent my code from being stolen?

二次信任 提交于 2019-11-28 17:15:22
What happens exactly when I launch a .NET exe? I know that C# is compiled to IL code and I think the generated exe file just a launcher that starts the runtime and passes the IL code to it. But how? And how complex process is it? IL code is embedded in the exe. I think it can be executed from the memory without writing it to the disk while ordinary exe's are not (ok, yes but it is very complicated). My final aim is extracting the IL code and write my own encrypted launcher to prevent scriptkiddies to open my code in Reflector and just steal all my classes easily. Well I can't prevent reverse

Marshaling – what is it and why do we need it?

北城余情 提交于 2019-11-28 15:27:06
What is marshalling and why do we need it? I find it hard to believe that I cannot send an int over the wire from C# to C and have to marshall it. Why can't C# just send the 32 bits over with a starting and terminating signal, telling C code that it has received an int ? If there are any good tutorials or sites about why we need marshalling and how to use it, that would be great. Because different languages and environments have different calling conventions, different layout conventions, different sizes of primitives (cf. char in C# and char in C), different object creation/destruction

Detecting memory leak in mixed environment(Managed-Unmanaged)

∥☆過路亽.° 提交于 2019-11-28 14:32:53
I've an application written in VC++ MFC 6.0. Recently got upgraded to .NET 3.5 by compiling in vs2008 and added some WPF applications to it by using managed and unmanaged environment. Basically hosting WPF on win32 window. If I just open a WPF app window, memory keeps going up like 1KB/10 secs. I've tried using .NET Memory profiler & Ants memory profiler. But both are not helping me in detecting the leaks!! I've removed all the WPF controls from the hosted WPF application. It just contains a page having just a frame. But still the leak happens!! Would some one please help me what could cause

Passing char pointer from C# to c++ function

自闭症网瘾萝莉.ら 提交于 2019-11-28 08:59:27
问题 I am stuck in c# implementation side, as I am pretty new to it. The thing is, I want to pass a 'pointer'(having memory) from c# code so that My c++ application can copy pchListSoftwares buffer to pchInstalledSoftwares. I am not able to figure out how to pass pointer from c# side. native c++ code(MyNativeC++DLL.dll) void GetInstalledSoftwares(char* pchInstalledSoftwares){ char* pchListSoftwares = NULL; ..... ..... pchListSoftwares = (char*) malloc(255); /* code to fill pchListSoftwares buffer*

WinApi - GetLastError vs. Marshal.GetLastWin32Error

吃可爱长大的小学妹 提交于 2019-11-28 03:55:00
I tested a lot. But I found no disadvantages of those 2! But see the accepted answer. I read here that calling GetLastError in managed code is unsafe because the Framework might internally "overwrite" the last error. I have never had any noticeable problems with GetLastError and it seems for me that the .NET Framework is smart enough not to overwrite it. Therefore I have a few questions on that topic: in [DllImport("kernel32.dll", SetLastError = true)] does the SetLastError attribute make the Framework store the error code for the use of Marshal.GetLastWin32Error() ? is there an example where

Difference between native and managed code?

做~自己de王妃 提交于 2019-11-28 02:59:10
For example, when looking at the GlowCode profiler website it says: "GlowCode 6.2 and x64 profile native, managed, and mixed C++, C#, .NET code" What do they mean? Native code is the code whose memory is not "managed", as in, memory isn't freed for you (C++' delete and C's free, for instance), no reference counting, no garbage collection. Managed code, you guessed it, is the code whose memory is free and allocated for you, garbage collection and other goodies. Mixed code is when you have managed code that calls onto an unmanaged layer. Normally, when you have a pure unmanaged C++ DLL and you

What is the difference in managed and unmanaged code, memory and size?

二次信任 提交于 2019-11-28 02:56:58
After seeing and listening a lot regarding managed and unmanaged code, and knowing the only difference is that managed is about CLR and un-managed is outside of the CLR, it makes me really curious to know it in detail. What is it all about, managed and unmanaged code, memory and size? How can code I write in C# be unmanaged while this is C# code and how does a memory of size becomes unmanaged. An example and a little insight would be helpful. Short answer: Managed code is .NET code (VB.NET, C# etc.) that you write and compile to .NET CIL . Unmanaged code is code that is not under .NET that

What are managed types? Are they specific to Delphi? Are they specific to Windows?

落爺英雄遲暮 提交于 2019-11-28 01:10:40
问题 Summarization: Please check the knowledgeable comments below. ============================================================== I have seen the term of managed types mentioned in quite a few stackoverflow Delphi topics. For example, it is mentioned in topics of correctly initializing/finalizing . However, when I google managed types , it seems most links are related to C++, or .NET. For example, see the MSDN page. Could some one help to comment what are managed types defined in Delphi? Given

Wrapping unmanaged C++ with C++/CLI - a proper approach

女生的网名这么多〃 提交于 2019-11-28 00:03:40
as stated in the title, I want to have my old C++ library working in managed .NET. I think of two possibilities: 1) I might try to compile the library with /clr and try "It Just Works" approach. 2) I might write a managed wrapper to the unmanaged library. First of all, I want to have my library working FAST, as it was in unmanaged environment. Thus, I am not sure if the first approach will not cause a large decrease in performance. However, it seems to be faster to implement (not a right word :-)) (assuming it will work for me). On the other hand, I think of some problems that might appear