Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Passing a number variable to a COM Object throws an Exception

1 view
Skip to first unread message

Dioni

unread,
Sep 25, 2002, 9:30:39 PM9/25/02
to
Hi,
I tried to pass a NUMBER/LONG variable to a COM Object, but it always
throws an Exception.

Code sample:

NUMBER nCount;
OBJECT AnObject;

begin
try
set AnObject = CreateObject("COMName.COMObject");
nCount = 1;
MessageBox(AnObject.Item(nCount).Name, WARNING); // this throws
Exception
catch
// something to do
endcatch;
end;

while substituting the variable with a plain number directly will work
ok.
I've tried to use LOWORD(nCount), but to no avail.
The dll is written in C++.

anyone have idea of what's going on?
any help would be mucchh appreciated!

thanx,
dioni

Milan Negovan

unread,
Oct 5, 2002, 12:46:03 AM10/5/02
to
What exactly does the exception message say?
0 new messages