1С Предприятие 7.7-8.0 Системное Программирование

  • Published on
    26-Dec-2015

  • View
    290

  • Download
    4

Embed Size (px)

DESCRIPTION

programare

Transcript

  • ( http://librus.ru ) - . , ( , , , , ..). - e-book' (, , ). , . Internet - . ! ! . , " ". . . , , , , . .

    librus

  • 7.7/8.0

    OLE, COM,I ActiveX

    WSH WMI

    ADOSQL-DMO

    TJVE DIRECTORYRVICE INTERFACES

  • 1C:

    7.7/8.0

    -

    -

    2005

  • 681.3.06 32.973.26-018.2

    69

    . .

    69 1: 7.7/8.0: . .:-, 2005. 336 .: .

    ISBN 5-94157-536-

    ,

    -

    "1:" 7.7 8.0. ActiveX, - Windows WMI WSH, ADO SQL-DMO, OLE Automation . "1C:". - -

    , -.

    681.3.06 32.973.26-018.2

    :

    . .

    .

    .

    02429 24.07.00. 20.12.04. 70x100'/. . . . . 27,09.

    4000 . 722"-", 190005, -, ., 29.

    -

    77.99.02.953..006421.11.04 11.11.2004 . .

    " ""

    199034, -, 9 , 12

    ISBN 5-94157-536- . ., 2005 , "-", 2005

  • 9 9 9 11 CD-ROM 12 12

    1. ActiveX 13

    ActiveX 13 Internet Explorer 15

    '. 15 HTML- ...16 POST- HTML- 17

    "Microsoft Winsock" 20 IP- 21 IP- 21

    ActiveX ActiveBarCode ..* 22 ActiveX Windows Media Player 24 Microsoft Agent 26

    MS Agent 26 MS Agent 27 MS Agent 36

    HTML- 45 52

    2. Windows WMI 59

    WMI 59 WMI 61 67 69

  • 70 71

    71 73 . 73 74 74

    75 76 76 77 77 Windows XP/Server 2003 77

    78 78 79 80 80 81

    82 '. 82 82

    83 84 84 85

    85 86 86 87

    87 88 89

    89 90 90

    91 92 92 93

    93 93 MAC- IP- 94 Ping 94

  • 149 151 153 154 MS Word 155 MS Word 159 MS Word 161

    Microsoft Excel 164 MS Excel, 164, MS Excel 165 166 168 MS Excel 169 MS Excel 173

    Microsoft PowerPoint : 176 MS PowerPoint ..176, 177

    v 179

    Adobe Photoshop 181

    5. ADO 185 ADO 185 187 SQL- 192 198 (ADOX) 202

    ... 203 206 208

    Microsoft Excel OLE DB 209 Microsoft Project OLE DB 214

    6. SQL-DMO 227 SQL-DMO 227 228 229

    230 ..233 233

    234 234 236

  • 3. WSH 97 WSH 97 WSH 97 VB- (VBS) 98 100

    , 100 102 , 104 104 105 105 105 106 , 108 - 109

    112 Windows 114

    114, 115 URL- 116

    Windows 116 116, 117

    119 119 120 121

    : 122 125 Microsoft Word 125 126 "1:" 126

    4. OLE Automation 129 OLE Automation 129 "1:" OLE Automation 130

    OLE Automation 7.7 131 OLE Automation 8.0 135 - 8.0... 143

    Microsoft Word 146 MS Word 147, 147

  • SQL- 246 SQL- 248 251 253

    7. Windows, ruiuU132 261

    rund!132 261 262 269 271 272 276

    8. - 281

    281 mailto 281 MAPI 282 V7Plus.dll 286 Rom-Mail.dll 289 295 298

    FTP 303 ftp.exe 303 FTPCoeduneme 310

    9. Active Directory Service Interfaces 313

    ADSI 313 WinNT Provider 314 317 318 318 319 320 321

    . - 329

    333

  • -?

    .

    ? - . ,

    .

    -

    -

    -

    1: 7.7/8.0. -,

    . -

    -

    .

    -

    ,

    -

    -

    ,

    .

    : (095) 975-0442; (8162) 112-120

    : info@tehuspeh.ru : www.tehuspeh.ru

  • "1C:" - 7.7 8.0, .

    ,

    , "1:". : ActiveX,COM, WMI WSH; OLE Automation; - ADO SQL-DMO; , FTP; .

    , -

    "1C:" . ,

    "1:" - ,

    .

    "1:". ,, , -

    -.

    , -

    .

    (7.7 8.0).

    1 " ActiveX". ActiveX. -,

  • .

    , ActiveX.

    . ,

    Internet Explorer, Microsoft Winsock, ActiveBarCode, Windows MediaPlayer ActiveX, Microsoft Agent . 2 " Windows WMI". -, -

    Windows Management Instrumentation (WMI). ,

    ; ; ; ; - ; , . , -

    , WMI. 3 " WSH". -

    Windows Script Host (WSH). , WSH, , , Windows, ,

    .

    WSH, - , -

    .

    4 " OLE Automation". OLE Automation. OLE-, Microsoft Word, Excel, PowerPoint Adobe Photoshop. - "1:" 7.7 8.0 OLE Automation, - 8.0. OLE-, - ,

    OLE Automation. 5 " ADO". -

    Microsoft ActiveX Data Objects (ADO). ADO, , -

    , .

    ADO ADO Extensionsfor Data Definition and Security (ADOX),

  • 11

    ,

    , .

    6. " SQL-DMO". Microsoft SQL Server SQLDistributed Management Objects (SQL-DMO). Microsoft SQLServer, , , SQL-. -

    Microsoft SQL Server, .

    7 " Windows, rundll32".

    rundll32, , DLL-. -

    , , .

    8 "-". - ,

    "1:" 7.7 8.0.

    , , -

    Messaging Application Program Interface (MAPI), , .

    FTP. 9 " Active Directory Service Interfaces". , ActiveDirectory Service Interfaces (ADSI). WinNT Provider, , ,

    .

    "1:" 7.7 8.0. - Microsoft Windows 2000 .

    -, -

    -.

  • _J2

    CD-ROM CD-ROM , -, . , -

    Offline- - ERP Group (www.erpg.ru), .

    -, -

    :

    http://www.ospi.ru " "; http://msdn.microsoft.com Microsoft Developer Network; http://rusproject.narod.ru " ", . ; http://admtech.mrsu.ru

    . . . " Windows"; http://avblc.narod.ru ; http://www.erpg.ru "ERP Group". -

    .

  • 1

    ActiveX

    ActiveX .

    Component Object Model ( - ). " ".

    . ,

    ,

    . -

    (DLL, EXE), "" , .

    , . , -

    -

    . , - -

    , .

    .

    ,

    .

    ,

    "1:", . , ( ) .

    ( ) Microsoft, ,

    Microsoft Windows 9x Microsoft Windows NT. Microsoft Macintosh. Microsoft - ,

  • 14 1

    . , ,

    .

    ActiveX COM. ActiveX , Microsoft - . , -

    , ,

    -

    - -

    ( ). ActiveX- :' (, Microsoft Agent, Progress Control, Slider Control,

    , .); , - -

    .

    ActiveX : , , -

    ,

    " " (ActiveX);

    , -

    , Open Group, - ( , Microsoft Metro-werks Bristol ActiveX Macintosh UNIX);

    -

    , , ActiveX Visual Basic, Visual C++, Borland Delphi, Borland C++,1: ;

    ActiveX, -

    ; , , ActiveX

    (TCP/IP, HTML, Java), - , , Microsoft - OLE, .

    , -

    "1:", , , -

    "1C". -

  • ActiveX 15

    , -

    . ,

    - ActiveX- "1:". "1:" ( 7.7) - - = (""). 8.8 . -

    .

    Internet Explorer-, Microsoft Internet Explorer, - . , -

    Web- -, ,

    GET POST- . -

    Windows, HTML-. -.

    , -

    , internet Explorer , 1.1, .

    objIE = ("InternetExplorer.Application");objIE.Visible =0; // objIE.Navigate("about:blank"); // objIE.readyState < 4 // ;

    oScreen = objIE.document.parentWindow.screen;(" : " + oScreen.width + "" +oScreen.height);

    ". 7.7". 8.0 "" " ".

  • 16 1

    obj IE obj IE. readystate < 4 objiE.busy ( ), Windows 9x - .

    Internet Explorer, - , -

    -

    .

    WSH WMI, - .

    HTML- Microsoft Internet Explorer Document, - HTML ( , JScript: window.document). - HTML- .

    Internet Explorer - HTML-, www.erpg.ru( 1.2 1.3). , ,

    ( ) - .

    objIE = ("InternetExplorer.Application");objIE.Visible = 0;objIE.Silent = 0;objIE.Navigate(); objIE.readyState

  • ActiveX 17

    8.0

    objIE = ("InternetExplorer.Application");objIE.Visible = ; // objIE.Silent = ;objIE.Navigate();(" . ..."); objIE.readyState

  • 18 1

    PostData. , , - "1:" . , -

    SafeArray, "1C:" 7.7. POST- internetExpiorer.Application "" Submit ( , ) - HTML-. - , , POST-, , HTTP_REFERER,. . , () cookie , , POST-. 1.4 1.5 - " ". ,

    7.7, 1.4, HTML- (. 1.1) , http://forum.erpg.ru.

    ;

    :

    | "" .!

    .

    . 1.1. HTML-

    HTML-

    objIE = ("InternetExpiorer.Application");objIE.Visible = 0;objIE.Silent = 0;objIE.Navigate("http://erpg.ru/frum/posting.php?mode=reply&t=34") objIE.readyState

  • ActiveX 19

    // " "objForm.elements("username").value = ();

    ;

    objForm.elements("subject").value = ();objForm.elements("message").value = ();objIE.Visible = 1;("HTML- . Internet Explorer.");

    , 7.7 - HTML- - , click ,

    Internet Explorer. , - ,

    submit: obj Form, submit . 8.0 "1:" -,

    .

    (. 1.5).

    objIE = ("InternetExplorer.Application");objIE.Visible = ; // objIE.Silent = ;objIE.Navigate("http://erpg.ru/forum/posting.php?mode=reply&t=34");(" . ..."); objIE.readyState

  • 20 1

    objForm.elements("message").value = ;objForm.elements("post").click(); // ""(" : " +"http://erpg.ru/forum/viewtopic.php?t=34");objIE.Quit(); // objIE = ;

    - -

    ,

    ......

    ( username). , - , username .

    , -

    , username .

    "Microsoft Winsock"Microsoft Winsock ActiveX, - TCP UDP . -, -

    .

    Winsock : ByteRecived ,

    ;

    LocaiHostName ; Locaiip IP-

    (...); LocaiPort ;

    . 0, . -

    .

    TCP-. -. 0, . Listen , .

    Protocol , Winsock ( TCP, UDP);RemoteHost IP- - , ( - IP-, FTP-);

  • ActiveX 21

    RemoteHostip IP- ; RemotePort -

    (, : 80 HTTP,26 - FTP);

    state .

    IP- IP- LocaiiP winsock. 1.6 , .

    IP-

    Winsock = ("MSWinsock.Winsock");(Winsock.LocaiiP) ;Winsock = ;

    IP- IP- RemoteHostip winsock. 1.7 , .

    Winsock = ("MSWinsock.Winsock");Winsock.Connect(, 139); Winsock.State = 4 // ;

    -

    (Winsock.RemoteHostIP);Winsock = ;

    , .

    TCP- 139, -, , .

    Connect , - , .

    -

    state.

  • 22 1

    ActiveX ActiveBarCode -

    , -

    .

    .

    20 ( ), , , . , -

    .

    , "1:" - -

    ActiveX- ActiveBarCode. - "1:". - , -

    , ,

    .

    ActiveBarCode , . , :

    Text ( ); (

    http://www.activebarcode.com); AutoType -

    ;

    showText ;

    ForeCoior ; Backcoior ; Font . Barcode.ocx, , -

    regsvr32 Barcode. .ActiveBarCode , . . - . ,

    ActiveX- - "1:". , 7.7 ActiveX- ( ). .

  • ActiveX 23

    7.7. , -

    . - , -

    ActiveBarCode ( MS Word,"1:" 8.0 .), 7.7. , -

    (. 1.2).

    L;

    ..! = ();..! = ;.. = ;

    W

    . 1.2. ActiveBarCode

    "" ( 1.8).

    .("");.("");.("");

    , :

    1. ActiveBarCode .

    2. , , , (, ).

  • 24 1

    8.0 "1:" . ActiveX- ( | ActiveX ActiveBarcode), (- | | )., ActiveBarcode , , 1.9.

    .. = ;

    ..Text = ;..ShowText = ;..AutoType = ;

    (. 1.3).

    jj ActiveB aiCode

    : [23456739:

    0 iQS]

    . 1.3. 8.0

    ActiveX Windows Media PlayerActiveX- Microsoft Windows Media Player , , -

    (JPG, BMP .). , -

    .

  • ActiveX 25

    Windows Media Player. 9.0, - http://www.microsoft.com/windows/windowsmedia/download/default.asp.

    ^

    , "1:" 7.7 - ,

    .

    Windows Media Player "1C:" .

    1. ActiveX- ActiveX. WindowsMedia Player.

    2. , - ActiveX- ( 1.10).

    -WMP.settings.autostart = True; // .WMP.URL = ;

    ((), 10, "");;

    ......

    ,

    . WMP ActiveX-. ActiveX Windows Media Player (tag, Bitrate .). 1.11 - .

    'ActiveX Windows Media Player j

    .WMP.settings.autostart = False;.WMP.URL = ;

    // ,

  • 26 1

    CM = ..11;

    // (" : " + CM.getItemInfo("SourceURL"));

    // = 0 CM.attributeCount-1 = CM.getAttributeName(); = CM.getltemlnf(CM.getAttributeName();( + " = " + );

    ;

    ((), 10, "");;

    Microsoft Agent

    MS AgentMicrosoft Agent , . -

    -

    , ,

    " 1 : ". Microsoft Agent - ( Microsoft Speech Application Programming Interface,SAPI 4.0), . (text-to-speech,TTS), . ,

    . Microsoft Agent ActiveX, - "1C:". Office 2000 Windows 2000. Microsoft Agent Windows 98 WindowsNT 4.0 Web- Microsoft (http://www.microsoft.com/msagent/). Microsoft -, . Merlin, Genie, - Robby Peedy (. 1.4).

  • ActiveX 27

    . 1.4. Microsoft Agent

    ,

    .

    ^

    Microsoft Microsoft Text-To-Speech , "" ( Lernout&Hauspie TTS3000), "" - Microsoft. , - Microsoft Agent Control 2.0 Merlin.

    MS AgentMicrosoft Agent , - , ,

    . Microsoft Agent - , .

    , . 1.5, .

    "1C:" Microsoft Agent ("Agent. Control. 2 " ) , 7.7, ("Agent.Control.2"), 8.0. , , -

    , (- 1.12).

    // Agent = ("Agent.Control. 2 ")

  • 28 1

    ("MS Agent !");

    (" MS Agent Microsoft http://www.microsoft.com/ms agent/");

    ;

    ;

    Agent.Connected = ; //

    Agent.Characters.Load("Merlin", "Merlin.acs"); //

    Agent.Characters("Merlin").Show(); //

    , 1.12, . , ,

    Load, : HTTP-. Microsoft Agent %WinDir%\MSAgent\Chars ( %WinDir% , - Microsoft Windows). ,

    . Microsoft Agent - : (ACS) - (ACF, ), http-.

    LJ

    '-- '. 1=; --4 ^S ..'-^ f =} ft :.; * - 1.5

    i 1 . ,.

    : L

    | ^ 6212:'"|1| 02.06.2003 12: 00: 00

    it*: > 02.06.2003 19:30:22

    !tf*j 103.06.20031:18:57" "!r* |22:kX i 03.06.2003 12:00:01f,3f "^"

    IEa .

    ''!?1""" "

    ""

    ""

    '"

    "

    "

    '"" "

    [^ ! |__^ I

    ~75. '... ;|

    75.1 ~ ..7"

    80

    80"

    ; ? _ X

    _ { .0000000013 | ...

    .

    0...'";:;!...

    0000000018 ...000066020 ? "... v

    ::~ ^ ; | "^.;^ i |

    ( KfE

  • ActiveX 29

    . -

    .

    show - .

    Hide, . , ,

    ( 1.13). ShowDefaultCharacterProperties Agent . -

    ( ) (X, Y),

    .

    1.13. MS Agent

    Agent = ("Agent.Control.2");

    ("MS Agent !");;

    ' ;

    Agent.Connected = ; // // Agent.ShowDefaultCharacterProperties(4, 4);Agent.Characters.Load(,); // Agent.Characters("").Show(); //

    "" ,

    . . . MS Agent -: MoveTo Play. , Agent, ( 1.14).----'"'""'---------"--"--"-- - -^ ------------ .-- -j! 1.14. MS Agent

    Agent = ("Agent.Control.2");

    ("MS Agent !");

  • 30 1

    ;

    ;

    Agent.Connected = ; // Agent.Characters.Load("Merlin", "Merlin.acs"); // Characters = Agent.Characters("Merlin"); // Characters.Show(}; // // Characters.MoveTo(100, 100); // (X, Y)Characters.MoveTo(200, 0, 500); // 500 Characters.MoveTo(300, 100, 0); //0 - // = 1 5

    // Characters.Play("GetAttentionContinued");

    ;

    Characters.Play("Search"); //

    MoveTo -.

    (X, Y) . - .

    1000 . - .

    Play , .

    , -

    .

    -

    , AnimationNames, . , 7.7 "1C:" - . 8.0 ,

    1.15.

    Agent = ("Agent.Control.2");

    ("MS Agent !");

  • ActiveX 31

    ;

    ;

    Agent.Connected = ; // Agent.Characters.Load("Merlin", "Merlin.acs"); // Characters = Agent.Characters("Merlin"); // // . . Characters.AnimationNames() ();

    ;

    Microsoft Agent . .

    , , -

    Request, .

    Microsoft Agent . , , Agent - .

    , stop, (, , ) StopAll.

    Microsoft Agent , : ,

    .

    - , Think, Speak ( 1.16).

    f MS Agent

    Agent = ("Agent.Control.2");

    ("MS Agent !");;

    ;

    Agent.C...