1. c++/cli dll에 아래와 같이 선언함 - header

public ref class aaa

{

public : 

aaa();

virtual ~aaa();

// to do 

static IntPtr GetMainScreen();

};


2. c++/cli dll에 아래와 같이 선언함 - cpp

[DllImport("test.dll")]
IntPtr aaa::GetMainScreen() {
IntPtr GetMainScreen();
}

이렇게 해서 dllimport로 native c의 dll 가져다가 c#에서 
가져다 쓰려는데 compile은 되는데 

재귀적이라고, 함수로 인해 스택 오버플로우 발생한다는 워닝 뜨는데

도대체 어떻게 사용해야 합ㄴ까

return이 void인 타입은 에러없이 잘됨요 ㄷㄷ