|
-
Mar 12th, 2012, 12:41 AM
#1
Thread Starter
Member
[RESOLVED] how to add dll with bad file name on my codes
This dll file is on my resource file
and basically i use this code to access my resources
Code:
System.IO.File.WriteAllBytes("C:\eYESTRA1N\mydll.dll", My.Resources.mydll)
now my problem is the dll i am using right now isnt mine, its from the exe that i embeded on my program,
and its name cause an error on my codes
this is the dll libgcc_s_dw2-1.dll
and when i put it on my codes the "dw and 2 will have and space between them and the number 1 on its name will also separated automatically...
how to fix it?
this is the error
Code:
System.IO.File.WriteAllBytes("C:\eYESTRA1N\APKINSTALLER\libgcc_s_dw2-1.dll", My.Resources.libgcc_s_dw2 - 1)
thanks in advance
System.IO.File.WriteAllBytes("C:\eYESTRA1N\APKINSTALLER\libgcc_s_dw2-1.dll", My.Resources.libgcc_s_dw2 - 1)
-
Mar 12th, 2012, 12:52 AM
#2
Re: how to add dll with bad file name on my codes
I think that it's a poor idea to embed that file in the first place but, assuming you are, there's no need for a resource to use the same name as the original file. You could name your resource just X if you wanted to. Simply rename the resource to something else. Just "libgcc" would be the first thing that came to my mind. As you can see from your own code, the file name you save it to has no direct connection to the resource name either.
-
Mar 12th, 2012, 01:07 AM
#3
Thread Starter
Member
Re: how to add dll with bad file name on my codes
thanks sir jm for the past reply
yeah you are right i can rename it to anything BUT IT SHOULD BE name which is available also on my resource file
if i rename it to libgcc it will result to an error
so i rename it to a name of my other resource file which is on my resource also and it works 
i should have done that before i post (lazy me)
thanks so much sir
expect me to ask another question again this day, until i finish this project
again thank you
regards
-
Mar 12th, 2012, 01:09 AM
#4
Thread Starter
Member
Re: how to add dll with bad file name on my codes
by the way sir,
you said its poor idea to embed this file
can you give me another good option to do it?
although its working now i just want to ask a better one
regrds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|