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
|
#include <stdio.h>
#include <windows.h>
#include <comdef.h>
#import "C:\Program Files\Citect\CitectSCADA\Bin\CTDRAW32.TLB"
const IID IID_IRadio = {0x33A55B2B,0x55FC,0x4632,{0xBC,0xF0,0x4D,0xE3,0xC5,0x1F,0xD0,0x48}};
const CLSID CLSID_Radio = {0x33A55B2B,0x55FC,0x4632,{0xBC,0xF0,0x4D,0xE3,0xC5,0x1F,0xD0,0x48}};
int good(void)
{
HRESULT hr;
GraphicsBuilder::IGraphicsBuilder* pRadio;
// IRadio* pRadio;
//_bstr_t strStation("TEST");
hr = CoCreateInstance(CLSID_Radio, // CLSID du composant
NULL, // --> Sert pour l'aggrégation !
CLSCTX_ALL, // indique quoi rechercher (dll, exe, distant)
IID_IRadio, // interface
(void**)&pRadio); // objet retourné
if (FAILED(hr)) return -1;
// Utilisation du composant ...
pRadio->put_Visible(true);
pRadio->PageNew("include", "standard", "normal",0,1,1);
CoUninitialize();
return 0;
}
int main(void)
{
printf("Ca va Marcher\n on y croit...\n");
printf("\nresultat: %i\n",good());
return 0;
} |
Partager