.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

3rd Party Managed C++ File Reference Question

Posted By:      Posted Date: December 04, 2010    Points: 0   Category :.NET Framework

This seems like a common scenario but I can't seem to figure it out.  Here is my situation:


1. My development machine is a Windows 7 Ultimate 64-bit box with Visual Studio 2010 Professional.


2. I have a Visual Studio 2010 solution with a single managed C# project that depends on a 3rd party managed C++ assembly.


3. I have both a 32-bit and 64-bit version of the 3rd party managed C++ assembly (same file name).


4. I

View Complete Post

More Related Resource Links

Sharing a file handler between managed and unmanaged code?

This is related to Interops, and sharing a file handler between a WPF UI and a native C++ DLL. I'm working on an application using MVVM as a guide. I want to use WPF for the UI, however it is a complex scientific application, which requires performance, and I am using C++ along with some GPU based code for all the modeling/processing. This is a Windows based app, no real network comm involved. I come across a challenge in terms of storing data. The data is multi-dimensional, and can be projected in many ways, while each projection can be processed/filtered in many ways too. I end up with a tree of data, with the raw data at the root and many branches. XML seems like an ideal way to store the information about this dataset, but as far as the raw data, it is not so convenient. I read about base64 encoding and the various binary-XML techniques, but see a major issue: the size of the converted data (150% of the raw) which in my case is huge (raw data is easily 200MBs+, and the multitude of projections can make it several 100's of MBs easily). There is the option of saving several files, but then it may become a nightmare for a user to 'transfer' files properly, so a one-file system seems best. I basically need to have the XML-like structure accessible to the UI, while the raw data needs to be accessed by the unmanaged code. So I was thinking I could concat

Log file size question

I recently setup transaction log backups after we had a log file get near its capacity. I noticed after log files are truncated, they still use up the same amount of disk space. Is it safe to shrink a log file?  If so how do you determine what is an appropriate size to shrink it to? I ask this because some databases, like a sharepoint content database, have log files that are 130 GB in size when their data files are only 5 GB.  I assume that now that I am running hourly log backups they dont need logg files that huge. -Edit - Also most of the logg files are setup with the default settings

How can i add .manifest file reference to the asp.net 2.0

Hi Guys,I have a COM DLL and i made .manifest file for it so i can use it on my host.but i cant add the reference to the asp.net 2.0.Can you please help me .RegardsMoji

WPF: can we reference a image file (~.png or ~.bmp) from a separated assembly?

We try to reference a image file (xxx.png) in a separated Reference assembly call "ResourceLibrary.dllwe have implement following code in another assembly (not main execuation assembly). <Button > <Image x:Name="pageUpArrow" Stretch="Uniform" Source="pack://application:,,,/ResourcesLibrary;component/Images/xxx.png" /> </Button> We get a complaint at run time:Message="Cannot convert string 'pack://application:,,,/ResourcesLibrary;component/Images/xxx.png' in attribute 'Source' to object of type 'System.Windows.Media.ImageSource'. Cannot locate resource 'images/xxx.png'.  Error at object 'System.Windows.Controls.ControlTemplate' in markup file ...Could we directly reference a image file (xxx.png) in saperated assembly?thanks!Jane

Reference.vb file not added

Hi, After adding WCF service reference, Reference.vb file is not getting added in my client code. What could be the reason ? I added service in following steps: 1. Selected option "Add Service reference" 2. Discover Services in this solution 3. Added Service Reference. After adding service reference, following files got created in App_WenReference folder: Folder TestServiceReference Within folder TestServiceReference, following files got created: Configuration.svcinfo TestService.disco TestService.wsdl TestService.xsd TestService1.xsd TestService2.xsd TestService3.xsd TestService4.xsd But Reference.vb file is not added. What could be the reason ?Amit Lohakare

Project dependency / reference and 3rd party dlls missing

hi,i'm having the same problem in multiple solutions and i asked for help in a couple of "forums" already.... here is an easy explaination about my problem.we have 3 projects:Project "A" - a web applicationproject "B" - class libraryproject "C" - class libraryProject C holds a reference to a 3rd party dll. let's say thirdparty.dll. the 3rd party dll is referenced in the C.csproj file with a relative path and private = true (copy local = true): <Reference Include="ThirdPartysNameSpace.BlaBla, Version=, Culture=neutral, PublicKeyToken=0912345678910123, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\_tools\thirdparty.dll</HintPath> <Private>True</Private> </Reference> Project B holds a project to project reference to Project C.Project A holds a project to project reference to Project B.when i compile project C the thirdparty.dll is copied to its bin directory. C's bin directory contains C.dll and thirdparty.dll - correct so far.however when i then compile project B the thirdparty.dll isn't copied to project B's bin directory! B's bin only contains C.dll and B.dll. why isn't project C's bin content copied to B's bin?(sure thirdparty.dll is also missing in project A's bin directory.

Configure managed accounts - object reference not set to an instance of an object - error

I was working in central admin and activated the managed accounts password change for the farm account with the option to change the password now.  I got the email notification that the password was changed and it seems in the log files that it did update all the credentials that were used with the account.  Problem is now that when I hit the configure managed accounts link in central admin all I get is the error: Error Object reference not set to an instance of an object.  Troubleshoot issues with Microsoft SharePoint Foundation. Correlation ID: c6dc7a46-894f-4b85-8711-8af1e8ec7903 Date and Time: 8/23/2010 9:20:20 AM Added information from logs: 08/23/2010 10:41:33.24  w3wp.exe (0x0F2C)                        0x07FC SharePoint Foundation          Logging Correlation Data       xmnv Medium   Name=Request (GET:http://cmtcalcium:33333/_admin/ManagedAccounts.aspx) b9fae5a9-7405-407d-87fc-239dc0ff59d0 08/23/2010 10:41:33.24  w3wp.exe (0x0F2C)                        0x07FC SharePoint Foundation     &n

SSIS package - change Web reference's addres from Configuration file?

Greetings. The SSIS packages provide very nice options to configure them from an XML file, which allows to change credentials, database names etc w/o editing the package. This lets me, say, transfer package from one server to another or from test to production w/o any hassle - just changing the xml. Problem is, i need to acces a web service in my package, and built-in SSIS web service task is useless and just SUCKS. It fails to work even with miscrosoft's own sharepoint web service. So, i have to use scripting task. And scripting task uses "web reference" to access web services, which in turn gives no way to change it's url.  So, if i want to test and then move to production, i'll have to edit my package to change the web reference url from "testserver:5123/mywebservice" to "productionserver:81/webservices/mywebservice". And then change it again to test it again. Etc. Is there a solution to this? A way to programmatically change web reference's url from inside scripting task?

How to read LDF file without using third party tool


Hi there

I need to be able to read my LDF file without using a thrid party tool, because i want to restore accidently deleted data.

Thanks for ur help

How to read LDF file without using third party tool


Hello there,

I need to know how can i read LDF file without using a 3rd party tool

thanks for your help

Design Question - Child Class Reference


There has to be a better way to design the following:

public class Member {
  public int stateID {get; set;}

  public State state {
    get {
      if (this.stateID > 0) 
        state = State.GetByID(this.stateID);

public class State {
  public string name {get; set; }

  public static State GetByID(int id) {
    //populates state from db

Now if I loop through a list of members and need to display the state name for each member and I call "myMember.State.name" - I'll get the name of the state but it costs me an extra query everytime I call that - even though some of the states may be the same.

Is there a way somehow keep some sort of cache of state name from the db for access?


Question about file types

I have a reporting services project and when I look at the file system I see my .rdl files which I expect and I also see .data files for each rdl file.  What is the purpose of the .data files and do they need to be in source control as well as the rdl files

Add Service reference not updaing the client apps web.config file in .Net Framework 4.0


Hi Team

I am doing some experiments with WCF on .Net 4.0. I have created a service in 4.0 and add a new empty web application to consume my Service. When i added a service reference from the IDE, i can see the web.config file is not updated with the Servcie end points. How do i solve this issue?

My web.config in the client looks like this after adding the service reference.

Is the executable file generated by compiler a Managed code or Unmanaged code ?



when we compile our vb.net or c#.net code (say in a simple console application) then in bin\Debug folder a .exe file is created.Is that a managed code? when i directly execute this file,will this target CLR ? or will it directly run on OS ?

Why there is ConsoleApplication1.vshost.exe.manifest files created in that folder ?

What is .pdb file ?

That executable file is also created in obj\Debug folder .Why ?

Can not add assembly reference and using .dll file from Visual studio 2008 and 2010 Type 'LibraryN


Hi all,

Please tell me the way to solved my problem to looking for a long time.

My System Info:

OS: Windows 7 - Ultimate - 64bit

VS: Visual Studio 2008 - Professional (and problem with my VS2010 installed)


I have a small project and build it to library .dll file with some function util.

From an other website (with diffirence solution). I added reference the .dll before to website.

In website, I declaration to using the function in library (dll file before). But I found error:  Error 1 Type 'LibraryName' is not defined.

And in VS2010 the problem is same.

But, run website on an other computer, it work normally.

Thanks and Best regards.

Reference Dynamically Created JavaScript File


I would like to dynamically create, and reference, entirely different JavaScript files based on an id.  This is the route I've taken, and it appears to be working.  I guess I'm just curious if there's something obvious I'm missing, or if anybody has a better idea.

On the web page a reference points to what i'm calling a "javascript handler". 

<script type="text/javascript" src="http://localhost:50869/JsHandler.ashx?Id=0001"></script>


I may eventually experiment with routing to make the reference look like this...

<script type="text/javascript" src="http://localhost:50869/js/0001"></script>


But that's besides the point.  Please keep in mind, the following example is very simple and could be accomplished in easier ways.  Its more of a proof of concept, and I will be creating completely different JS files, from begining to end, depending on the Id passed in.

So yeah basically the logic in my JavaScript handler looks like this

var Id = context.Request["Id"];
            using (var sr = new StreamReader("/Forms/0001.js"))
                var chingy = E

Intellisense / class reference not working in MembershipProvider derived class file in App_Code fold



I am new to ASP.NET and may be biting off more than I can chew, but I figure if I jump in the deep end I may learn more.

Can somebody tell me why the Visual Studio intellisense is not working in a newly created class file inside the App_Code folder?

I presume that System.Web is not being referenced from the App_Code folder correctly for some reason, because as soon as I type "using System.Web", everything is fine and then stops when I want to add ".Security" (no dropdown). I think this has an influence on the fact that the inherited MembershipProvider in my code is not highlighted/referenced and I cannot use the "Implement Abstract Class" option.

If I create a new class file in the root folder of my website, everything works fine. I have even tried to delete and recreate the file in my App_Code and it still did not work. I also tried to copy the file from my App_Code folder to the root and it still did not work. My code is as follows:


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;

namespace PodcastManager
    public class
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend