Posted January 21, 20169 yr I'm add new resource section, anyone help me. how to get resource in bytes ?
January 21, 20169 yr 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
April 8, 20169 yr 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
Create an account or sign in to comment