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

          參加.Net培訓筆記三

          Posted on 2005-04-11 12:32 大阿福 閱讀(325) 評論(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


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


          網站導航:
           
          主站蜘蛛池模板: 丰县| 社会| 锡林郭勒盟| 寿阳县| 朝阳市| 芦山县| 南通市| 南溪县| 玉龙| 柘荣县| 阳朔县| 连平县| 泾阳县| 吴桥县| 扎赉特旗| 公主岭市| 宣城市| 乐清市| 兴国县| 宁河县| 元谋县| 潍坊市| 溧水县| 临夏市| 改则县| 阜宁县| 集贤县| 阿克| 峡江县| 元朗区| 伊川县| 札达县| 张家港市| 加查县| 家居| 新泰市| 乡城县| 瓮安县| 南部县| 镇巴县| 格尔木市|