Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Global DLL for all app components

Global DLL for all app components

Scheduled Pinned Locked Moved C#
csharpdatabasehelpquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    drdavef
    wrote on last edited by
    #1

    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

    N 1 Reply Last reply
    0
    • D drdavef

      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

      N Offline
      N Offline
      Nader Elshehabi
      wrote on last edited by
      #2

      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:

      D 1 Reply Last reply
      0
      • N Nader Elshehabi

        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:

        D Offline
        D Offline
        drdavef
        wrote on last edited by
        #3

        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

        N 1 Reply Last reply
        0
        • D drdavef

          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

          N Offline
          N Offline
          Nader Elshehabi
          wrote on last edited by
          #4

          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:

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups