[DllImport] questen
-
Hello I am new to the DLLImport, and I just cant figure out how it works. I have seen in many other applications they use the DLLImport, an example is: [DllImport("KERNEL32.DLL", EntryPoint="MoveFileW", SetLastError=true, CharSet=CharSet.Unicode, ExactSpelling=true, CallingConvention=CallingConvention.StdCall)] public static extern bool MoveFile(String src, String dst); (found it in the MSDN libary) Then my questen is how you know what to write after the [DLLImport ("KERNEL32.DLL", Is there a place to look it up? or are people just guessing what to write? : Just to let you know, it is not the KERNEL32.DLL specific i want to know about, just about the dll's in general. So if anyone know a place where to find this kind of information I would be happy. Thanks QzRz
-
Hello I am new to the DLLImport, and I just cant figure out how it works. I have seen in many other applications they use the DLLImport, an example is: [DllImport("KERNEL32.DLL", EntryPoint="MoveFileW", SetLastError=true, CharSet=CharSet.Unicode, ExactSpelling=true, CallingConvention=CallingConvention.StdCall)] public static extern bool MoveFile(String src, String dst); (found it in the MSDN libary) Then my questen is how you know what to write after the [DLLImport ("KERNEL32.DLL", Is there a place to look it up? or are people just guessing what to write? : Just to let you know, it is not the KERNEL32.DLL specific i want to know about, just about the dll's in general. So if anyone know a place where to find this kind of information I would be happy. Thanks QzRz
-
Hello I am new to the DLLImport, and I just cant figure out how it works. I have seen in many other applications they use the DLLImport, an example is: [DllImport("KERNEL32.DLL", EntryPoint="MoveFileW", SetLastError=true, CharSet=CharSet.Unicode, ExactSpelling=true, CallingConvention=CallingConvention.StdCall)] public static extern bool MoveFile(String src, String dst); (found it in the MSDN libary) Then my questen is how you know what to write after the [DLLImport ("KERNEL32.DLL", Is there a place to look it up? or are people just guessing what to write? : Just to let you know, it is not the KERNEL32.DLL specific i want to know about, just about the dll's in general. So if anyone know a place where to find this kind of information I would be happy. Thanks QzRz
You can go to pinvoke.net but why are you trying to call an unmanaged function (MoveFile) when you can just use
File.Move()
?
-
You can go to pinvoke.net but why are you trying to call an unmanaged function (MoveFile) when you can just use
File.Move()
?
It was just as an example, as it was the only thing I could find, but the pinvoke.net was exactly what I was looking after. Thanks.