473,395 Members | 1,437 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Mixed mode assembly and __declspec(novtable)

Hi,

Introduction
*****************
I am writing a mixed mode assembly, this assembly is used to expose
performance critical functionality implemented through an unmanaged .lib file
to the managed world.

The problem
*****************
when adding to one of the unmanaged classes __declspec(novtable) the managed
linker pours a collection of errors:
DBAccess error LNK2020: unresolved token (0A000019) exception.__ctor
DBAccess error LNK2020: unresolved token (0A000035) exception.__dtor
DBAccess error LNK2020: unresolved token (0A000037) memmove
DBAccess error LNK2020: unresolved token (0A000039) atexit
....
When removing the '__declspec(novtable)' the linking succeed.

My Assumption
*****************
The managed linker adds the unmanaged classes definition to the managed
meta-data section ( although it shouldn't ), as such, the added ( unmanaged )
classes should be compatible with the CLI, this require each of the classes
to have a virtual table ( so interop and so could be enabled ), adding
'__declspec(novtable)' prevents the VTable from being created and causes the
unmanaged class to be non CLI compliant.

The questions:
******************
A. Does my assumption is true?
B. is there any conventional way of preventing the unmanaged classes
metadata from being generated?
C. What else could I do to prevent this error from happening?

--
Nadav
http://www.ddevel.com
Nov 17 '05 #1
0 1177

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

Similar topics

35
by: Gabriel Zachmann | last post by:
Is there any generic way to use C++ libraries from within Python. I seem to recall that there are tools to generate wrappers for C-libraries semi-automatically. But those were still way too...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...

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.