나는 시도하고이 DLL에있는 함수를 찾기 위해 DLL 내보내기 뷰어를 사용하고, 나는 기능의 목록을 발견하고 여기있다 : 문제는 C#에서 내DLL에서이 함수를 원래 호출하는 방법은 무엇입니까?
public: int __thiscall CSTVdsDisk::GetPartitionCount(void);
내가 할 수 없습니다입니다
[DllImport("Some.dll",
ExactSpelling = true,
EntryPoint = "GetPartitionCount",
CallingConvention = CallingConvention.StdCall,
SetLastError = true)]
나 :
[DllImport("Some.dll",
ExactSpelling = true,
EntryPoint = "CSTVdsDisk::GetPartitionCount",
CallingConvention = CallingConvention.StdCall,
SetLastError = true)]
private static extern int GetPartitionSize();
그들은 모두 실패 중 하나를 사용하여 함수를 호출합니다. 내가 잘못하고있는 것이 있습니까? 누구든지 도와 줄 수 있습니까? 감사!
이것을 시도해 볼 수 있습니까? [DllImport ("Some.dll", CharSet = CharSet.Auto, SetLastError = true)] private static extern int GetPartitionSize(); –
지금 찾을 수없는 오류가 발생했습니다. –