visual c++ - C++ calling a ref-class function (mixed code) -
i have application (cli) references mixed-dll. dll implements "ref" class static functions.
here (partial) code ref-class
public ref class aaa { public: static bool write(system::string^ sz); // not accessible!!! public: static bool tracerect(const crect& rc); }; within exe, in c++ code, i'm trying call both functions:
// works aaa::write("hello"); // doesn't !!! crect rc(0, 0, 12, 234); aaa::tracerect(rc); how can access second function?
it's because native types (in case, crect) treated private default. so, while method accessible, parameter type rc not accessible. can make accessible using make_public: http://msdn.microsoft.com/en-us/library/ms235607.aspx
search c3767 , make_public , you'll find plenty of other info on topic.
Comments
Post a Comment