C++ interface vs D and com

Mike Parker via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jul 13 00:15:20 PDT 2016


On Wednesday, 13 July 2016 at 06:44:36 UTC, Adam Sansier wrote:

> Regardless of what you think, I can prove that the code won't 
> work when it is marked extern(Windows) and works when it is 
> marked extern (C++)... so what you should be asking yourself is 
> why it is doing that rather than assuming I'm making it up or 
> doing something wrong.

I don't have your code in front of me, nor do I have your system 
configuration, and can only go on what I know from my own 
experience. The example I posted works for me. In the past, I 
have successfully used DirectX bindings with D that were not 
marked extern(C++). So I *know* that it does work as intended, at 
least the times I've tried it. That's *my* experience. If it 
isn't working for you, then there must be a reason. I'm not here 
to challenge your story or to accuse you of making things up. I'm 
trying to help you get to the bottom of your problem, i.e. I *am* 
asking myself why you are having these issues.

So you say the sample code doesn't work for you. Fine. That's one 
of the reasons I posted it, so we can establish if it does or 
does not. It would help even more if you could post a minimal 
example of your own code that other people can attempt to 
compile, run and/or debug. Otherwise, the only thing anyone *can* 
do is make guesses and assumptions, and then we get nowhere.


More information about the Digitalmars-d-learn mailing list