1
我需要用win32帮助来欺骗事件数组。语言:Ada。初始化一系列事件,win32,ada
我做什么:
p:integer := 4;
Type EvArr1 is array (1..p) of HANDLE;
procedure Start (Tid : in integer) is
Task T1;
task body T1 is
Bl:bool;
temp:Dword;
...
begin
...
Bl:=(EvArr1(Tid));
temp:=WaitForMultipleObjects(EvArr1, infinite);
...
end T1;
end start;
BEGIN
...
for i in 1..p loop
EvArr1(i) := CreateEvent(null, 1, 0, null); -- error
EvArr2(i) := CreateEvent(null, 1, 0, null); -- error
start(i);
end loop;
错误:
The types are not convertible; the operand type must be an array type, Continuing
更多信息所需的全面诊断。很可能你的CreateEvent函数没有返回HANDLE类型的东西。 – NWS 2012-04-21 13:36:25
ps,你的任务也看起来有点奇怪,建议你看看这个(http://en.wikibooks.org/wiki/Ada_Programming/Tasking) – NWS 2012-04-21 13:39:07