관리되는 클래스에서 사용하려는 관리되지 않는 라이브러리가 있습니다. 함수의 인터페이스는 다음과 같습니다 C++/CLI에서 관리되는 VS. 관리되지 않는 단락
GetProgress(short* value);
그래서 내 관리되는 클래스에 쓴 :
short val = 0;
GetProgress(&val);
내가 가지고 다음과 같은 오류 :
Error C2664: 'GetProgress' : cannot convert parameter 1 from 'cli::interior_ptr' in 'short *' with [ Type=short ]
나는 this topic을 읽고, 내가 변경 내 코드 입력 :
short val = 0;
pin_ptr<short*> pVal = &val;
GetProgress(pVal);
그리고 이전의 오류에 더하여
Error C2440: 'initialisation' : cannot convert from 'short *' to 'cli::pin_ptr' with [ Type=short * ]
어떻게 해결할 수 있습니까?
좋습니다. 감사! :) – gregseth