Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Основная";
Текущий архив: 2002.09.16;
Скачать: [xml.tar.bz2];

Вниз

Не работает в COMe тип Picture   Найти похожие ветки 

 
sia   (2002-09-03 01:15) [0]

Смысл куска программы в передаче с удаленного компа снимка экрана клиенту (а-ля PCAnywhere и ему подобных)
Приложение компилиться, запускается (сервер тоже, разумеется запущен был ранее, чтобы зарегистрироваться),и при ButtonClick1 показывает ошибку "Критический(в 98)/Разрушительный(в 2000) сбой".
Эта же прога ,но с простыми переменными типа integer(long), String(BSTR) работает. Понимаю, что ответить может быть сложно, но как хотя бы отладить(трассировкой) сервер, если активный проект -клиентский.

На сервере:
function TTestServer.Get_Screen: IPictureDisp;
begin
GetOlePicture(form1.image1.picture,result);
end;

В клиенте:
procedure TForm1.Button1Click(Sender: TObject);
var pic:tpicture;
begin
pic:=Tpicture.Create;
SetOlePicture(pic, srv.Screen); //error
image1.Picture:=pic;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
srv:=CoTestServer.CreateRemote("siacomp");//пока локальный,
//т.е мой
end;


 
Ekaterina   (2002-09-03 08:32) [1]

To test and debug your COM server application,

1 Turn on debugging information using the Compiler tab on the Project|Options dialog box, if necessary. Also, turn on Integrated Debugging in the Tools|Debugger Options dialog.
2 For an in-process server, choose Run|Parameters, type the name of the Automation controller in the Host Application box, and choose OK.
3 Choose Run|Run.
4 Set breakpoints in the Automation server.
5 Use the Automation controller to interact with the Automation server.

The Automation server pauses when the breakpoints are reached.

Note: As an alternate approach, if you are also writing the Automation controller, you can debug into an in-process server by enabling COM cross-process support. Use the General page of the Tools|Debugger Options dialog to enable cross-process support.



Страницы: 1 вся ветка

Форум: "Основная";
Текущий архив: 2002.09.16;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.44 MB
Время: 0.008 c
4-51029
IvanKohut
2002-07-25 10:34
2002.09.16
перехват нажатия Ctrl+Shift+S


1-50800
Bill
2002-09-03 14:44
2002.09.16
Подскажите.


3-50652
BIT
2002-08-27 10:49
2002.09.16
MS SQL & Internet


7-51005
Чайник2
2002-07-04 06:42
2002.09.16
Click


4-51046
Иван
2002-07-24 16:25
2002.09.16
Заблокированный файл





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский