473,394 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Que. about embedded resources

153 100+
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.GetCallingAssembly().GetManifestResourceS tream("call_monitoring_studio.Resources.gextension .mdb").

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

Now the above function returns a stream.
How would i create copies of it ?
Jan 21 '09 #1
6 1597
akshaycjoshi
153 100+
Expand|Select|Wrap|Line Numbers
  1. 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
Expand|Select|Wrap|Line Numbers
  1.  
  2. call_monitoring_studio.Resources.gextension .mdb
  3. {
  4. //offset
  5. }
I have set the build action to embedded resource.

Any clues ?
Jan 21 '09 #2
akshaycjoshi
153 100+
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.

Jan 21 '09 #3
Plater
7,872 Expert 4TB
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?
Jan 21 '09 #4
akshaycjoshi
153 100+
Just clicked add new item and selected the mdb file.
And set it's build-action to embeded resource.
Jan 21 '09 #5
Plater
7,872 Expert 4TB
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
Jan 21 '09 #6
akshaycjoshi
153 100+
I had to change the name to "Call_monitoring_studio.gextension.mdb"
It's working now.
Thanks anyways.
Jan 22 '09 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Philipp Seidel | last post by:
Hi there! I did not know, where this topic fits in, so I put it here. I have a minor problem with embedded resources, which puzzles me quite a lot. I'd be glad if anyone can help me on this: ...
5
by: Drew | last post by:
Assembly asm = Assembly.GetExecutingAssembly(); me = new Bitmap(asm.GetManifestResourceStream("me.gif")); I have used this before without any problem, but now I get: An unhandled exception...
0
by: Chris Schremser | last post by:
I have a question regarding embedded controls in IE. We are looking to replace a small VB ActiveX control with something written in C#. We have written the control and it instantiates correctly...
2
by: Kyle Kaitan | last post by:
I have an assembly (AppResources.dll) which contains a number of embedded resource files. Most of these are key/value pairs of relevant strings; a few are images and sounds; some more are XML...
7
by: Wysiwyg | last post by:
Is there any way to add an embedded resource to a project without copying it to the project's directory? I have shared resources and don't want each project using the images, xml files, etc. to...
4
by: Jon Rista | last post by:
I have a project where I need to create a windows .exe by compiling code and linking in some resources. This program thats being generated is somewhat unconventional, and I'll explain how. I'm...
0
by: Johann Blake | last post by:
I'm having trouble grasping how ASP.NET correctly locates resources. There is plenty of documentation on this subject but some things are not clear at all. In my ASP.NET application, I have...
4
by: Bob Rock | last post by:
Hello, I'd like to programmatically access keys and values of on .resources file embedded in my assembly. I've seen that the assembly class provides the GetManifestResourceStream method .......
8
by: Fred* | last post by:
Hello, I'm using Visual C# 2005 Express. if I create a new "application windows" project and run it (F5), it works well. (an empty window is launched..) as soon as I set the build action to...
2
Frinavale
by: Frinavale | last post by:
I am attempting to use embedded resources in an Ajax Enabled ASP.NET Web Application. I'm using Visual Studio 2008 and VB.NET server side code. The project is called "EmbeddedResources" with the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.