Global DLL for all app components
-
I would like to use a global DLL that could be called by any program in the app. In VB6, all I had to do is create a code module which inited the DLL variables, some of which come from the database. I am migrating this app with new features to C# and have been unsuccessful in getting my ALLINFO.DLL to be availabe. Can anyone help me with this? Thanks David
-
I would like to use a global DLL that could be called by any program in the app. In VB6, all I had to do is create a code module which inited the DLL variables, some of which come from the database. I am migrating this app with new features to C# and have been unsuccessful in getting my ALLINFO.DLL to be availabe. Can anyone help me with this? Thanks David
Hello
drdavef wrote:
called by any program in the app
What is a program?? What is an app??!!:~
drdavef wrote:
and have been unsuccessful in getting my ALLINFO.DLL to be availabe
Why? What is your problem exactly?? In C# you make a new project for your dll, and in other projects in the solution, you make a reference by project to the dll -look for the project tab in the reference dialog-. Regards:rose:
-
Hello
drdavef wrote:
called by any program in the app
What is a program?? What is an app??!!:~
drdavef wrote:
and have been unsuccessful in getting my ALLINFO.DLL to be availabe
Why? What is your problem exactly?? In C# you make a new project for your dll, and in other projects in the solution, you make a reference by project to the dll -look for the project tab in the reference dialog-. Regards:rose:
What i mean by a program is an executable that will do a variety of tasks. When I say app, I mean the entire application, which consists of 15-25 programs and a number of DLLs. I want a DLL, that I call AppInfo, which contains general info that all programs need access to, such as SchoolYear. The application is involved with schools and school services. One thing it tracks is the type of student involved in the school year, is the student a Senior, Undergrad, or Postgrad (college). This is a toggle that the user of a given program will select to determine functionality for each type of student. This AppInfo DLL also contains functions specific for client specifications. For example, a rounding function that always rounds to the next nickle (no pennies wanted :)). I am looking for a way to create this DLL such that initialization is very simple. I used to simply call the AppInfo.Init from Main to set it up. I have not found a way to create a DLL that is available to all program functions. A program may consist of many forms and support DLLs. Thanks for any support David
-
What i mean by a program is an executable that will do a variety of tasks. When I say app, I mean the entire application, which consists of 15-25 programs and a number of DLLs. I want a DLL, that I call AppInfo, which contains general info that all programs need access to, such as SchoolYear. The application is involved with schools and school services. One thing it tracks is the type of student involved in the school year, is the student a Senior, Undergrad, or Postgrad (college). This is a toggle that the user of a given program will select to determine functionality for each type of student. This AppInfo DLL also contains functions specific for client specifications. For example, a rounding function that always rounds to the next nickle (no pennies wanted :)). I am looking for a way to create this DLL such that initialization is very simple. I used to simply call the AppInfo.Init from Main to set it up. I have not found a way to create a DLL that is available to all program functions. A program may consist of many forms and support DLLs. Thanks for any support David
Hello I've posted the way that is used to make dlls in C# in my previous post! Is that what you want?
drdavef wrote:
I want a DLL, that I call AppInfo, which contains general info that all programs need access to, such as SchoolYear
I thought SchoolYear should be stored as a variable, and since you are a programmer you know about scope. How would you store a variable in another module?!! Even in VB I don't think that's possible!!
drdavef wrote:
I am looking for a way to create this DLL such that initialization is very simple.
Well, I haven't worked much in VB, but I've spent a lot of time in C# and I've never heard of Dll init!! dlls are referenced, not intitialized, specially that you are writting these dlls. I have a feeling somehow I still don't get you!! Please forgive me for that:) Another approach to store shared info in an executable is to make it as a win service. I don't think that's what you want, is it?!! Anyway. The way I know it, you want dll it's simple. Make a dll project and reference to it in other projects. You want shared info, store them in a file -careful here for read/write operations- or use a database!! If you managed to store variables in a dll, and share it with other programs, I beg you to write an article about it.I'll be dying to read it:-D Regards:rose: