C++ interface problem

Benjamin Thaut via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Apr 27 06:14:20 PDT 2015


On Monday, 27 April 2015 at 13:08:33 UTC, extrawurst wrote:
>
> Don't ask me about the compiler, like stated above I have no 
> control over the binaries, it is proprietary.

Thats bad to start with.

>
> the C++ class basically is:
>
> ```
> class S
> {
> union SteamID_t
> 	{
> 		struct SteamIDComponent_t
> 		{
> 			uint32				m_unAccountID : 32;
> 			unsigned int		m_unAccountInstance : 20;
> 			unsigned int		m_EAccountType : 4;
> 			EUniverse			m_EUniverse : 8;
> 		} m_comp;
>
> 		uint64 m_unAll64Bits;
> 	} m_steamid;
> }
> ```

Where is the fuction declaratiosn for bar? If bar is not virtual 
you can not use a extern(C++) Interface. If bar is non-virtual 
you have to use a extern(C++) class.


More information about the Digitalmars-d-learn mailing list