Привет, я сейчас работаю над asp. net проектом веб-формы, и я хочу использовать dll для расшифровки пароля из classi c asp и для использования в моем новом проекте, у меня есть только dll. Я не могу добавить в ссылку DLL это говорит A reference to the "....dll" could not be added.Please make sure that the file is accessible and that it is a valid assembly or COM component.
Dll name: SamUtils.dll
вот код на класс c asp
set Cipher = server.createobject("SamUtils.Cipher")
Cipher.KeyString = Session("UserName")
Cipher.MainText = RSPassword("Password")
Cipher.Decrypt
OldPassword = Cipher.MainText
set cipher = nothing
и вот что я начал, но я не знаю, как продолжить, или я на правильном пути
[DllImport(@"C:\Users\nx011116\Documents\projects\WebApps\WebApps\bin\SamUtils.dll", CharSet = CharSet.Unicode)]
public static extern void Cipher();
Код обновления
using System.Runtime.InteropServices;
// Use DllImport to import the Cipher function.
[DllImport("SamUtils.dll")]
public static extern string SamUtilsCipher(string username, string password)
{
//-- i dont know whats next
}
извините, я newb ie надеюсь, Сомоне поможет мне с этим