posts - 38, comments - 9, trackbacks - 0, articles - 1

          參加.Net培訓筆記三

          Posted on 2005-04-11 12:32 大阿福 閱讀(326) 評論(0)  編輯  收藏

          windows develop:
          1.System.Windows
          1) MDI form:
          2) Controls:
          3) right mouse menu:
          access system clipboad:
          2.GDI+
          System.Drawing
          dumpbin.exe

          DC -> Graphics

          scale transform:

          3. File System:
          System.IO
          1)file/dir: copy/move/delete/create

          Directory/DirectoryInfo:

          File/FileInfo:

          2)read/write files:
          Stream:
          FileStream/Networkstream/MemoryStream/BufferedStream/CryptoStream

          string handle:

          string is fixed.

          4. NetWork:
          System.Net -> WinSocket API
          TCP/IP ->  Scoket IP:portnumber (80/25/110/21...) 1-1024

          http:
          smtp: RFC 822

          helo servername
          mail from:<email>
          rcpt to:<target email>
          data
          .

          pop3:

          5.windows services:
          process -> multi-services
          1)Create window service project
          2)Add onstart/onstop code
          3)Add installer
          4)use installutil.exe to install the service.

          6. interaction with OS:
          1).NET Framework: System.Diagnostics

          monitor window services:
          a)sockets -> 80(http)/25(smtp)
          b)non-sockets -> monitor all threads of that process.


          System.Security.Principle

                      bool returnValue = LogonUser(userName, domainName, Console.ReadLine(),
                          LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT,
                          ref tokenHandle);


                      WindowsIdentity newId = new WindowsIdentity(dupeTokenHandle);
                      WindowsImpersonationContext impersonatedUser = newId.Impersonate();

                     // do something

                      impersonatedUser.Undo();


          2)API
          System.Runtime.InteropServices

          platform invoke -> P/Invoke

          Hook

          3)COM
          RCW: tlbimp.exe/vs.net

          CCW: tlbexp.exe

          4)WMI:windows management instrumentation
          System.management

          5)Access registry:


          Serialization: DeSerialization -> binary/xml

          object/objectRef -> stream.
          1)allocate an unique ID for an object.
          2)descript the relationships of all the objects
          3)save object's memeber fields.


          lab:
          1. create file explorer.
          2. create dotnet notepad that similiars to the windows's notepad
          3. create SQL Management tools that allow us to monitor the size of database and log files.
          4. create TcpServer that can get http header from client's IE.

          April 16/17


          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 财经| 北辰区| 建水县| 黔西县| 公安县| 霍林郭勒市| 阿尔山市| 中山市| 麦盖提县| 新沂市| 漳州市| 叙永县| 来宾市| 鄯善县| 永平县| 榆中县| 沁源县| 郴州市| 东港市| 正宁县| 武威市| 榆中县| 蒙阴县| 满洲里市| 玉门市| 滕州市| 仲巴县| 龙游县| 甘谷县| 扬中市| 蒙自县| 西藏| 中山市| 澄城县| 福建省| 汉川市| 青海省| 伊吾县| 长武县| 略阳县| 泸西县|