By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,852 Members | 2,116 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,852 IT Pros & Developers. It's quick & easy.

Que. about embedded resources

100+
P: 153
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
Share this Question
Share on Google+
6 Replies


100+
P: 153
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

100+
P: 153
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
Expert 5K+
P: 7,872
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

100+
P: 153
Just clicked add new item and selected the mdb file.
And set it's build-action to embeded resource.
Jan 21 '09 #5

Plater
Expert 5K+
P: 7,872
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

100+
P: 153
I had to change the name to "Call_monitoring_studio.gextension.mdb"
It's working now.
Thanks anyways.
Jan 22 '09 #7

Post your reply

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