I'm developing a little app that will be deployed as a .dll file so that anyone can add it to their application build as an "add-on" fetaure. My app uses a sqlserverce .sdf file for storing very some user information. Since this .dll will or could be placed virtually anywhere on some end user's PC, is there a way to setup a connection string to my data.sdf file so no matter where they install their program, it can still be accessed by my .dll file? I'm sure it needs to be in the same folder, but how do I script maybe a current directory?
Thanks,
kevin
Loading
Sam HobbsPosted Sep 5, 2011, 10:27 PM
Mahesh ChandPosted Sep 5, 2011, 8:40 PM
Sam HobbsPosted Sep 5, 2011, 4:37 PM
I am sorry for being picky about terminology. I am sure that some people think it does not make enough of a difference to justify my concern. It might not matter if there was not an easy solution but there is. The reason it is such an issue to me is that so many VB programmers do not realize that VB cannot create a regular DLL and they do not try to understand.
Another way of defining a regular DLL is to say that it is a DLL that DllImport must be used in order to call functions in it. DllImport "provides the information needed to call a function exported from an unmanaged DLL". Note that it says unmanaged. The DllImportAttribute Class documentation says "the Visual Basic compiler emits this attribute when you use the Declare statement" so you might be familiar with DllImport as "Declare".
Kevin DavisPosted Sep 5, 2011, 3:03 PM
I call it a ".dll" because that is the extension given to it.....it is not given the extension..".cll" for a Class Library Link, although I am aware that it is a Class Library project...and according to Microsoft, it is STILL considered a Dynamic Link Library, hence they give it the extension ".DLL"... so when is the appropriate time to call a ".dll" file a .DLL? I'm new to programming, and would really like to know the difference...thank you
Sam HobbsPosted Sep 4, 2011, 2:49 AM
So what is the "little app"? What type of project did you create when you created the project using Visual Studio?