コード例 #1
0
ファイル: Program.cs プロジェクト: zhaohengyi/dotNet_PInvoke
        private static void TestStructExactLayout2()
        {
            ShowMarshalSize(typeof(MsEmployeeEx2_Partial));

            // ����һ�����󣬲����Գ�ʼֵ
            MsEmployeeEx2_Partial employee = new MsEmployeeEx2_Partial();
            employee.EmployeeID = 10001;
            employee.EmployedYear = 1;
            employee.CurrentLevel = 59;

            GetEmployeeInfoEx2_PartialStruct(ref employee);

            Console.WriteLine("Ա����Ϣ:");
            Console.WriteLine("ID: {0}", employee.EmployeeID);
            Console.WriteLine("����: {0}", employee.EmployedYear);
            Console.WriteLine("ְ��: {0}", employee.CurrentLevel);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: zhaohengyi/dotNet_PInvoke
 private static extern void GetEmployeeInfoEx2_PartialStruct(ref MsEmployeeEx2_Partial employee);