Managed extension methods getting renamed

  • Thread starter Thread starter Jonathan Brown
  • Start date Start date
J

Jonathan Brown

I'm writing a wrapper around our legacy code using managed extensions.
The problem is that I have a class with a method 'GetUserName()'.
Everything compiles without error and I can reference the generated
..dll from a C# project. The problem is that my function is now named
'GetUserNameA()'. This problem impacts 3 out of 500+ functions and
I'm at wits end trying to figure out what's going on.

Any clues or suggestions?

TIA,
Jonathan
 
Hi Jonathan,
I'm writing a wrapper around our legacy code using managed extensions.
The problem is that I have a class with a method 'GetUserName()'.
Everything compiles without error and I can reference the generated
.dll from a C# project. The problem is that my function is now named
'GetUserNameA()'. This problem impacts 3 out of 500+ functions and
I'm at wits end trying to figure out what's going on.

Your problem is the same one as what I talk about on
http://www.winterdom.com/mcppfaq/archives/000128.html

Just #undef GetUserName
 
That was it. I had a feeling it was something to do with the *A, *W
"massaging" but didn't think to #undef the problematic methods.

Thanks,
Jonathan
 
Back
Top