procedure TMainForm.Button9Click(Sender: TObject);
var
s: integer ;
begin
s := strtoint(ComboBox8.Text)*32 + strtoint(ComboBox9.Text) ;
if ComboBox8.Text='' then
begin
ShowMessage('Please select Projector ID');
exit;
end;
if not switchchanel_video(s,4,'')//这里报错
then ShowMessage('Divide error');
end;
这个是用来调用DLL的
声明如下
function switchchanel_video(maxinputchannel,maxoutputchannel:integer; var sendstring:pchar):integer;stdcall;
function switchchanel_video;stdcall; external DLLName;
这到底怎么不一致了啊 最后一个参数我要为空
var
s: integer ;
begin
s := strtoint(ComboBox8.Text)*32 + strtoint(ComboBox9.Text) ;
if ComboBox8.Text='' then
begin
ShowMessage('Please select Projector ID');
exit;
end;
if not switchchanel_video(s,4,'')//这里报错
then ShowMessage('Divide error');
end;
这个是用来调用DLL的
声明如下
function switchchanel_video(maxinputchannel,maxoutputchannel:integer; var sendstring:pchar):integer;stdcall;
function switchchanel_video;stdcall; external DLLName;
这到底怎么不一致了啊 最后一个参数我要为空
解决方案 »
- 关于PageControl关闭后webbrowser未释放
- 请问有没有可以实现一条记录多行编辑的DBGrid控件呢。
- 编写DLL时出一点问题,帮忙看看..
- 我想取出一个字符串(中英文混合)的最后一个字符,right(str,1)不行
- 送分题来了!
- DELPHI C/S 三层 for Help!
- Delphi MlSkin V1.4.1 发布啦! 它能让你的程序拥有像QQ一样多彩炫丽的外观!
- to 7415004(7415004):'在一个贴子里你回复不能超过30次!!'看这里
- 如何编程操作互联网上的SQLSERVER数据库
- BorderStyle=bsNone的窗口,拖动边缘改变大小的问题…………
- can not focus a disabled or invisible window 能屏蔽吗
- 请问如何遍历StringGrid某一列的值,符合条件的删除所在行?
var
s: integer ;
tmpp: PChar;
begin
tmpp := PChar('');
s := strtoint(ComboBox8.Text)*32 + strtoint(ComboBox9.Text) ;
if ComboBox8.Text='' then
begin
ShowMessage('Please select Projector ID');
exit;
end;
if not switchchanel_video(s,4,tmpp )
then ShowMessage('Divide error');
end;
[Fatal Error] Could not compile used unit 'BD100TEST.pas'
var
s,ret: integer ;
temp : PChar;
begin
temp := PChar('') ;
s := strtoint(ComboBox8.Text)*32 + strtoint(ComboBox9.Text) ;
if ComboBox8.Text='' then
begin
ShowMessage('Please select Projector ID');
exit;
end;
if ComboBox9.Text='' then
begin
ShowMessage('Please select Projector ID');
exit;
end;
ret := switchchanel_video(s,4,temp);
if ret = 0
then ShowMessage('Divide error');
end;
这样编译是没有问题了,但为什么运行到下面begin就停止了?
begin
Application.Initialize;
Application.CreateForm(TMainForm, MainForm);
Application.Run;
end.