check the security1. on the client machine, go to Control Panel->Administrative Tools
2. run Microsoft .NET Framework Configuration 
3. Runtime Security Policy->Machine->Code Group->All_Code-> select Trusted_Zone
4. on the right side, click on "Edit Code Group Properties", go to Permission Set tab, select the right Permission Set in the dropdownlist, then, select "Security" in the list, click on "View Permissions", you will see "Allows Calls to Unmanaged Code" is not granted
to modify the security, right click on Runtime Security Policy node and select "Adjust Security...", following the instructions....