marshals string for unmanaged memory as ANSI. : Windows API : Windows C# Source Code


Custom Search

C# Source Code » Windows » Windows API »

 

marshals string for unmanaged memory as ANSI.








    
 

using System;
using System.Runtime.InteropServices;

public class Starter {
    public static void Main() {
        int hProcess = API.GetModuleHandle(null);
    }
}

public class API {
    [DllImport("kernel32.dll", CharSet = CharSet.Ansi)]
    public static extern int GetModuleHandle(string filename);
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Windows
» Windows API