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