Modify Posted January 21, 2016 Posted January 21, 2016 I'm add new resource section, anyone help me. how to get resource in bytes ?
crystalboy Posted January 21, 2016 Posted January 21, 2016 You mean that you have a resource in your project resources and you want to read it as bytes? If yes here you are: //xxxxx is your resource name byte[] youByteArray = Properties.Resources.xxxxx Hope it helps
cob_258 Posted April 8, 2016 Posted April 8, 2016 use FindResource, LoadResource and SizeofResource to obtain pointer and the size of resourcehttp://www.pinvoke.net/default.aspx/kernel32/FindResource.html these APIs need a pointer to the PE file, load it with LoadLibraryEx with flag set to LOAD_LIBRARY_AS_IMAGE_RESOURCE http://www.pinvoke.net/default.aspx/kernel32.loadlibraryex
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now