managed

how to differentiate whether a managed library is running in the context of asp.net application or in a executable?

Hi, how to differentiate whether a managed library is running in the context of asp.net application or in a executable? Thanks in adv ...

Build MSI to install DLL and make it accessible from "Add References" in VS

I'd like to build an MSI installer that installs a managed DLL and makes it accessible to users from Visual Studio's "Add References" menu in Solution Explorer. I believe I am supposed to add a key into the Windows registry but I cannot see how to tell the VS project for the MSI to do this at install. How is this done and where should I...

Calling unmanaged dll from C#. Take 2

I have written a c# program that calls a c++ dll that echoes the commandline args to a file When the c++ is called using the rundll32 command it displays the commandline args no problem, however when it is called from within the c# it doesnt. I asked this question to try and solve my problem, but I have modified it my test environment ...

MEF + Plug-In not updating

I asked this on the MEF Codeplex forum already, but I haven't gotten a response yet, so I figured I'd try StackOverflow. Here's the original post if anyone's interested (this is just a copy from it): MEF Codeplex "Let me first say that I'm completely new to MEF (just discovered it today) and am very happy with it so far. However, I'v...

How to pass SAFEARRAY of UDTs to unmaged code from C#.

I also used VT_RECORD. But didn't got success in passing safearray of UDTs. [ComVisible(true)] [StructLayout(LayoutKind.Sequential)] public class MY_CLASS { [MarshalAs(UnmanagedType.U4)] public Int32 width; [MarshalAs(UnmanagedType.U4)] public Int32 height; ...

How do I combine an unmanaged dll and a managed assembly into one file?

SQLite from PHX Software has combined a managed assembly (System.Data.SQLite) with an unmanaged dll (the SQLite 32- or 64-bit dll) into one file, and managed to link them together. How do I do this? Do I need to embed the managed assembly into the unmanaged dll, or vice versa? ie. my questions are: In which order do I need to do this...

How to call a unmanaged C++ exe from managed c++ exe.

Please tell me how to call a unmanaged c++ exe functions from managed c++ exe or dll? help with code example would be more useful. Thank you ...

Calling member method on unmanaged C++ pointer from C# (I think)

I apologize in advance if this is a trivial question... I'm pretty C++ / unmanaged dumb. Here's a simplified analog to my setup: --In myUnmanagedObject.h in DLL: class myUnmanagedObject { public: virtual void myMethod(){} } --In MyControl.h in Assembly #1: #pragma make_public(myUnmanagedObject) [event_source(manag...

By using ejb 3 , jsf and jboss is it possible to call a ejb method from web module?

Even if I have different modules in my jee application including myproject-web and myproject-ejb; is it possible to call (or inject) my ejb session bean which is in the ejb module from a managed bean which is in the web module? When I asked before, I see the following declaration: @EJB private BeanInterface yourbean However, I wanna lea...

How can I pass managed objects from one Process to another?

I have two assemblies that I'm trying to link together. One is a sort of background process that's built with WinForms and will be designed to run as a Windows Service. I have a second project that will act as a UI for the background process whenever a user launches it. I've never tried attempting something like this with managed code be...

SharePoint 2010 managed paths

Hi! I am currently building an intranet portal with SharePoint 2010. One feature I am using is the My Sites feature. Therefore I created a new Site Collection in an explicit managed path: "my" ...and added a wildcard managed path "my/personal" within the "parent" web application (port 80). The "My Sites" feature works well, as long as...

Creating a ListView/TreeView using Category (Control Panel-Like) View

I currently have an application which uses a regular ListView with groups to show a bunch of modules. I would like to use a Category view. Category view is the new view introduced in Windows Vista for the Control Panel: Is there a third party control or a way (via API) to create a ListView which mimics the behavior of the Windows 7 C...

How to wrap two unmannaged C++ functions into two managed C# functions?

I've got two unmanaged C++ functions, Compress and Decompress. The arguments and returns go as followed: unsigned char* Compress (unsigned char*,int) unsigned char* Decompress (unsigned char*,int) Where all uchars are arrays of uchars. Could someone please help me lay out a way to convert these into managed C# code using the Byte[] a...

In a Visual Studio C++ project with /clr, are its dependencies also compiled to managed code?

To be a bit more clear. If I have a Visual Studio C++ solution that has two projects, say a static library with CLR support turned off, and a second project with CLR support turned on that depends on this static library, does the static library get compiled as managed code? What about libraries that the CLR project uses that are external...

Between a jsf page and a managed bean, why the getter method is called twice

Hi, I have a jsf page with a form has an outputtext in it. The value of outputtext component is called from a backing bean (or managed bean). I know when I code it as #{MyBean.myString} Jsf rename it and calls getMyString() method. However the wierd thing is, when I put a breakpoint to the getter method of this component, I see it is ca...

How to Call COM unmanaged code at Runtime from C#.NET using ITypeLib and ITypeInfo ?

Hello, I need to call unmanaged COM code from C#.NET. By Loading unmanaged COM Type libraries from (LoadTypeLibEx), I am able to iterate over all exposed types by COM TLB. Now I need to call those exposed methods at run time by knowing their addresses or by accessing some how COM vtable's starting address and by applying indexing for ge...

How do I call C++/CLI (.NET) DLLs from standard, unmanaged non-.NET applications?

In the unmanaged world, I was able to write a __declspec(dllexport) or, alternatively, use a .DEF file to expose a function to be able to call a DLL. (Because of name mangling in C++ for the __stdcall, I put aliases into the .DEF file so certain applications could re-use certain exported DLL functions.) Now, I am interested in being ab...

JSF Managed Property question

I have a search page that I'll called "Parent." The search page references a country lookup page that I'll call "Child." When the user selects a country on Child's page and clicks on OK, I set the country back into the parent page. I do this by calling a method on the Parent page called "UpdateCountryCodeWithLookupValue(Child child)" ...

Unable to create unmanaged object using new keyword in managed C++

Hi all, I've created a class with a boost::unordered_map as a member, Linkage.h #ifndef LINKAGE_H #define LINKAGE_H #include <boost/unordered_map.hpp> class Linkage { private: boost::unordered_map<int, int> m_IOMap; public: .... }; Linkage.cpp #include "stdafx.h" ... // methods and in the managed side of C++, I t...

Thread stuck in mutex wait while searching in Boost Interprocess managed_shared_memory

Hi All, We are using boost::interprocess::managed_shared_memory. Recently while testing we found that after process crash threads searching in shared memory got stuck in manage_shared_memory APIs. My initial observation is that m_header recursive lock which is member of segment_manager was in locked state while process crashed and res...