Que. about embedded resources

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • akshaycjoshi
    New Member
    • Jan 2007
    • 153

    Que. about embedded resources

    I have embedded on mdb file in my application and my application, during it's life creates some copies of it with different names.

    Assembly.GetCal lingAssembly(). GetManifestReso urceStream("cal l_monitoring_st udio.Resources. gextension.mdb" ).

    gextension stands for general extension, the same file will be copied as extension1,exte nsion2 ...

    Now the above function returns a stream.
    How would i create copies of it ?
    Last edited by akshaycjoshi; Jan 21 '09, 04:08 AM. Reason: typo
  • akshaycjoshi
    New Member
    • Jan 2007
    • 153

    #2
    Code:
    Assembly.GetCallingAssembly().GetManifestResourceS tream("call_monitoring_studio.Resources.gextension .mdb")
    is returning a nul value, though i can see it in IL disassembler.
    I can see it in IL Disassembler
    Code:
     
    call_monitoring_studio.Resources.gextension .mdb
    {
    //offset
    }
    I have set the build action to embedded resource.

    Any clues ?
    Last edited by Frinavale; Jan 21 '09, 03:52 PM. Reason: added [code] tags

    Comment

    • akshaycjoshi
      New Member
      • Jan 2007
      • 153

      #3
      I dont know where I am wrong.
      Throughing exception Object reference not set to an instance of an object.
      It's killing me !

      see the screenshot now.
      I am just MessageBoxing the names of resources.
      See the screenshot below.

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        There is a resource class that should be used for handling embeded resources.
        Did you add this MDB to the Resources section of the project, or just set it's build-action to embeded resource?

        Comment

        • akshaycjoshi
          New Member
          • Jan 2007
          • 153

          #5
          Just clicked add new item and selected the mdb file.
          And set it's build-action to embeded resource.

          Comment

          • Plater
            Recognized Expert Expert
            • Apr 2007
            • 7872

            #6
            Try adding it to the Resources section of the project, it auto generates code for accessing the resources.
            It might give you an easier method for retrieving it

            Comment

            • akshaycjoshi
              New Member
              • Jan 2007
              • 153

              #7
              I had to change the name to "Call_monitorin g_studio.gexten sion.mdb"
              It's working now.
              Thanks anyways.

              Comment

              Working...