Calling mangled c++ function from non-mangled C++ function

Hi,
  I am writing a dll for C# application. My dll functions calls third party 
dll in which some functions are mangled and some non-mangled fucntions. But 
when I crate my dll with namespace mangling disable I got the linked error' 
Unresolved external symbols' for the functions which are mangled in thrid 
party dll. I know what's the issue. But If I eable the namespace mangling, it 
works fine. All these i know very well. So my question  Is it possible to 
call a namespace mangled function from a dll in which namespace mangling is 
disabled?

Any comment wuld be appreciated....

Thanks in advance.......
0
SUSHIL (1)
12/23/2005 11:46:02 AM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
514 Views

Similar Articles

[PageSpeed] 40

The header file must declare the functions as 

extern "C" function(etc);

or the compiler generating the references will still mangle the names.  Then the .cpp file
must declare them as

extern "C" function(etc.) {...body here...}

Note that ;you can't have overloaded methods when you do this.
				joe

On Fri, 23 Dec 2005 03:46:02 -0800, Sushil <Sushil@discussions.microsoft.com> wrote:

>Hi,
>  I am writing a dll for C# application. My dll functions calls third party 
>dll in which some functions are mangled and some non-mangled fucntions. But 
>when I crate my dll with namespace mangling disable I got the linked error' 
>Unresolved external symbols' for the functions which are mangled in thrid 
>party dll. I know what's the issue. But If I eable the namespace mangling, it 
>works fine. All these i know very well. So my question  Is it possible to 
>call a namespace mangled function from a dll in which namespace mangling is 
>disabled?
>
>Any comment wuld be appreciated....
>
>Thanks in advance.......
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
12/23/2005 6:34:35 PM
Reply:

Similar Artilces:

Call in?
Do new owners of Office X have to call up Microsoft to register their copy? If yes, what's the number? thanks. Ming <asdf@asdf.com> wrote: > Do new owners of Office X have to call up Microsoft to register their > copy? If yes, what's the number? thanks. Nope. We're not using Windoze :->>> This version does not require activation. Corentin -- - Mac:MS MVP (Francophone) - (MS) MVP: http://support.microsoft.com/default.aspx?ln=FR&scid=fh;FR;mvp Newsgroups produits MS: http://support.microsoft.com/newsgroups/?ln=FR ...

Covered Call Options
Hello all, I do I go about dealing with a covered call transaction in Microsoft Money 2007 Premium? Currently what I am doing is inputing the option symbol, and choosing the transaction "Sell to Open" then when I go to expire the option I try to do a Sell to Close. However it does not seem to work? Also what happens if instead of expired I has the position assigned? how would I account for that? Thank you. Shhhh In microsoft.public.money, Shhhh wrote: > >I do I go about dealing with a covered call transaction in Microsoft >Money 2007 Premium? Currently what I am doing is...

Ctrl+C (copy) doesn't work within GP
I have a user that when using Ctrl+C to copy in GP 9 doesn't work. You can go to edit>>copy and it will, but the hotkey/shortcut doesn't work. In other programs such as Word it works fine. In a test the machine was able to copy info from Word and Paste into GP by using the hotkeys, but another attempt to copy/paste within GP it failed to copy and just pasted what was previously copied from Word. Any ideas? I have run into this a few times but my issue was that if you try to paste some text into a field in GP that is more than the maximum allowed, then it just does not...

Call center tracking and reporting
Anyone use CRM 4.0 for call tracking? Our Sales/Marketing is set up. Now I need to decide how to most efficiently customize CRM 4.0 for our company's call tracking portion. Can someone send me a link to information? thanks ...

telephone calls
when placing a telephone call using outlook, everything works fine except I can't hear the person i am talking to. They can hear me find. When I use a telephone program not associated with outlook every thing works great. can someone help ...

MAXA worksheet function
The functions MAXA and MINA appeared when I upgraded to Excel 2003. When I use them in a worksheet & try to save the result, I receive a message saying that these functions cannot be converted to the file format that I am using. The file format that I am using gives Excel 97, 2003, NT, 5.0 and 95. What am I doing wrong? Thanks! IIRC, MINA and MAXA appeared in XL97, so saving to XL5/95 compatible format won't work. Is there any reason you need to save in that format? It makes your workbook twice the size of saving it as an XL workbook (e.g., 97/03 format) since it saves both for...

Calling Macro
Hi All, I have macro like this sub unique() '''''''' '''''''' Counter_item = 0 For Each Item In nodups counter_item = counter_item + 1 bic_var = Item Call Ps_Match Next Item end sub I have another macro Sub Ps_Match() ''''' ''''' If counter_item <= 1 Then call another_macro() end if end sub In the first macro i am declaring counter_item equals to 1. In my second macro i need to call that number. At the to of the module put: Public Counter_I...

change screen resolution in C#
Hi all, I found the following code on the web. It says it is for C#. Problem is that it seems to be for ASP (it uses the Page_Load procedure) and I need it for a regular Windows form. can anyone suggest how it may be modified for my needs. Thanks ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Page_Load Code Screen Srn = Screen.PrimaryScreen; tempHeight = Srn.Bounds.Width; tempWidth = Srn.Bounds.Height; Page.ClientScript.RegisterStartupScript(this.GetType(), "Error", "<script type=\"text/javascript\">alert('" + &qu...

Plotting functions
I am brand new to using the charting feature of Exel and am having trouble with what should be a simple operation. I want to create a graph of y=f(x) -- say for simplicity's sake f(x) = x^2. I have in column A, for x, the numbers -10 through +10 and in column B =A^2. Column B shows the correct values but have not been able to create the pretty graph I know so well. Would someone give me a bit of help here? Thank you very much. Where do you get stuck? Select the data range, click the Chart Wizard. In step 1 select the XY Scatter chart. That should give you what you want. ...

Disabling automatic send function
I used to be able to have messages in my Outbox sit there till I hit send/receive by checking "disable send/receive" on the tools menu. For some reason, disabling send/receive now only disables the automatic receive function. My emails in my Outbox are sent automatically, as soon as they hit the outbox. I send monthly emails to my contacts thru the mail merge program in Word. I then go to my Outbox to attach a document to them. It used to be that if I disabled the automatic send/receive function in the tools menu, the messages in my outbox would sit there so I could add ...

Excel Calculator always requires an = before a math function, can be turned off setting?
I often use excel as a fancy calculator. But often I forget to start the calculator with the = sign. So if I want to add 44 + 66, I forget to type in an = sign first, an it gives me an error message. Is there a setting to turn that off, so I can type in 44 + 66 and it gives me an answer. I always have Excel running and it's also my calculator. I never use use a calculator anymore! The answer to your question is no. The equal sign tells Excel that you're entering a formula that needs to be calculated. You can use a plus sign (+) instead of the equal sign (=) if you alwa...

Need good Visual C++ Winsock2 book recommendations?
I'm currently doing some beginner network programming using CSocket/CAsyncSocket and everything seems to be working fine though i haven't load tested my Client/Server applications on a 'noisy' communication link yet. I'm eager to learn more so i want to move on to using WinSock. Need recommendations on any good WinSock 2 books / references out there. I mostly work in Visual C++ MFC using VStudio 6. Thanks in advance! Kenny Fong "Kenny Fong" <kenny.fong@gmail.com> wrote in message news:eaMYjKAZEHA.3420@TK2MSFTNGP12.phx.gbl... > I'm currently doi...

Workflow -Assembly Call
How does add subtract in the Workflow>> assembly call works. I do understand that ypu can write your own custom workflows, register it and then call them from here, but I am pretty confused with the existing functionality. workflows can call other workflows workflows can also call a method in a .net assembly. ie you could write a piece of code in c# or vb.net and then have the workflow call your code. ======================= John O'Donnell Microsoft CRM MVP http://codegallery.gotdotnet.com/crm "SAM" <SAM@discussions.microsoft.com> wrote in message news:DE...

Comparing two XML files in C#
Hallo everybody, I have the following problem. There are two XML files: first one (FIRST.xml) includes all products definition, the second one (SECOND.xml) is a product instance. What do I need is to compare these two files. Let's see an example: FIRST.xml <Product ID=""> <Element ID=""/> <Element ID=""/> ..... <Element ID=""/> </Product> SECOND.xml <Root> <Products> <Product ID=""> <Module Name=""/> <Module Name="...

open hidden file\folder in MFC or C++
hi i trying to open some new folder in my program , i write this function below , but i dont know how to make the folder "dataFile" to be hidden. bool CPoliceDBApp::changeDirectory() { char buffer[MAXSIZE]; if(!_getcwd(buffer,MAXSIZE)) //get now active directory return false; CString path=buffer; path+="\\dataFile"; //declare new directory path _mkdir(path); //build new folder in path if(_chdir(path)) //change active directory return false; return true; } Use SetFileAttributes with FILE_ATTRIBUTE_HIDDEN -- Regards, Nish [VC++ M...

Async calls to WebService in MFC
Hey guys, I use a webservice over the net which is scripted in VB.Net. This web service receives a username and a password and returns a string structure with multiples infos. If the string is empty, I had the wrong username and/or password. Pretty simple isn't? Ok now the problem is a bit more complex. I'm using an MFC client to connect to these web services, and since they're on the internet, there's a delay between sending the data and receiving an answer. I don't know really how I can tell me client to "wait for the string". The wrapper MFC created for the w...

Invalid procedure call or argument?
Hello All This is a re-post of a problem I posted a while ago, but to which I got no suggestions: hopefully I'll be more lucky this time!? I have the following code in a Private Sub: If InStr([ResponseXML], "element") > 0 Then errorfield = "Invalid " & Mid([ResponseXML], InStr([ResponseXML], "element"), InStr(InStr(InStr([ResponseXML], "element"), [ResponseXML], "'") + 1, [ResponseXML], "'") - InStr([ResponseXML], "element") + 1) Else .... Most of the time this works fine, but for some...

Borland C++ Builder
I use to use Borland C++ builder. What is the closest equivelent in the VC++.Net suite? I basically want drag-n-drop UI construction with automatic generation of code stubs for UI events callbacks Will using the resource editor with an MFC project get me close Thanks ...

Where to call SetWindowPos
In my SDI, can I place the following in CMainFrame::OnCreate( )? Or is there a better place? // ensure window opens on top when called by other applications, esp. the installer SetWindowPos(&wndTopMost, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); Note that wndTopMost really means it is always on top and can never have another app come on top of it. So wndTopMost is often a poor choice. SetWindowPos would not be the best choice here; SetForegroundWindow would be better. joe On Sat, 11 Aug 2007 17:04:00 -0400, "SteveR" <srussell@removethisinnernet.net> wrote: >...

Unable to get DxgkDdiRecommendFunctionalVidPn call in windows 7
I am trying to add an initial vidpn topology by implementing the DxgkDdiRecommendFunctionalVidPn call in the WDDM miniport driver. But starting from windows 7 i am unable to get the DxgkDdiRecommendFunctionalVidPn function call from dxgkrnl.After searching through the MSDN documentation i found out that the function is deprecated starting from windows 7. msdn link: http://msdn.microsoft.com/en-us/library/ee220395.aspx According to msdn "On a computer running Windows 7, the display mode manager (DMM) determines an appropriate VidPN topology to apply using VidPN history d...

Trial Project Server 2007 Functionality
Hi, I want to install a trial version of Project Server 2007. I can't find anywhere saying what functionality appears with the trial version. Do I get full functionality after installation or is it limited in any way. If it is limited, I would like to know what I get in order to make a full and proper evaluation. Thanks for your help. Fahim Microsoft trial software is full-featured. In order to evaluate all of the capability of Project Server, you'll need to use companion technologies like SQL Server 2005 or 2008, Windows Server, and Project Professional -- ...

Default Name for C Drive
I just had to install and new hard drive and upgrade my memory on an old HP laptop. my hard drive was renamed as I was cleaning the keyboard and I can not remember what it was called before it was renamed gibberish. what is the default name for the C: Drive? is it local disk? Drive C:? Will renaming this drive from soemthing other than the default name affect the operability of my programs that were installed under the old name? thank you! helloprilly wrote: > I just had to install and new hard drive and upgrade my memory on > an old HP laptop. my hard drive was r...

Help please, what Function?
if i have sheets with data listed like this:- C E G I K M O Pressure Names of Officers Pay Signature of Hours (see note 1) Total listed for overtime number Officer Cause From To H:M P11 SURNAME. 1 4534 05:00 06:00 01:00 B13 SURNAME. 1 4534 06:30 07:00 00:30 B15 SURNAME. 2 2475 07:00 07:30 00:30 B16 SURNAME. 2 2475 07:30 08:00 00:30 G11 SURNAME. 3 9341 08:00 08:30 00:30 B33 SURNAME. 4 12331 08:30 09:00 00:30 B17 SURNAME. 5 23211 09:00 09:30 00:30 ...

Call out to detect attaching files
Hi All, Is there a method to write a callout to detect file uploads. i knoe that when i file is uploading it's going to annotation entity. i have written preupdate and postupdate methods to track this. but when i add a file the event doesn't get fired and doesn't indicate the changes. later if i do a change to the note then i'm able to see the changes. can anyone tell me the reason... Thanks, Charith On Aug 7, 2:34 am, Charith <Char...@discussions.microsoft.com> wrote: > Hi All, > > Is there a method to write a callout to detect file uploads. i knoe tha...

World Wide Calling! Unlimited Incoming Calls.
New virtual access anywhere technology lets you call anyone, anywhere in the world, from any phone! Access: http://pt.telextreme.com/743499 ...