473,666 Members | 2,065 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

app won't run after adding an empty class

I'm wriiting an MFC C++ application which uses a third party C# .NET API via
a DLL. The app runs fine. If I add a new, empty C++ class, and compile/link
it refuses to run, complaining about not being able to load an assembly.
Removing the class from the project and doing a rebuild all gets it working
again. Its as though I've hit a threshold? Any ideas?

- I'm using Visual Studio 2005
- Although my code is MFC native C++, the third party API DLL uses .NET and
their code is written in C#; my app has the /clr flag enabled
- Since it runs before adding the new class, I don't think its a
config/settings issue; the new class isn't even used, its just added to the
project and is an empty class with only a constructor/destructor
- in the past we've had similar issues which required using the delay load
DLL options; I tried listing the third party API DLL and the DLLs it uses as
delay loaded and this didn't help
- I also setup DEVPATH to point to my project directory where the exe and
DLLs are

I don't know, but suspect that I've hit some sort of threshold which is
preventing load/initialization from working. The project isn't all that
large. I've tried adding a dialog class, an empty C++ class, and a C++ class
with some code in it.

Note that the failure to initialize occurs before the app code even runs,
i.e. its in the lower level startup code and complains that it can't load a
needed assembly.

Any ideas?

Nov 20 '06 #1
2 1254
I'm wriiting an MFC C++ application which uses a third party C# .NET API via
a DLL. The app runs fine. If I add a new, empty C++ class, and compile/link
it refuses to run, complaining about not being able to load an assembly.
Removing the class from the project and doing a rebuild all gets it working
again. Its as though I've hit a threshold? Any ideas?
Which assembly could not be loaded?
Have you tried Fusion log to see why it could not be loaded?

http://www.grimes.demon.co.uk/workshops/fusWSFive.htm

--
Oleg
[VC++ MVP http://www.debuginfo.com/]


Nov 21 '06 #2
>I'm wriiting an MFC C++ application which uses a third party C# .NET API via
>a DLL. The app runs fine. If I add a new, empty C++ class, and compile/link
it refuses to run, complaining about not being able to load an assembly.
What's the exact error message you get?
Do you get any more information if you try to debug it in the IDE
(output window)?

It seems so unlikely that adding/removing an empty class that's not
being used would make any difference - are you telling us the whole
story?

Dave
Nov 21 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2371
by: lawrence | last post by:
I've the form you see below, which is supposed to upload an image. I expect the image name as a var to be $uploadedFile. In the receiving function, I've this code: global $uploadedFile, $uploadedFile_size, $uploadedFile_name; echo "here is the file name: $uploadedFile, $uploadedFile_size, $uploadedFile_name; <hr> "; $uploadedFile_name = $formatTextObject->processFileName($uploadedFile_name); $uploadedFile_name =...
9
5482
by: James Geurts | last post by:
Hey all... I posted this in the vs.net ide group too, but people are not answering, so I figured that it might be more appropriate here. I'm not sure if I'm adding a designer to my code properly. I'm only adding it to the tree node, where each custom tree node is then added to a normal tree control I'm trying to get an add-in to interact with the property window in VS.Net. Basically, I created a tool window containing a custom tree...
0
2991
by: Adam J. Schaff | last post by:
Hello. I have a custom collection that implements IBindingList (allownew and allowremove are both true). I have bound it to a datagrid. I have add and remove buttons on the screen. I want to implement those buttons, but I'm not sure what the code should look like. I tried what I thought was obvious code: myCollection.AddNew() and
6
17143
by: Dennis | last post by:
I am trying to use ZLIB.Dll in a VB.Net project but keep getting an error message that says it can't load the DLL. I tried to add a reference using "Project-Add Reference" but get the error message stating it's not a valid Com component. I'm new to vb.net so any help would be appreciated. Thanks. -- Dennis in Houston
5
4590
by: Water Cooler v2 | last post by:
I know that we can add a single name value entry in app.config or web.config in the configuration/configSettings/appSettings section like so: <add key="key" value="value" /> Question: I want to add a dictionary of name-value pairs. In other words, instead of a single name-value, I want to add a name-value collection in there. I could do this:
0
1135
by: Matthew87 | last post by:
Hi all I'm having a bit of trouble completeing my coursework basically so far i have created Citenary class with support methods for a private array. The problem is i can add objects to the array through a instance of the class in the main form but im having trouble retreving the data from a combobox. I have the values Name, Passport Number, Issuedby and Expires that are added to the array. The value name is passed to the combobox when a...
1
1996
by: Landry, Eric | last post by:
I am posting this for a coworker. -------------------------------------------------------- The issue i'm having is after i enter all my data into my gridview's textboxes and dropdownlists the data wont stick. My object data source dumps to a class but after the update the grid should read from the class as well. After the update button is clicked all the data passes through the class like it should and doesn't throw any errors. After...
1
2480
Dormilich
by: Dormilich | last post by:
Hi, I'm running into a problem with the <xsl:processing-instruction> element (Sablotron). purpose: I generate a xhtml fragment from a xml file via xslt. This is printed (echo) to the output (i.e. all xml/xsl processing is done on the server). This is fine, as long as the output contains only xhtml. problem: one special page uses AJAX, where the result is taken from a MySQL database. To make it easier writing copy, I (sucessfully) use...
9
6122
by: Dhiru1009 | last post by:
Hi guys, I am trying to build a user registration form using PHP and MYSQL but encountring a problem. When I click on submit with empty fields it adds records to database also it doesn't matter what information I put it always add records to database when I click on submit. What can I do to make sure user will not be able to add records to database until he enters the right information? I am posting my code for you guys to have a look...
0
8444
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8869
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8781
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8551
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8639
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7386
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
2771
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1775
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.