Skip to main content
added 415 characters in body
Source Link
sarepta
  • 376
  • 1
  • 3
  • 11

To address alike situation, Microsoft provides attributes, assembly, and marshaling to offer interoperability between languagesmanaged-unmanaged code(not .net aware/running outside the clr boundaries) and managed-legacy COM.
Investigate the use of dynamics and the (Dynamic language runtime- DLR) which should be more than fine.
code example (using kernel32.dll) as an example of calling unmanaged code from a managed context

[DllImport("kernel32.dll", EntryPoint="MoveFile", ExactSpelling=false, CharSet=CharSet.Unicode, SetLastError=true)] static extern bool MoveFile(string sourceFile, string destinationFile); //calling the function static void Main() { MoveFile("sheet.xls", @"c:\sheet.xls"); } 

check this pdf also: http://www.nag.com/IndustryArticles/Calling_C_Library_DLLs_from_C_Sharp.pdf

To address alike situation, Microsoft provides attributes, assembly, and marshaling to offer interoperability between languages.
Investigate the use of dynamics and the (Dynamic language runtime- DLR) which should be more than fine.
code example (using kernel32.dll) as an example of calling unmanaged code from a managed context

[DllImport("kernel32.dll", EntryPoint="MoveFile", ExactSpelling=false, CharSet=CharSet.Unicode, SetLastError=true)] static extern bool MoveFile(string sourceFile, string destinationFile); //calling the function static void Main() { MoveFile("sheet.xls", @"c:\sheet.xls"); } 

check this pdf also: http://www.nag.com/IndustryArticles/Calling_C_Library_DLLs_from_C_Sharp.pdf

To address alike situation, Microsoft provides attributes, assembly, and marshaling to offer interoperability between managed-unmanaged code(not .net aware/running outside the clr boundaries) and managed-legacy COM.
Investigate the use of dynamics and the (Dynamic language runtime- DLR) which should be more than fine.
code example (using kernel32.dll) as an example of calling unmanaged code from a managed context

[DllImport("kernel32.dll", EntryPoint="MoveFile", ExactSpelling=false, CharSet=CharSet.Unicode, SetLastError=true)] static extern bool MoveFile(string sourceFile, string destinationFile); //calling the function static void Main() { MoveFile("sheet.xls", @"c:\sheet.xls"); } 

check this pdf also: http://www.nag.com/IndustryArticles/Calling_C_Library_DLLs_from_C_Sharp.pdf

added 415 characters in body
Source Link
sarepta
  • 376
  • 1
  • 3
  • 11

To address thisalike situation, Microsoft provides attributes, assembly, and marshaling to offer interoperability between languages.
Investigate the use of dynamics and the (Dynamic language runtime- DLR) which should be more than fine.
code example (using kernel32.dll) as an example of calling unmanaged code from a managed context

[DllImport("kernel32.dll", EntryPoint="MoveFile", ExactSpelling=false, CharSet=CharSet.Unicode, SetLastError=true)] static extern bool MoveFile(string sourceFile, string destinationFile); //calling the function static void Main() { MoveFile("sheet.xls", @"c:\sheet.xls"); } 

check this pdf also: http://www.nag.com/IndustryArticles/Calling_C_Library_DLLs_from_C_Sharp.pdf

To address this situation, Microsoft provides attributes, assembly, and marshaling.
Investigate the use of dynamics and the (Dynamic language runtime- DLR) which should be more than fine.

To address alike situation, Microsoft provides attributes, assembly, and marshaling to offer interoperability between languages.
Investigate the use of dynamics and the (Dynamic language runtime- DLR) which should be more than fine.
code example (using kernel32.dll) as an example of calling unmanaged code from a managed context

[DllImport("kernel32.dll", EntryPoint="MoveFile", ExactSpelling=false, CharSet=CharSet.Unicode, SetLastError=true)] static extern bool MoveFile(string sourceFile, string destinationFile); //calling the function static void Main() { MoveFile("sheet.xls", @"c:\sheet.xls"); } 

check this pdf also: http://www.nag.com/IndustryArticles/Calling_C_Library_DLLs_from_C_Sharp.pdf

Source Link
sarepta
  • 376
  • 1
  • 3
  • 11

To address this situation, Microsoft provides attributes, assembly, and marshaling.
Investigate the use of dynamics and the (Dynamic language runtime- DLR) which should be more than fine.