Armenian Knowledge Base  

Go Back   Armenian Knowledge Base > Technical sections > Languages, Compilers, Interpreters
Register

Reply
 
LinkBack Thread Tools
Old 07.09.2003, 19:44   #1
ppz kkz
 
Davit's Avatar
 
Join Date: 03 2003
Location: at home
Age: 33
Posts: 111
Downloads: 0
Uploads: 0
Reputation: 19 | 3
Post vopros API

Kak mojno uznat' , zaregestrirovan OCX v systeme ili net ?
Est' li konkretnaya funkciya dlya etovo ?
Reply With Quote
Old 07.09.2003, 20:16   #2
Академик
 
greka's Avatar
 
Join Date: 09 2001
Location: inside myself
Posts: 5,369
Downloads: 0
Uploads: 0
Reputation: 18 | 5
Default

I can't remember the right one, 'cose no MSDN available for me at the moment, but!

Look in MSDN for words:

regsvr32 registered OCX
Reply With Quote
Old 08.09.2003, 05:15   #3
Грустно...
 
Agregat's Avatar
 
Join Date: 08 2002
Location: Там, где всегда идут дожди
Age: 35
Posts: 21,717
Downloads: 2
Uploads: 0
Reputation: 250 | 7
Default

если известен GUID контрола, то могу посоветовать копнуть в реестре.
Reply With Quote
Old 08.09.2003, 10:50   #4
ppz kkz
 
Davit's Avatar
 
Join Date: 03 2003
Location: at home
Age: 33
Posts: 111
Downloads: 0
Uploads: 0
Reputation: 19 | 3
Default

vrodi by rabotaet ...


CoInitialize (NULL);
COleDispatchDriver disp;

if (disp.CreateDispatch("IMInstall.IMInstall.2", NULL))
{
}
else
AfxMessageBox("Not found");


disp.ReleaseDispatch();
CoUninitialize();


no neznayu naskolko pravilno ))
Reply With Quote
Old 08.09.2003, 10:58   #5
Грустно...
 
Agregat's Avatar
 
Join Date: 08 2002
Location: Там, где всегда идут дожди
Age: 35
Posts: 21,717
Downloads: 2
Uploads: 0
Reputation: 250 | 7
Default

все ок, просто наверное стоит сделать так
PHP Code:
try
{
... 
//твой код.
}
catch (
COleDispatchException e)
{
  
e->delete;

Reply With Quote
Old 08.09.2003, 20:37   #6
ppz kkz
 
Davit's Avatar
 
Join Date: 03 2003
Location: at home
Age: 33
Posts: 111
Downloads: 0
Uploads: 0
Reputation: 19 | 3
Default

da v MSDN-e bylo napisano imenno tak , kak ti napisal
Reply With Quote
Old 16.09.2003, 15:43   #7
Бакалавр
 
Join Date: 03 2002
Location: Detroit, MI, USA
Posts: 482
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Default

A mozhno re****' zadachu i bez vsyakix bibliotek. CoCreateInstance spaset otca russkoj demokratii. I s exceptions vozit'sya ne nado.
Reply With Quote
Old 16.09.2003, 17:45   #8
Академик
 
greka's Avatar
 
Join Date: 09 2001
Location: inside myself
Posts: 5,369
Downloads: 0
Uploads: 0
Reputation: 18 | 5
Default

Quote:
Originally posted by Tumanyan
A mozhno re****' zadachu i bez vsyakix bibliotek. CoCreateInstance spaset otca russkoj demokratii. I s exceptions vozit'sya ne nado.
ne slishkom li mnogo nagruzki na sistemu iz-za "CoCreateInstance" ?
podgruzka odnoj ili neskol'kix DLL-ok, a ..?
Reply With Quote
Old 17.09.2003, 09:13   #9
Грустно...
 
Agregat's Avatar
 
Join Date: 08 2002
Location: Там, где всегда идут дожди
Age: 35
Posts: 21,717
Downloads: 2
Uploads: 0
Reputation: 250 | 7
Default

для CoCreateInstance-а требуется знание GUID-a, правда, который можно спок ойно получить по названию видимо этой CLSIDFromProgID функцией...
Reply With Quote
Old 19.09.2003, 16:27   #10
Бакалавр
 
Join Date: 03 2002
Location: Detroit, MI, USA
Posts: 482
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Default

Quote:
Originally posted by Greco El
ne slishkom li mnogo nagruzki na sistemu iz-za "CoCreateInstance" ?
podgruzka odnoj ili neskol'kix DLL-ok, a ..?
Takaya zhe kak i vo vremya CreateDispatch. Skoree vsego, gde-to vnutryax CreateDispatch i vyzyvaet CoCreateInstance.

Da, chut' ne zabyl, posle CoCreateInstance ne zabud'te sdelat' Release.

V principe, CLSIDFromProgID dolzhen dostatochno dostoverno pokazyvat' nalichie ili otsutstvie COM ob'ekta v sisteme. Konechno, esli zloumyshlennig zaregistriruet ob'ekt a potom unichtozhet binarnyj obraz - eto ne srabotaet. No my zhe rassmatrivaem igru po pravilam?
__________________
Hovhannes Tumanyan,
CISSP
Reply With Quote
Old 19.09.2003, 16:29   #11
Бакалавр
 
Join Date: 03 2002
Location: Detroit, MI, USA
Posts: 482
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Default

Quote:
Originally posted by Agregat
для CoCreateInstance-а требуется знание GUID-a, правда, который можно спок ойно получить по названию видимо этой CLSIDFromProgID функцией...
Voobsche-to podobnye shtuki (CLSIDFromProgID) luchshe ne delat'. Luchshe staticheski zabivat' CLSIDy. V konce koncov, pri importe TLB oni poyavlyayutsya v header-e v vide konstant.
Edinstvennyj sluchaj, kogda bez ProgID ne obojtis'rozrachnaya rabota s raznymi versiyami togo zhe samogo ob'ekta.
Reply With Quote
Old 01.10.2003, 10:43   #12
Banned
 
Forever Child's Avatar
 
Join Date: 10 2001
Location: ...осень колибри
Age: 37
Posts: 7,487
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Default Re: vopros API

Quote:
Originally posted by Davit
Kak mojno uznat' , zaregestrirovan OCX v systeme ili net ?
Est' li konkretnaya funkciya dlya etovo ?
Звучит интересно - "Вопрос API". Крошка API к отцу пришел и спросила кроха...
Reply With Quote
Old 03.10.2003, 15:06   #13
ppz kkz
 
Davit's Avatar
 
Join Date: 03 2003
Location: at home
Age: 33
Posts: 111
Downloads: 0
Uploads: 0
Reputation: 19 | 3
Default

takoe mog podumat' tolko ty - NAVSEGDA MALEN'KIY
Reply With Quote
Old 03.10.2003, 15:23   #14
Banned
 
Forever Child's Avatar
 
Join Date: 10 2001
Location: ...осень колибри
Age: 37
Posts: 7,487
Downloads: 0
Uploads: 0
Reputation: 0 | 0
Default ...

Quote:
Originally posted by Davit
takoe mog podumat' tolko ty - NAVSEGDA MALEN'KIY
Каждый вопрос нужно рассматривать с нескольких точек зрения...
Reply With Quote
Sponsored Links
Reply

Thread Tools


На правах рекламы:
реклама

All times are GMT. The time now is 19:34.


Powered by vBulletin® Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.