Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // MyClassLib.h
- #pragma once
- #include "MyLegacyStruct.h"
- using namespace System;
- namespace MyClassLib {
- public ref class Class1
- {
- protected:
- MyLegacyStruct* m_internalBuffer;
- public:
- Class1() { }
- ~Class1() { }
- MyLegacyStruct* GetBuffer()
- {
- return m_internalBuffer;
- }
- };
- }
- // MyLegacyStruct.h
- #pragma once
- namespace MyClassLib {
- typedef struct MyLegacyStruct
- {
- unsigned int m_someVar;
- } MyLegacyStruct;
- }
- // ConsoleApp.cpp : main project file.
- #include "stdafx.h"
- #include "MyLegacyStruct.h"
- using namespace System;
- using namespace MyClassLib;
- int main(array<System::String ^> ^args)
- {
- Console::WriteLine(L"Hello World");
- Class1^ c1 = gcnew Class1();
- MyLegacyStruct* s1 = c1->GetBuffer(); // <-- This is a problem
- return 0;
- }
- 2>.ConsoleApp.cpp(14) : error C3767: 'MyClassLib::Class1::GetBuffer': candidate function(s) not accessible
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement