IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Windows Discussion :

Programmation OLE sur Dev C++


Sujet :

Windows

  1. #1
    Membre averti
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Février 2007
    Messages
    340
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Transports

    Informations forums :
    Inscription : Février 2007
    Messages : 340
    Points : 350
    Points
    350
    Par défaut Programmation OLE sur Dev C++
    Bonjour à tous,
    Je souhaite coder un script de pilotage d'objet OLE (ou COM ? je n'ai pas cerné la différence) en C.
    J'utilise DEV-C++ et j'ai beau essayer tout ce que je veux, pas moyen de créer une connexion avec l'appli a piloter.

    J'ai déjà codé ce script en VBA pour lire les données dans une feuille excel et la connexion à l'appli se faisait en une seule ligne :

    Set LoxAd = CreateObject("LoxanePro.lxwOLEAddress")

    Ensuite j'utilise les méthodes de l'objet mais ça je pense que ça ne pose aucun problème à partir du moment ou l'objet est créé. j'ai également essayé en C++ mais sans succès. Quelqu'un pourrait m'éclairer ?

  2. #2
    Expert éminent sénior
    Avatar de Médinoc
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Septembre 2005
    Messages
    27 369
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Septembre 2005
    Messages : 27 369
    Points : 41 519
    Points
    41 519
    Par défaut
    Qu'arrives-tu à faire pour l'instant ?

    En C et en C++, on réfère à l'objet par son CLSID. Normalement, si tu ne l'as pas, tu devrais pouvoir l'obtenir avec la fonction CLSIDFromString() ou CLSIDFromProgID().

    Ensuite, tu pourras passer ce CLSID et l'IID de l'interface voulue à la fonction CoCreateInstance(), pour obtenir une interface du bon type vers l'objet OLE. Reste à espérer que l'interface que tu veux est déclarée dans un header, car je ne crois pas que MinGW accepte les Type Libraries...
    SVP, pas de questions techniques par MP. Surtout si je ne vous ai jamais parlé avant.

    "Aw, come on, who would be so stupid as to insert a cast to make an error go away without actually fixing the error?"
    Apparently everyone.
    -- Raymond Chen.
    Traduction obligatoire: "Oh, voyons, qui serait assez stupide pour mettre un cast pour faire disparaitre un message d'erreur sans vraiment corriger l'erreur?" - Apparemment, tout le monde. -- Raymond Chen.

  3. #3
    Membre averti
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Février 2007
    Messages
    340
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Transports

    Informations forums :
    Inscription : Février 2007
    Messages : 340
    Points : 350
    Points
    350
    Par défaut
    Euh et bien, je n'arrive pas du tout a faire ça.
    j'ai tenté le CLSID puis cocreateinstance mais sans succès. Il doit de toute façon me manquer le header.

    Pourrais tu m'expliquer plus en détail ce que je dois faire ?

    J'ai déjà fait ça :

    HRESULT r1;
    r1 = CoInitialize(NULL);
    CLSID * clsid;
    r1 = CLSIDFromProgID((L"LOXANEPro.Document"),clsid);
    IUnknown pwayProUnknown;
    r1 = CoCreateInstance(clsid, NULL, CLSCTX_LOCAL_SERVER, clsid,(void**) pwayProUnknown );


    Mais il me manque la suite et de manière je comprends pas la moitié.
    CLSID, ça j'ai compris, la récupération du clsid je comprends sauf le L"LoxanePro.Document". Qu'est ce qu'est le L ?
    Et après c'est la semoule complet

  4. #4
    Expert éminent sénior
    Avatar de Médinoc
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Septembre 2005
    Messages
    27 369
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Septembre 2005
    Messages : 27 369
    Points : 41 519
    Points
    41 519
    Par défaut
    1. L signifie "une chaîne de WCHAR", c'est tout.
    2. Ton pointeur n'est pas initialisé, là... Tu devrais plutôt déclarer directement un CLSID et passer son adresse à la fonction...
    3. Pour IUnknown, c'est le contraire: pwayProUnknown doit être un pointeur.
    4. Et on doit passer son adresse.

    PS: Tu es en C ou en C++, là ? C'est important pour CoCreateInstance(), car en C, il faut explicitement donner l'adresse d'un CLSID.


    Bref, plutôt un truc de ce genre (en C) :
    Code C : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    HRESULT r1;
    r1 = CoInitialize(NULL);
    CLSID clsid;
    r1 = CLSIDFromProgID(L"LOXANEPro.Document", &clsid);
    IUnknown *pwayProUnknown = NULL;
    r1 = CoCreateInstance(&clsid, NULL, CLSCTX_LOCAL_SERVER, clsid,(void**) &pwayProUnknown );
    if(SUCCEEDED(r1))
    {
       /* jouer un peu avec l'objet */
       /* ... */
     
       /* Et à la fin, on release. */
       pwayProUnknown->lpVtbl->Release(pwayProUnknown);
       pwayProUnknown = NULL;
    }
    SVP, pas de questions techniques par MP. Surtout si je ne vous ai jamais parlé avant.

    "Aw, come on, who would be so stupid as to insert a cast to make an error go away without actually fixing the error?"
    Apparently everyone.
    -- Raymond Chen.
    Traduction obligatoire: "Oh, voyons, qui serait assez stupide pour mettre un cast pour faire disparaitre un message d'erreur sans vraiment corriger l'erreur?" - Apparemment, tout le monde. -- Raymond Chen.

  5. #5
    Membre averti
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Février 2007
    Messages
    340
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Transports

    Informations forums :
    Inscription : Février 2007
    Messages : 340
    Points : 350
    Points
    350
    Par défaut
    D'accord
    Je code en C.
    Par contre, le 4eme paramètre de CoCreateInstance n'a pas le bon type. En mettant &clsid, ça passe. C'est bon ?

    Autrement, je travaille sur quel objet ? pwayProUnknown pour mes méthodes OLE ?
    Tu m'as parlé d'un header, est il obligatoire car en VBA je ne faisais appel à aucune librairie.

  6. #6
    Expert éminent sénior
    Avatar de Médinoc
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Septembre 2005
    Messages
    27 369
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Septembre 2005
    Messages : 27 369
    Points : 41 519
    Points
    41 519
    Par défaut
    Oups, je n'avais pas vu ce paramètre.
    Il n'est pas bon. Ici, il faut passer IID_IUnknown ou son adresse.

    Mais on ne peut rien faire avec une simple IUnknown, il faut une interface qui donne les fonctions dont tu as besoin. Je connais mal VB, mais il y a sûrement un type d'interface qui est utilisé, non?


    Pour le header, il en faut forcément un pour MinGW car les Type Libraries ne sont pas supportées, et il est probable que VB soit directement aller en chercher une si elle est indiquée dans la base de registre.
    Reste à savoir si l'interface dont tu as besoin est une interface fournie par Windows (auquel cas elle devrait être définie dans un header Windows, mais pas forcément ceux de MinGW puisque j'ai vu qu'ils définissaient moins d'interfaces que les headers de Visual) ou si c'est une interface spécifique à l'objet, auquel cas il te faudra un header spécifique.

    Il me semble qu'il existe un moyen de générer un header à partir d'une Type Library, mais il me semble que dans tous les cas il faut avoir Visual pour cela... :-(
    SVP, pas de questions techniques par MP. Surtout si je ne vous ai jamais parlé avant.

    "Aw, come on, who would be so stupid as to insert a cast to make an error go away without actually fixing the error?"
    Apparently everyone.
    -- Raymond Chen.
    Traduction obligatoire: "Oh, voyons, qui serait assez stupide pour mettre un cast pour faire disparaitre un message d'erreur sans vraiment corriger l'erreur?" - Apparemment, tout le monde. -- Raymond Chen.

  7. #7
    Membre averti
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Février 2007
    Messages
    340
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Transports

    Informations forums :
    Inscription : Février 2007
    Messages : 340
    Points : 350
    Points
    350
    Par défaut
    Il y a bien un .tlb dans le dossier du logiciel en question.
    C'est un logiciel de calcul de distance (genre Microsoft Autoroute).
    Autrement, j'ai la liste des fonctions avec leurs paramètres sous cette forme.

    long SetEditAddress(long in_iTabAddress, long in_iEditAddress, LPCTSTR in_strAddress)

    Peut etre je peux créer le .h ?

    et voici la première page du fichier HELP contenu dans le logiciel :

    LOXANE Pro possède 5 objets OLE.

    Le premier objet "LoxanePro.Document" de type IWayPro permet de contrôler l’ouverture de l’application à distance.

    Cet objet contient aussi des commandes OLE.

    Les 4 autres objets OLE sont spécifiques à un type d’action :

    LoxanePro.lxwOLEMapDisplay : objet dédié à la position de la carte.
    LoxanePro.lxwOLEItinerary : objet dédié au calcul d’itinéraire.

    LoxanePro.lxwOLEAddress : objet dédié à la recherche d’adresse.
    LoxanePro.lxwOLEUserData : objet dédié aux vues utilisateurs (fichiers, données…)


    Exemple :

    IwayPro m_LoxanePro;

    // initialisation des objets :
    CLSID clsid1;

    CLSIDFromProgID("LoxanePro.Document", &clsid1) ;
    m_LoxanePro.CreateDispatch(clsid1) ;

    // Appel d’une commande
    m_LoxanePro.Open() ;

    © 2005 - 2006 PTV Loxane

  8. #8
    Expert éminent sénior
    Avatar de Médinoc
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Septembre 2005
    Messages
    27 369
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Septembre 2005
    Messages : 27 369
    Points : 41 519
    Points
    41 519
    Par défaut
    En ce cas, il y a fort à supposer que l'interface IwayPro est déclarée dans le .tlb

    En ce cas, les deux solutions sont utiliser Visual ou regénérer le header. Je doute fort que tu puisse le faire manuellement, car le nombre et l'ordre des fonctions sont importants.

    Cherche quelque part les moyens d'obtenir un header à partir d'une .tlb, il doit bien y avoir un utilitaire ou un tuto (mais peut-être que ça implique Visual. Mais je pense que ce n'est pas grave d'avoir besoin de Visual pour la conversion si on n'en a pas besoin pour construire le programme)
    SVP, pas de questions techniques par MP. Surtout si je ne vous ai jamais parlé avant.

    "Aw, come on, who would be so stupid as to insert a cast to make an error go away without actually fixing the error?"
    Apparently everyone.
    -- Raymond Chen.
    Traduction obligatoire: "Oh, voyons, qui serait assez stupide pour mettre un cast pour faire disparaitre un message d'erreur sans vraiment corriger l'erreur?" - Apparemment, tout le monde. -- Raymond Chen.

  9. #9
    Membre averti
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Février 2007
    Messages
    340
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Transports

    Informations forums :
    Inscription : Février 2007
    Messages : 340
    Points : 350
    Points
    350
    Par défaut
    Je vais chercher ça et je reviens si j'ai un problème.

  10. #10
    Membre averti
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Février 2007
    Messages
    340
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Transports

    Informations forums :
    Inscription : Février 2007
    Messages : 340
    Points : 350
    Points
    350
    Par défaut
    j'ai réussi a créer le fichier .IDL mais je n'arrive pas a générer le .h et .c

    J'ai installé le platform SDK mais je n'arrive toujours pas. j'ai bien MIDL mais je n'arrive pas à le faire marcher (je lui passe bien les paramètres). Je pense qu'il n'arrive pas à accéder aux dossiers dont il a besoin ou autre.

    Quelqu'un pourrait m'expliquer comment faire ? ou bien me générer ces fichiers ?


    EDIT : c'est bon j'ai réussi avec la méthode FORCE BRUTE... (non non j'ai pas tout balancé par la fenêtre )
    Je teste tout ça et je reviens vous dire quoi.

  11. #11
    Expert éminent sénior
    Avatar de Médinoc
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Septembre 2005
    Messages
    27 369
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Septembre 2005
    Messages : 27 369
    Points : 41 519
    Points
    41 519
    Par défaut
    Code X : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    C:\Logs>midl Test1.idl
    Microsoft (R) 32b/64b MIDL Compiler Version 6.00.0366
    Copyright (c) Microsoft Corporation 1991-2002. All rights reserved.
    Processing .\Test1.idl
    Test1.idl
    Processing C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\oaidl.idl
    oaidl.idl
    Processing C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\objidl.idl
    objidl.idl
    Processing C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\unknwn.idl
    unknwn.idl
    Processing C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\wtypes.idl
    wtypes.idl
    Processing C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\basetsd.h
    basetsd.h
    Processing C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\guiddef.h
    guiddef.h
    Processing C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\oaidl.acf
    oaidl.acf
    
    C:\Logs>dir
     Volume in drive C has no label.
     Volume Serial Number is E85D-1F37
    
     Directory of C:\Logs
    
    05/02/2007  15:53    <DIR>          .
    05/02/2007  15:53    <DIR>          ..
    05/02/2007  15:53             2 853 Test1_i.c
    05/02/2007  15:53            20 714 Test1.h
    05/02/2007  15:50             9 985 Test1.idl
    05/02/2007  15:53            13 840 Test1.tlb
                  12 File(s)        501 518 bytes
                   2 Dir(s)  31 183 384 576 bytes free
    
    C:\Logs>
    Y'a qu'à d'mander!
    SVP, pas de questions techniques par MP. Surtout si je ne vous ai jamais parlé avant.

    "Aw, come on, who would be so stupid as to insert a cast to make an error go away without actually fixing the error?"
    Apparently everyone.
    -- Raymond Chen.
    Traduction obligatoire: "Oh, voyons, qui serait assez stupide pour mettre un cast pour faire disparaitre un message d'erreur sans vraiment corriger l'erreur?" - Apparemment, tout le monde. -- Raymond Chen.

  12. #12
    Expert éminent sénior
    Avatar de Médinoc
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Septembre 2005
    Messages
    27 369
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Septembre 2005
    Messages : 27 369
    Points : 41 519
    Points
    41 519
    Par défaut
    Fichier header :
    Code C : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    470
    471
    472
    473
    474
    475
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
    486
    487
    488
    489
    490
    491
    492
    493
    494
    495
    496
    497
    498
    499
    500
    501
    502
    503
    504
    505
    506
    507
    508
    509
    510
    511
    512
    513
    514
    515
    516
    517
    518
    519
    520
    521
    522
    523
    524
    525
    526
    527
    528
    529
    530
    531
    532
    533
    534
    535
    536
    537
    538
    539
    540
    541
    542
    543
    544
    545
    546
    547
    548
    549
    550
    551
    552
    553
    554
    555
    556
    557
    558
    559
    560
    561
    562
    563
    564
    565
    566
    567
    568
    569
    570
    571
    572
    573
    574
    575
    576
    577
    578
    579
    580
    581
    582
    583
    584
    585
    586
    587
    588
    589
    590
    591
    592
    593
    594
    595
    596
    597
    598
    599
    600
    601
    602
    603
    604
    605
    606
    607
    608
    609
    610
    611
    612
    613
    614
    615
    616
    617
    618
    619
    620
    621
    622
    623
    624
    625
    626
    627
    628
    629
    630
    631
    632
    633
    634
    635
    636
    637
    638
    639
    640
    641
    642
    643
    644
    645
    646
    647
    648
    649
    650
    651
    652
    653
    654
    655
    656
    657
    658
    659
    660
    661
    662
    663
    664
    665
    666
    667
    668
    669
    670
    671
    672
    673
    674
    675
    676
    677
    678
    679
    680
    681
    682
    683
    684
    685
    686
    687
    688
    689
    690
    691
    692
    693
    694
    695
    696
    697
    698
    699
    700
    701
    702
    703
    704
    705
    706
    707
    708
    709
    710
    711
    712
    713
    714
    715
    716
    717
    718
    719
    720
    721
    722
    723
    724
    725
    726
    727
    728
    729
    730
    731
    732
    733
     
    /* this ALWAYS GENERATED file contains the definitions for the interfaces */
     
     /* File created by MIDL compiler version 6.00.0366 */
    /* at Mon Feb 05 15:53:34 2007
     */
    /* Compiler settings for Test1.idl:
        Oicf, W1, Zp8, env=Win32 (32b run)
        protocol : dce , ms_ext, c_ext, robust
        error checks: allocation ref bounds_check enum stub_data 
        VC __declspec() decoration level: 
             __declspec(uuid()), __declspec(selectany), __declspec(novtable)
             DECLSPEC_UUID(), MIDL_INTERFACE()
    */
    //@@MIDL_FILE_HEADING(  )
     
    #pragma warning( disable: 4049 )  /* more than 64k source lines */
     
     
    /* verify that the <rpcndr.h> version is high enough to compile this file*/
    #ifndef __REQUIRED_RPCNDR_H_VERSION__
    #define __REQUIRED_RPCNDR_H_VERSION__ 475
    #endif
     
    #include "rpc.h"
    #include "rpcndr.h"
     
    #ifndef __RPCNDR_H_VERSION__
    #error this stub requires an updated version of <rpcndr.h>
    #endif // __RPCNDR_H_VERSION__
     
     
    #ifndef __Test1_h__
    #define __Test1_h__
     
    #if defined(_MSC_VER) && (_MSC_VER >= 1020)
    #pragma once
    #endif
     
    /* Forward Declarations */ 
     
    #ifndef __IWayPro_FWD_DEFINED__
    #define __IWayPro_FWD_DEFINED__
    typedef interface IWayPro IWayPro;
    #endif 	/* __IWayPro_FWD_DEFINED__ */
     
     
    #ifndef __IlxwOLEUserData_FWD_DEFINED__
    #define __IlxwOLEUserData_FWD_DEFINED__
    typedef interface IlxwOLEUserData IlxwOLEUserData;
    #endif 	/* __IlxwOLEUserData_FWD_DEFINED__ */
     
     
    #ifndef __IlxwOLEItinerary_FWD_DEFINED__
    #define __IlxwOLEItinerary_FWD_DEFINED__
    typedef interface IlxwOLEItinerary IlxwOLEItinerary;
    #endif 	/* __IlxwOLEItinerary_FWD_DEFINED__ */
     
     
    #ifndef __IlxwOLEMapDisplay_FWD_DEFINED__
    #define __IlxwOLEMapDisplay_FWD_DEFINED__
    typedef interface IlxwOLEMapDisplay IlxwOLEMapDisplay;
    #endif 	/* __IlxwOLEMapDisplay_FWD_DEFINED__ */
     
     
    #ifndef __IlxwOLEAddress_FWD_DEFINED__
    #define __IlxwOLEAddress_FWD_DEFINED__
    typedef interface IlxwOLEAddress IlxwOLEAddress;
    #endif 	/* __IlxwOLEAddress_FWD_DEFINED__ */
     
     
    #ifndef __Document_FWD_DEFINED__
    #define __Document_FWD_DEFINED__
     
    #ifdef __cplusplus
    typedef class Document Document;
    #else
    typedef struct Document Document;
    #endif /* __cplusplus */
     
    #endif 	/* __Document_FWD_DEFINED__ */
     
     
    #ifndef __lxwOLEUserData_FWD_DEFINED__
    #define __lxwOLEUserData_FWD_DEFINED__
     
    #ifdef __cplusplus
    typedef class lxwOLEUserData lxwOLEUserData;
    #else
    typedef struct lxwOLEUserData lxwOLEUserData;
    #endif /* __cplusplus */
     
    #endif 	/* __lxwOLEUserData_FWD_DEFINED__ */
     
     
    #ifndef __lxwOLEItinerary_FWD_DEFINED__
    #define __lxwOLEItinerary_FWD_DEFINED__
     
    #ifdef __cplusplus
    typedef class lxwOLEItinerary lxwOLEItinerary;
    #else
    typedef struct lxwOLEItinerary lxwOLEItinerary;
    #endif /* __cplusplus */
     
    #endif 	/* __lxwOLEItinerary_FWD_DEFINED__ */
     
     
    #ifndef __lxwOLEMapDisplay_FWD_DEFINED__
    #define __lxwOLEMapDisplay_FWD_DEFINED__
     
    #ifdef __cplusplus
    typedef class lxwOLEMapDisplay lxwOLEMapDisplay;
    #else
    typedef struct lxwOLEMapDisplay lxwOLEMapDisplay;
    #endif /* __cplusplus */
     
    #endif 	/* __lxwOLEMapDisplay_FWD_DEFINED__ */
     
     
    #ifndef __lxwOLEAddress_FWD_DEFINED__
    #define __lxwOLEAddress_FWD_DEFINED__
     
    #ifdef __cplusplus
    typedef class lxwOLEAddress lxwOLEAddress;
    #else
    typedef struct lxwOLEAddress lxwOLEAddress;
    #endif /* __cplusplus */
     
    #endif 	/* __lxwOLEAddress_FWD_DEFINED__ */
     
     
    #ifdef __cplusplus
    extern "C"{
    #endif 
     
    void * __RPC_USER MIDL_user_allocate(size_t);
    void __RPC_USER MIDL_user_free( void * ); 
     
     
    #ifndef __WayPro_LIBRARY_DEFINED__
    #define __WayPro_LIBRARY_DEFINED__
     
    /* library WayPro */
    /* [version][uuid] */ 
     
     
     
     
     
     
     
    EXTERN_C const IID LIBID_WayPro;
     
    #ifndef __IWayPro_DISPINTERFACE_DEFINED__
    #define __IWayPro_DISPINTERFACE_DEFINED__
     
    /* dispinterface IWayPro */
    /* [uuid] */ 
     
     
    EXTERN_C const IID DIID_IWayPro;
     
    #if defined(__cplusplus) && !defined(CINTERFACE)
     
        MIDL_INTERFACE("7CA70C1C-38DC-4BD3-B1DD-FB4B4685825C")
        IWayPro : public IDispatch
        {
        };
     
    #else 	/* C style interface */
     
        typedef struct IWayProVtbl
        {
            BEGIN_INTERFACE
     
            HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
                IWayPro * This,
                /* [in] */ REFIID riid,
                /* [iid_is][out] */ void **ppvObject);
     
            ULONG ( STDMETHODCALLTYPE *AddRef )( 
                IWayPro * This);
     
            ULONG ( STDMETHODCALLTYPE *Release )( 
                IWayPro * This);
     
            HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( 
                IWayPro * This,
                /* [out] */ UINT *pctinfo);
     
            HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( 
                IWayPro * This,
                /* [in] */ UINT iTInfo,
                /* [in] */ LCID lcid,
                /* [out] */ ITypeInfo **ppTInfo);
     
            HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( 
                IWayPro * This,
                /* [in] */ REFIID riid,
                /* [size_is][in] */ LPOLESTR *rgszNames,
                /* [in] */ UINT cNames,
                /* [in] */ LCID lcid,
                /* [size_is][out] */ DISPID *rgDispId);
     
            /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( 
                IWayPro * This,
                /* [in] */ DISPID dispIdMember,
                /* [in] */ REFIID riid,
                /* [in] */ LCID lcid,
                /* [in] */ WORD wFlags,
                /* [out][in] */ DISPPARAMS *pDispParams,
                /* [out] */ VARIANT *pVarResult,
                /* [out] */ EXCEPINFO *pExcepInfo,
                /* [out] */ UINT *puArgErr);
     
            END_INTERFACE
        } IWayProVtbl;
     
        interface IWayPro
        {
            CONST_VTBL struct IWayProVtbl *lpVtbl;
        };
     
     
     
    #ifdef COBJMACROS
     
     
    #define IWayPro_QueryInterface(This,riid,ppvObject)	\
        (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
     
    #define IWayPro_AddRef(This)	\
        (This)->lpVtbl -> AddRef(This)
     
    #define IWayPro_Release(This)	\
        (This)->lpVtbl -> Release(This)
     
     
    #define IWayPro_GetTypeInfoCount(This,pctinfo)	\
        (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo)
     
    #define IWayPro_GetTypeInfo(This,iTInfo,lcid,ppTInfo)	\
        (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo)
     
    #define IWayPro_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)	\
        (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
     
    #define IWayPro_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)	\
        (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
     
    #endif /* COBJMACROS */
     
     
    #endif 	/* C style interface */
     
     
    #endif 	/* __IWayPro_DISPINTERFACE_DEFINED__ */
     
     
    #ifndef __IlxwOLEUserData_DISPINTERFACE_DEFINED__
    #define __IlxwOLEUserData_DISPINTERFACE_DEFINED__
     
    /* dispinterface IlxwOLEUserData */
    /* [uuid] */ 
     
     
    EXTERN_C const IID DIID_IlxwOLEUserData;
     
    #if defined(__cplusplus) && !defined(CINTERFACE)
     
        MIDL_INTERFACE("0839E663-CCDD-4F9F-9936-1ECB09BA4C58")
        IlxwOLEUserData : public IDispatch
        {
        };
     
    #else 	/* C style interface */
     
        typedef struct IlxwOLEUserDataVtbl
        {
            BEGIN_INTERFACE
     
            HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
                IlxwOLEUserData * This,
                /* [in] */ REFIID riid,
                /* [iid_is][out] */ void **ppvObject);
     
            ULONG ( STDMETHODCALLTYPE *AddRef )( 
                IlxwOLEUserData * This);
     
            ULONG ( STDMETHODCALLTYPE *Release )( 
                IlxwOLEUserData * This);
     
            HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( 
                IlxwOLEUserData * This,
                /* [out] */ UINT *pctinfo);
     
            HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( 
                IlxwOLEUserData * This,
                /* [in] */ UINT iTInfo,
                /* [in] */ LCID lcid,
                /* [out] */ ITypeInfo **ppTInfo);
     
            HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( 
                IlxwOLEUserData * This,
                /* [in] */ REFIID riid,
                /* [size_is][in] */ LPOLESTR *rgszNames,
                /* [in] */ UINT cNames,
                /* [in] */ LCID lcid,
                /* [size_is][out] */ DISPID *rgDispId);
     
            /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( 
                IlxwOLEUserData * This,
                /* [in] */ DISPID dispIdMember,
                /* [in] */ REFIID riid,
                /* [in] */ LCID lcid,
                /* [in] */ WORD wFlags,
                /* [out][in] */ DISPPARAMS *pDispParams,
                /* [out] */ VARIANT *pVarResult,
                /* [out] */ EXCEPINFO *pExcepInfo,
                /* [out] */ UINT *puArgErr);
     
            END_INTERFACE
        } IlxwOLEUserDataVtbl;
     
        interface IlxwOLEUserData
        {
            CONST_VTBL struct IlxwOLEUserDataVtbl *lpVtbl;
        };
     
     
     
    #ifdef COBJMACROS
     
     
    #define IlxwOLEUserData_QueryInterface(This,riid,ppvObject)	\
        (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
     
    #define IlxwOLEUserData_AddRef(This)	\
        (This)->lpVtbl -> AddRef(This)
     
    #define IlxwOLEUserData_Release(This)	\
        (This)->lpVtbl -> Release(This)
     
     
    #define IlxwOLEUserData_GetTypeInfoCount(This,pctinfo)	\
        (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo)
     
    #define IlxwOLEUserData_GetTypeInfo(This,iTInfo,lcid,ppTInfo)	\
        (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo)
     
    #define IlxwOLEUserData_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)	\
        (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
     
    #define IlxwOLEUserData_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)	\
        (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
     
    #endif /* COBJMACROS */
     
     
    #endif 	/* C style interface */
     
     
    #endif 	/* __IlxwOLEUserData_DISPINTERFACE_DEFINED__ */
     
     
    #ifndef __IlxwOLEItinerary_DISPINTERFACE_DEFINED__
    #define __IlxwOLEItinerary_DISPINTERFACE_DEFINED__
     
    /* dispinterface IlxwOLEItinerary */
    /* [uuid] */ 
     
     
    EXTERN_C const IID DIID_IlxwOLEItinerary;
     
    #if defined(__cplusplus) && !defined(CINTERFACE)
     
        MIDL_INTERFACE("F383F2EE-DDF2-4547-A831-D74479D728C4")
        IlxwOLEItinerary : public IDispatch
        {
        };
     
    #else 	/* C style interface */
     
        typedef struct IlxwOLEItineraryVtbl
        {
            BEGIN_INTERFACE
     
            HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
                IlxwOLEItinerary * This,
                /* [in] */ REFIID riid,
                /* [iid_is][out] */ void **ppvObject);
     
            ULONG ( STDMETHODCALLTYPE *AddRef )( 
                IlxwOLEItinerary * This);
     
            ULONG ( STDMETHODCALLTYPE *Release )( 
                IlxwOLEItinerary * This);
     
            HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( 
                IlxwOLEItinerary * This,
                /* [out] */ UINT *pctinfo);
     
            HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( 
                IlxwOLEItinerary * This,
                /* [in] */ UINT iTInfo,
                /* [in] */ LCID lcid,
                /* [out] */ ITypeInfo **ppTInfo);
     
            HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( 
                IlxwOLEItinerary * This,
                /* [in] */ REFIID riid,
                /* [size_is][in] */ LPOLESTR *rgszNames,
                /* [in] */ UINT cNames,
                /* [in] */ LCID lcid,
                /* [size_is][out] */ DISPID *rgDispId);
     
            /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( 
                IlxwOLEItinerary * This,
                /* [in] */ DISPID dispIdMember,
                /* [in] */ REFIID riid,
                /* [in] */ LCID lcid,
                /* [in] */ WORD wFlags,
                /* [out][in] */ DISPPARAMS *pDispParams,
                /* [out] */ VARIANT *pVarResult,
                /* [out] */ EXCEPINFO *pExcepInfo,
                /* [out] */ UINT *puArgErr);
     
            END_INTERFACE
        } IlxwOLEItineraryVtbl;
     
        interface IlxwOLEItinerary
        {
            CONST_VTBL struct IlxwOLEItineraryVtbl *lpVtbl;
        };
     
     
     
    #ifdef COBJMACROS
     
     
    #define IlxwOLEItinerary_QueryInterface(This,riid,ppvObject)	\
        (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
     
    #define IlxwOLEItinerary_AddRef(This)	\
        (This)->lpVtbl -> AddRef(This)
     
    #define IlxwOLEItinerary_Release(This)	\
        (This)->lpVtbl -> Release(This)
     
     
    #define IlxwOLEItinerary_GetTypeInfoCount(This,pctinfo)	\
        (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo)
     
    #define IlxwOLEItinerary_GetTypeInfo(This,iTInfo,lcid,ppTInfo)	\
        (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo)
     
    #define IlxwOLEItinerary_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)	\
        (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
     
    #define IlxwOLEItinerary_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)	\
        (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
     
    #endif /* COBJMACROS */
     
     
    #endif 	/* C style interface */
     
     
    #endif 	/* __IlxwOLEItinerary_DISPINTERFACE_DEFINED__ */
     
     
    #ifndef __IlxwOLEMapDisplay_DISPINTERFACE_DEFINED__
    #define __IlxwOLEMapDisplay_DISPINTERFACE_DEFINED__
     
    /* dispinterface IlxwOLEMapDisplay */
    /* [uuid] */ 
     
     
    EXTERN_C const IID DIID_IlxwOLEMapDisplay;
     
    #if defined(__cplusplus) && !defined(CINTERFACE)
     
        MIDL_INTERFACE("B5AC75B9-D940-44A2-9C26-D20BFDA62292")
        IlxwOLEMapDisplay : public IDispatch
        {
        };
     
    #else 	/* C style interface */
     
        typedef struct IlxwOLEMapDisplayVtbl
        {
            BEGIN_INTERFACE
     
            HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
                IlxwOLEMapDisplay * This,
                /* [in] */ REFIID riid,
                /* [iid_is][out] */ void **ppvObject);
     
            ULONG ( STDMETHODCALLTYPE *AddRef )( 
                IlxwOLEMapDisplay * This);
     
            ULONG ( STDMETHODCALLTYPE *Release )( 
                IlxwOLEMapDisplay * This);
     
            HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( 
                IlxwOLEMapDisplay * This,
                /* [out] */ UINT *pctinfo);
     
            HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( 
                IlxwOLEMapDisplay * This,
                /* [in] */ UINT iTInfo,
                /* [in] */ LCID lcid,
                /* [out] */ ITypeInfo **ppTInfo);
     
            HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( 
                IlxwOLEMapDisplay * This,
                /* [in] */ REFIID riid,
                /* [size_is][in] */ LPOLESTR *rgszNames,
                /* [in] */ UINT cNames,
                /* [in] */ LCID lcid,
                /* [size_is][out] */ DISPID *rgDispId);
     
            /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( 
                IlxwOLEMapDisplay * This,
                /* [in] */ DISPID dispIdMember,
                /* [in] */ REFIID riid,
                /* [in] */ LCID lcid,
                /* [in] */ WORD wFlags,
                /* [out][in] */ DISPPARAMS *pDispParams,
                /* [out] */ VARIANT *pVarResult,
                /* [out] */ EXCEPINFO *pExcepInfo,
                /* [out] */ UINT *puArgErr);
     
            END_INTERFACE
        } IlxwOLEMapDisplayVtbl;
     
        interface IlxwOLEMapDisplay
        {
            CONST_VTBL struct IlxwOLEMapDisplayVtbl *lpVtbl;
        };
     
     
     
    #ifdef COBJMACROS
     
     
    #define IlxwOLEMapDisplay_QueryInterface(This,riid,ppvObject)	\
        (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
     
    #define IlxwOLEMapDisplay_AddRef(This)	\
        (This)->lpVtbl -> AddRef(This)
     
    #define IlxwOLEMapDisplay_Release(This)	\
        (This)->lpVtbl -> Release(This)
     
     
    #define IlxwOLEMapDisplay_GetTypeInfoCount(This,pctinfo)	\
        (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo)
     
    #define IlxwOLEMapDisplay_GetTypeInfo(This,iTInfo,lcid,ppTInfo)	\
        (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo)
     
    #define IlxwOLEMapDisplay_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)	\
        (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
     
    #define IlxwOLEMapDisplay_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)	\
        (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
     
    #endif /* COBJMACROS */
     
     
    #endif 	/* C style interface */
     
     
    #endif 	/* __IlxwOLEMapDisplay_DISPINTERFACE_DEFINED__ */
     
     
    #ifndef __IlxwOLEAddress_DISPINTERFACE_DEFINED__
    #define __IlxwOLEAddress_DISPINTERFACE_DEFINED__
     
    /* dispinterface IlxwOLEAddress */
    /* [uuid] */ 
     
     
    EXTERN_C const IID DIID_IlxwOLEAddress;
     
    #if defined(__cplusplus) && !defined(CINTERFACE)
     
        MIDL_INTERFACE("CAFA0965-181F-4873-A40B-EDE922DD46FC")
        IlxwOLEAddress : public IDispatch
        {
        };
     
    #else 	/* C style interface */
     
        typedef struct IlxwOLEAddressVtbl
        {
            BEGIN_INTERFACE
     
            HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
                IlxwOLEAddress * This,
                /* [in] */ REFIID riid,
                /* [iid_is][out] */ void **ppvObject);
     
            ULONG ( STDMETHODCALLTYPE *AddRef )( 
                IlxwOLEAddress * This);
     
            ULONG ( STDMETHODCALLTYPE *Release )( 
                IlxwOLEAddress * This);
     
            HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( 
                IlxwOLEAddress * This,
                /* [out] */ UINT *pctinfo);
     
            HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( 
                IlxwOLEAddress * This,
                /* [in] */ UINT iTInfo,
                /* [in] */ LCID lcid,
                /* [out] */ ITypeInfo **ppTInfo);
     
            HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( 
                IlxwOLEAddress * This,
                /* [in] */ REFIID riid,
                /* [size_is][in] */ LPOLESTR *rgszNames,
                /* [in] */ UINT cNames,
                /* [in] */ LCID lcid,
                /* [size_is][out] */ DISPID *rgDispId);
     
            /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( 
                IlxwOLEAddress * This,
                /* [in] */ DISPID dispIdMember,
                /* [in] */ REFIID riid,
                /* [in] */ LCID lcid,
                /* [in] */ WORD wFlags,
                /* [out][in] */ DISPPARAMS *pDispParams,
                /* [out] */ VARIANT *pVarResult,
                /* [out] */ EXCEPINFO *pExcepInfo,
                /* [out] */ UINT *puArgErr);
     
            END_INTERFACE
        } IlxwOLEAddressVtbl;
     
        interface IlxwOLEAddress
        {
            CONST_VTBL struct IlxwOLEAddressVtbl *lpVtbl;
        };
     
     
     
    #ifdef COBJMACROS
     
     
    #define IlxwOLEAddress_QueryInterface(This,riid,ppvObject)	\
        (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
     
    #define IlxwOLEAddress_AddRef(This)	\
        (This)->lpVtbl -> AddRef(This)
     
    #define IlxwOLEAddress_Release(This)	\
        (This)->lpVtbl -> Release(This)
     
     
    #define IlxwOLEAddress_GetTypeInfoCount(This,pctinfo)	\
        (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo)
     
    #define IlxwOLEAddress_GetTypeInfo(This,iTInfo,lcid,ppTInfo)	\
        (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo)
     
    #define IlxwOLEAddress_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)	\
        (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)
     
    #define IlxwOLEAddress_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)	\
        (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)
     
    #endif /* COBJMACROS */
     
     
    #endif 	/* C style interface */
     
     
    #endif 	/* __IlxwOLEAddress_DISPINTERFACE_DEFINED__ */
     
     
    EXTERN_C const CLSID CLSID_Document;
     
    #ifdef __cplusplus
     
    class DECLSPEC_UUID("E1357A7D-3562-426C-AAE5-0E6FD7CAA2BC")
    Document;
    #endif
     
    EXTERN_C const CLSID CLSID_lxwOLEUserData;
     
    #ifdef __cplusplus
     
    class DECLSPEC_UUID("FC65D710-6839-46FF-8446-7949F86D21F7")
    lxwOLEUserData;
    #endif
     
    EXTERN_C const CLSID CLSID_lxwOLEItinerary;
     
    #ifdef __cplusplus
     
    class DECLSPEC_UUID("D6D86AF2-6E5B-4DB8-BC3B-7ED7AC92C771")
    lxwOLEItinerary;
    #endif
     
    EXTERN_C const CLSID CLSID_lxwOLEMapDisplay;
     
    #ifdef __cplusplus
     
    class DECLSPEC_UUID("B5246BFE-631A-43D6-8F10-80F33E9E2518")
    lxwOLEMapDisplay;
    #endif
     
    EXTERN_C const CLSID CLSID_lxwOLEAddress;
     
    #ifdef __cplusplus
     
    class DECLSPEC_UUID("B7D2C1FA-92AE-471C-9EED-31EE6B4C94E6")
    lxwOLEAddress;
    #endif
    #endif /* __WayPro_LIBRARY_DEFINED__ */
     
    /* Additional Prototypes for ALL interfaces */
     
    /* end of Additional Prototypes */
     
    #ifdef __cplusplus
    }
    #endif
     
    #endif
    Fichier source contenant les GUIDs :
    Code C : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
     
    /* this ALWAYS GENERATED file contains the IIDs and CLSIDs */
     
    /* link this file in with the server and any clients */
     
     
     /* File created by MIDL compiler version 6.00.0366 */
    /* at Mon Feb 05 15:53:34 2007
     */
    /* Compiler settings for Test1.idl:
        Oicf, W1, Zp8, env=Win32 (32b run)
        protocol : dce , ms_ext, c_ext, robust
        error checks: allocation ref bounds_check enum stub_data 
        VC __declspec() decoration level: 
             __declspec(uuid()), __declspec(selectany), __declspec(novtable)
             DECLSPEC_UUID(), MIDL_INTERFACE()
    */
    //@@MIDL_FILE_HEADING(  )
     
    #pragma warning( disable: 4049 )  /* more than 64k source lines */
     
     
    #ifdef __cplusplus
    extern "C"{
    #endif 
     
     
    #include <rpc.h>
    #include <rpcndr.h>
     
    #ifdef _MIDL_USE_GUIDDEF_
     
    #ifndef INITGUID
    #define INITGUID
    #include <guiddef.h>
    #undef INITGUID
    #else
    #include <guiddef.h>
    #endif
     
    #define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \
            DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8)
     
    #else // !_MIDL_USE_GUIDDEF_
     
    #ifndef __IID_DEFINED__
    #define __IID_DEFINED__
     
    typedef struct _IID
    {
        unsigned long x;
        unsigned short s1;
        unsigned short s2;
        unsigned char  c[8];
    } IID;
     
    #endif // __IID_DEFINED__
     
    #ifndef CLSID_DEFINED
    #define CLSID_DEFINED
    typedef IID CLSID;
    #endif // CLSID_DEFINED
     
    #define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \
            const type name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
     
    #endif !_MIDL_USE_GUIDDEF_
     
    MIDL_DEFINE_GUID(IID, LIBID_WayPro,0x78F814AE,0xA6F4,0x4CA6,0xA4,0xD8,0x2C,0x8B,0x72,0xF8,0x53,0x44);
     
     
    MIDL_DEFINE_GUID(IID, DIID_IWayPro,0x7CA70C1C,0x38DC,0x4BD3,0xB1,0xDD,0xFB,0x4B,0x46,0x85,0x82,0x5C);
     
     
    MIDL_DEFINE_GUID(IID, DIID_IlxwOLEUserData,0x0839E663,0xCCDD,0x4F9F,0x99,0x36,0x1E,0xCB,0x09,0xBA,0x4C,0x58);
     
     
    MIDL_DEFINE_GUID(IID, DIID_IlxwOLEItinerary,0xF383F2EE,0xDDF2,0x4547,0xA8,0x31,0xD7,0x44,0x79,0xD7,0x28,0xC4);
     
     
    MIDL_DEFINE_GUID(IID, DIID_IlxwOLEMapDisplay,0xB5AC75B9,0xD940,0x44A2,0x9C,0x26,0xD2,0x0B,0xFD,0xA6,0x22,0x92);
     
     
    MIDL_DEFINE_GUID(IID, DIID_IlxwOLEAddress,0xCAFA0965,0x181F,0x4873,0xA4,0x0B,0xED,0xE9,0x22,0xDD,0x46,0xFC);
     
     
    MIDL_DEFINE_GUID(CLSID, CLSID_Document,0xE1357A7D,0x3562,0x426C,0xAA,0xE5,0x0E,0x6F,0xD7,0xCA,0xA2,0xBC);
     
     
    MIDL_DEFINE_GUID(CLSID, CLSID_lxwOLEUserData,0xFC65D710,0x6839,0x46FF,0x84,0x46,0x79,0x49,0xF8,0x6D,0x21,0xF7);
     
     
    MIDL_DEFINE_GUID(CLSID, CLSID_lxwOLEItinerary,0xD6D86AF2,0x6E5B,0x4DB8,0xBC,0x3B,0x7E,0xD7,0xAC,0x92,0xC7,0x71);
     
     
    MIDL_DEFINE_GUID(CLSID, CLSID_lxwOLEMapDisplay,0xB5246BFE,0x631A,0x43D6,0x8F,0x10,0x80,0xF3,0x3E,0x9E,0x25,0x18);
     
     
    MIDL_DEFINE_GUID(CLSID, CLSID_lxwOLEAddress,0xB7D2C1FA,0x92AE,0x471C,0x9E,0xED,0x31,0xEE,0x6B,0x4C,0x94,0xE6);
     
    #undef MIDL_DEFINE_GUID
     
    #ifdef __cplusplus
    }
    #endif
    SVP, pas de questions techniques par MP. Surtout si je ne vous ai jamais parlé avant.

    "Aw, come on, who would be so stupid as to insert a cast to make an error go away without actually fixing the error?"
    Apparently everyone.
    -- Raymond Chen.
    Traduction obligatoire: "Oh, voyons, qui serait assez stupide pour mettre un cast pour faire disparaitre un message d'erreur sans vraiment corriger l'erreur?" - Apparemment, tout le monde. -- Raymond Chen.

  13. #13
    Membre averti
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Février 2007
    Messages
    340
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Transports

    Informations forums :
    Inscription : Février 2007
    Messages : 340
    Points : 350
    Points
    350
    Par défaut
    Merci ! Je venais dit arriver
    Par contre, je ne sais toujours pas comment le faire tourner. Dans la doc, ca fait référence à un type IWayPro et pas moyen d'utiliser ce type.

    Question : pourquoi le header est plus gros que le .c ?

    Ralala, j'ai tellement galérer sur ce truc que je vais faire un tuto pour éviter aux autres de se ramasser sur ce genre de chose.

  14. #14
    Expert éminent sénior
    Avatar de Médinoc
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Septembre 2005
    Messages
    27 369
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Septembre 2005
    Messages : 27 369
    Points : 41 519
    Points
    41 519
    Par défaut
    Le .c, c'est juste les GUIDs des interfaces et classes.
    Le .h contient les déclarations des interfaces en C et en C++, ainsi que de toutes leurs méthodes.

    En quoi n'arrives-tu pas à utiliser ?
    L'interface devrait exposer les mêmes fonctions qu'en VB, donc tu devrais pouvoir l'utiliser (tu dois passer le bon IID par contre : Il ne faut plus demander IID_IUnknown).
    SVP, pas de questions techniques par MP. Surtout si je ne vous ai jamais parlé avant.

    "Aw, come on, who would be so stupid as to insert a cast to make an error go away without actually fixing the error?"
    Apparently everyone.
    -- Raymond Chen.
    Traduction obligatoire: "Oh, voyons, qui serait assez stupide pour mettre un cast pour faire disparaitre un message d'erreur sans vraiment corriger l'erreur?" - Apparemment, tout le monde. -- Raymond Chen.

  15. #15
    Membre averti
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Février 2007
    Messages
    340
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Transports

    Informations forums :
    Inscription : Février 2007
    Messages : 340
    Points : 350
    Points
    350
    Par défaut
    En fait, je suis bloqué ici :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    HRESULT r1;
    r1 = CoInitialize(NULL);
    CLSID clsid;
    r1 = CLSIDFromProgID(L"LOXANEPro.Document", &clsid);
    IWayPro *pwayPro = NULL;
    r1 = CoCreateInstance(&clsid, NULL, CLSCTX_LOCAL_SERVER, &LIBID_WayPro,(void**) &pwayPro );
    if(SUCCEEDED(r1))
    {
       pwayPro->Open();
       pwayPro->lpVtbl->Release(pwayPro);
       pwayPro = NULL;
    }
    Il me dit que Open n'existe pas. Désolé si je te fais presque tout coder...

  16. #16
    Expert éminent sénior
    Avatar de Médinoc
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Septembre 2005
    Messages
    27 369
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Septembre 2005
    Messages : 27 369
    Points : 41 519
    Points
    41 519
    Par défaut
    La syntaxe pwayPro->Open();, c'est du C++.
    En C, on fait ainsi:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    pwayPro->lpVtbl->Open(pwayPro);
    C'est un peu plus verbeux mais nécessaire.
    SVP, pas de questions techniques par MP. Surtout si je ne vous ai jamais parlé avant.

    "Aw, come on, who would be so stupid as to insert a cast to make an error go away without actually fixing the error?"
    Apparently everyone.
    -- Raymond Chen.
    Traduction obligatoire: "Oh, voyons, qui serait assez stupide pour mettre un cast pour faire disparaitre un message d'erreur sans vraiment corriger l'erreur?" - Apparemment, tout le monde. -- Raymond Chen.

  17. #17
    Membre averti
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Février 2007
    Messages
    340
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Transports

    Informations forums :
    Inscription : Février 2007
    Messages : 340
    Points : 350
    Points
    350
    Par défaut
    Autant pour moi. Malheureusement ça ne change rien.
    Pourquoi passer pwayPro en paramètre de Open ?

  18. #18
    Expert éminent sénior
    Avatar de Médinoc
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Septembre 2005
    Messages
    27 369
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Septembre 2005
    Messages : 27 369
    Points : 41 519
    Points
    41 519
    Par défaut
    Parce qu'en C, le -> ne suffit pas.
    En C++, c'est fait automatiquement de manière transparente.

    PS: Tu passes bien par lpVtbl aussi ?
    SVP, pas de questions techniques par MP. Surtout si je ne vous ai jamais parlé avant.

    "Aw, come on, who would be so stupid as to insert a cast to make an error go away without actually fixing the error?"
    Apparently everyone.
    -- Raymond Chen.
    Traduction obligatoire: "Oh, voyons, qui serait assez stupide pour mettre un cast pour faire disparaitre un message d'erreur sans vraiment corriger l'erreur?" - Apparemment, tout le monde. -- Raymond Chen.

  19. #19
    Membre averti
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Février 2007
    Messages
    340
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Transports

    Informations forums :
    Inscription : Février 2007
    Messages : 340
    Points : 350
    Points
    350
    Par défaut
    Ok. Les paramètres CoCreateInstance te paraissent bon ?
    J'ai toujours le problème suivant :
    57 U:\distancier_sql\main.c structure has no member named `Open'

  20. #20
    Expert éminent sénior
    Avatar de Médinoc
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Septembre 2005
    Messages
    27 369
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Septembre 2005
    Messages : 27 369
    Points : 41 519
    Points
    41 519
    Par défaut
    Je viens de regarder: Open n'est en effet pas déclaré dans IWayPro, et d'ailleurs semble ne pas exister du tout dans le .idl.

    Par contre, le .idl montre une fonction OpenFile() qui semble n'être disponible que par un accès dynamique via IDispatch (un truc vachement compliqué dans OLE)...

    Et pour toutes les autres interfaces, c'est pareil : IDispatch uniquement...
    SVP, pas de questions techniques par MP. Surtout si je ne vous ai jamais parlé avant.

    "Aw, come on, who would be so stupid as to insert a cast to make an error go away without actually fixing the error?"
    Apparently everyone.
    -- Raymond Chen.
    Traduction obligatoire: "Oh, voyons, qui serait assez stupide pour mettre un cast pour faire disparaitre un message d'erreur sans vraiment corriger l'erreur?" - Apparemment, tout le monde. -- Raymond Chen.

+ Répondre à la discussion
Cette discussion est résolue.
Page 1 sur 2 12 DernièreDernière

Discussions similaires

  1. Réponses: 14
    Dernier message: 27/10/2006, 13h08
  2. Programme fonctionnant sur Eclipse mais pas avec le jar?
    Par kirik dans le forum Eclipse Java
    Réponses: 2
    Dernier message: 10/02/2004, 13h43
  3. Réponses: 11
    Dernier message: 17/03/2003, 10h56
  4. Lancer un programme, mais sur une autre machine
    Par GOUGOU1 dans le forum Réseau
    Réponses: 12
    Dernier message: 08/12/2002, 20h36

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo