reverted the carbon.dll usage to c# code