akshaykarthik
akshaykarthik

Reputation: 1065

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?

Supposed this library was to be used on WP7 or XNA? Would this cause an error?

Upvotes: 0

Views: 96

Answers (1)

Jim Mischel
Jim Mischel

Reputation: 133995

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.

Upvotes: 3

Related Questions