Re: correction objects and call external [message #29272] |
Tue, 12 February 2002 12:17 |
Gert
Messages: 11 Registered: December 2001
|
Junior Member |
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 5.50.4912.300" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Off course the last function must contain self.hComm=Temp (in
stead of self.hComm=0l)</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> </DIV>
<DIV><BR></DIV></FONT>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Gert" <<A
href="mailto:gert.van.de.wouwer@NO_SPAMpandora.be">gert.van.de.wouwer@NO_SPAMpandora.be </A>>
wrote in message <A
href="news:SJea8.136468$rt4.12914@afrodite.telenet-ops.be">news:SJea8.136468$rt4.12914@afrodite.telenet-ops.be</A>...</DIV>
<DIV><FONT size=2>hi,</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>I try to use a call_external in an object method like
this:</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT face="Times New Roman" size=2>pro MCP2000__DEFINE<BR> struct =
{MCP2000, hComm: 0l, status: 0l}<BR>end<BR></FONT></DIV>
<DIV><FONT face="Times New Roman" size=2>function MCP2000::Init<BR>self.hComm
= 0l<BR>return, 1<BR>end<BR></FONT></DIV>
<DIV><FONT face="Times New Roman" size=2>function
MCP2000::InitPort<BR> self.status=call_external('D:\Cpp\SerCommDll\Debug\SerCommDl l.dll','InitPortDll',$ <BR> /PORTABLE,'COM1',self.hComm
,/UNLOAD)<BR>return, self.status<BR>end<BR></FONT></DIV>
<DIV><FONT size=2>the idea is here that self.hComm contains a valid handle,
but it doesnt - it stays zero.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>However, this works</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT face="Times New Roman" size=2>function
MCP2000::InitPort</FONT></DIV>
<DIV><FONT face="Times New Roman"
size=2>Temp=0l<BR> self.status=call_external('D:\Cpp\SerCommDll\Debug\SerCommDl l.dll','InitPortDll',$ <BR>
/PORTABLE,'COM1',Temp,/UNLOAD)</FONT></DIV>
<DIV><FONT face="Times New Roman" size=2>self.hComm=0l<BR>return,
self.status<BR>end</FONT></DIV>
<DIV><FONT face="Times New Roman"></FONT> </DIV>
<DIV><FONT size=2>any ideas what goes wrong in the first
function????</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Gert</FONT></DIV>
<DIV><FONT size=2></FONT><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV></BLOCKQUOTE></BODY></HTML >
|
|
|