Import the function using the DLLImport attribute...
You'll have to re-create the Security Attributes structure and marshal it
correctly also.
However. Why not use one of the .NET file API's?
Bob.
--
xRay tools Professional Windows Forms componenets at amazing prices.
http://www.bobpowell.net/xray_tools.htm
Buy the tool and get source code in VB or C#
Buy my book, C# and the .NET framework...
http://www.amazon.com/exec/obidos/ASIN/067232153X/bobpowelnet
See my book recommendations...
http://www.bobpowell.net/recommendations.htm
Check out the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm
Quote:
> I want use a API function,CreateFile,which is in Kernel32.lib,How to do
for
> using it ?