| 发表于:2007-03-16 10:54:082楼 得分:50 |
//假设temp.dll中有名称为resourcename的位图资源,这就可以通过: using system.runtime.interopservices; [dllimport( "kernel32.dll ")] internal static extern intptr loadlibrary(string lplibfilename); private void button1_click(object sender, eventargs ce) { intptr vlibraryhandle = loadlibrary(@ "c:\temp\temp.dll "); picturebox1.image = bitmap.fromresource(vlibraryhandle, "resourcename "); } | | |
|