how to specify the path of a .dll in c ++ to import it in c #

0
[DllImport("Cannabis.dll", CharSet = CharSet.Ansi)]
internal static extern void Entrenado_Casificador_SVM(string imagePath);

for example: what path does Cannabis.dll have? How to change it?

    
asked by Oscar Oliva 19.02.2018 в 17:22
source

1 answer

0

Hi, I'll tell you how to do the assembly search in DllImport .

  • The directory from which the application has been loaded.
  • The system directory. The GetSystemDirectory function is used to recover the path of this directory.
  • The Windows directory. The GetWindowsDirectory function is used to recover the path of this directory.
  • The current directory.
  • The directories that are indicated in the environment variable PATH .
  • answered by 22.02.2018 в 16:11