The following is the VC++ code which I need to convert to c# manually
#include
AC_DECLARE_EXTENSION_MODULE(theArxDLL);
BOOL sptGetAppPath( CString &ostrAppPath )
{
if( ::GetModuleFileName( theArxDLL.ModuleResourceInstance(), ostrAppPath.GetBuffer( _MAX_PATH + 1 ), _MAX_PATH ) != 0)
{
ostrAppPath.ReleaseBuffer();
sptGetPath( ostrAppPath, ostrAppPath );
return TRUE;
}
return FALSE;
}
void sptGetPath( const char *szPathFile, CString &osPath )
{
osPath = szPathFile;
int nPos = osPath.ReverseFind( _T( '\\' ) );
if( nPos >= 0 )
osPath = osPath.Left( nPos );
}
Can any one tell me how to change the above code in c# .Any one please help me. It is urgent.