PInvoke Libraries when the lib is not accessible
I have a library that contains a class that references dwm. If this library is use in an XP system but the class is not used, would this cause an error?
S开发者_运维技巧upposed this library was to be used on WP7 or XNA? Would this cause an error?
The runtime will not try to reference the DLL until you call the function. If your program never calls the method that references the missing DLL, then there will be no error.
精彩评论