Thursday, 6 June 2013

Call C Function On Vb.net

Call C Dll File Using Vb.net 

Here I have some steps for calling a functions of C language in vb.net:
1.Write a program and create a dll  file for it.
2.Open the VS2010 create a project and add a module in module write the program
    as shown  in figure:
3.You can  able to access the required function in this program the Dll name is "ishan.dll" and
    function name which we want to access, is 'add'.

Note:-
   After creating the dll file we can keep it in three place
    a.Past here "C:\Windows\System32".
    b.Keep in 'bin\Debug' folder of project directory Like:
       "C:\Users\Computer_name\Documents\Visual Studio 2010\
          Projects\WindowsAppForDll\WindowsAppForDll\bin\Debug".
   c.The third way is set the environment path ,give the path value where you store the file.
      path is separated by ';'.

No comments:

Post a Comment