473,809 Members | 2,633 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

templates in mixed compilands in VC 7.1


We have some large mixed .dlls. The percentage of code that is managed is
small relative to the percentage of native code. We generally want to favor
native callers. But I am struggling with the phenomenon where the mere use
inclusion of headers that contain templates in /CLR compilands seems to result
in methods of template instations ending up getting compiled into IL and
thus penalizing native callers. This is not at all what I want and I'm in
the hunt for a way to make this stop.

I can take a /CLR compiland and aribrarily add an #include <someTemplateHe avyHeader.h>
to it and observe the number of template instantiation methods that are compiled
into IL in my assembly increase dramatically. This seems very odd to me.
Here the compiland clearly doesn't use any information in the header. Afterall
it compiles fine without it. I merely added it to an aribtrary compiland
to see the damage it would cause. Furthermore I included the header file
in a #pragma unmanaged section of the compiland.

Please advise.

I saw googled this but was unable as-of-yet to make the suggested workaround
do any good for me. Maybe I just need more detail on how to do it: http://groups-beta.google.com/group/...80ed99bd0a1184

Bern McCarty
Bentley Systems, Inc
Nov 17 '05 #1
7 1157
Hi Bern,

Currently I am consulting this issus with our VC experts, if we have any
workaround regarding this, I will update you as soon as possible.
Thanks for your understanding!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default...sdn/nospam.asp
&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 17 '05 #2
Hi Bern,

By now I haven't found a practical solution on this issue, it appears we
need to contact a PSS support engineer to work on this problem.

So would you please tell me do you still monitor this issue?
Thanks for your understanding!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default...sdn/nospam.asp
&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 17 '05 #3

Oh yes. I am very eager to find some way to control/work-around this problem.
For the moment I've written a little Python program that processes ildasm
output just to produce the list of global functions compiled into IL. I
check the results into our source so that we can track how this is changing.

But I really need at least a methdology to employ to help pinch this problem
off where I need to. When the mere inclusion of headers makes you go south,
you're in trouble.

Thanks.

-Bern

Hello Gary Chang[MSFT],
Hi Bern,

By now I haven't found a practical solution on this issue, it appears
we need to contact a PSS support engineer to work on this problem.

So would you please tell me do you still monitor this issue?

Thanks for your understanding!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default...esks/msdn/nosp
am.asp
&SD=msdn
This posting is provided "AS IS" with no warranties, and confers no
rights.


Nov 17 '05 #4
Hi Bern,

Considering you just contacted our premier support consulant Peter on this
issue, would you please tell me have you already raise a support case with
him? If not I will create one on our side.
Thanks for your understanding!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default...sdn/nospam.asp
&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 17 '05 #5

Peter is waiting on a test case from me and then he'll open a case on it
for me from his side.

Thanks for looking at this.

-Bern

Hello Gary Chang[MSFT],
Hi Bern,

Considering you just contacted our premier support consulant Peter on
this issue, would you please tell me have you already raise a support
case with him? If not I will create one on our side.

Thanks for your understanding!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default...esks/msdn/nosp
am.asp
&SD=msdn
This posting is provided "AS IS" with no warranties, and confers no
rights.


Nov 17 '05 #6
That's OK Bern, wish you you will get a satisfying workaround from Peter:)
Good Luck!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default...sdn/nospam.asp
&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 17 '05 #7
That's OK Bern, wish you you will get a satisfying workaround from Peter:)
Good Luck!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default...sdn/nospam.asp
&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 17 '05 #8

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

Similar topics

3
2575
by: Perttu Pulkkinen | last post by:
No questions, but just consider if this is useful to you:-) but of course feedback & corrections are welcome. function php_mixed_to_js_value($jsname, $mixed) { if(is_null($mixed)) { return "\n $jsname = null;\n"; } elseif(is_string($mixed)) { return "\n $jsname = '$mixed';\n"; } elseif(is_numeric($mixed) || is_boolean($mixed))
1
2416
by: Mike Grigorov | last post by:
I am using cheetah with jython 2.1 and I have problem generating templates that contain cyrillic text. Some texts are printed OK and others are not. I searched Jython and cheetah projects mailing lists on sourceforge.net as well as these groups and tried some other fixes proposed but without success. I call the template like this: PythonInterpreter pyiInterp = new PythonInterpreter(); pyiInterp.set("textTool",...
9
2406
by: Anthony Heading | last post by:
Hi all, I've often found myself wanting to write code like the example here. Since both MSVC and gcc both reject it, I suspect it is indeed illegal. gcc: no type named `Name' in `class Collection<Animal>' msvc7: error C2039: 'Name' : is not a member of 'Collection<Traits>' But to me it seems pretty unambiguous, so I can't see why it's wrong. Could anybody give me a pointer, either to the standard or the basic
9
2593
by: Edward Diener | last post by:
I received no answers about this the first time I posted, so I will try again. My inability to decipher an MSDN topic may find others who have the same inability and someone who can decipher and explain it. I have some questions about the instructions for creating a mixed mode DLL in the MSDN topic "Converting Managed Extensions for C++ Projects from Pure Intermediate Language to Mixed Mode" in the "Managed Extensions for C++ Reference"....
1
1008
by: Bern McCarty | last post by:
Our project consists of some mixed .dlls and recently we noticed that it had slowed down. When I investigated I figured out that some inlineable methods of a native C++ type were compiled into (not inlined) IL methods. Thus we ended up with the standard two entry points with the native one thunking over to the managed one for native callers. The thing is, 99.9% of the call-sites to these inlineable methods on this native type are from...
8
2325
by: Edward Diener | last post by:
By reuse, I mean a function in an assembly which is called in another assembly. By a mixed-mode function I mean a function whose signature has one or more CLR types and one or more non-CLR types. The problem: I have a number of mixed-mode functions which I want reuse. These functions revolve around converting a CLR String to a C++ std::string or
23
2612
by: Ben Voigt | last post by:
I have a POD type with a private destructor. There are a whole hierarchy of derived POD types, all meant to be freed using a public member function Destroy in the base class. I get warning C4624. I read the description, decided that it's exactly what I want, and ignored the warning. Now I'm trying to inherit using a template. Instead of "destructor could not be generated because a base class destructor is inaccessible", I now have an...
5
2044
by: Zeppe | last post by:
Hi all! my problem is this one, I think that it could be a common one, maybe a pattern, so if you can help me somehow it would be great. Let's suppose I have a class Base class Base { // impl. };
15
2442
by: bruno.desthuilliers | last post by:
On 27 juin, 18:09, "John Salerno" <johnj...@NOSPAMgmail.comwrote: For which definitions of "content" and "logic" ??? The point of mvc is to keep domain logic separated from presentation logic, not to remove logic from presentation (which just couldn't work). Templating systems are for presentation logic. Whether they work by embedding an existing complete programmation language or by providing they're own specialised mini-language (or...
0
9721
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
9603
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10640
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
10376
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
7662
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
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.