Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OLE status code (last 16 bits of return code) how to che
Message
From
01/07/2003 06:04:51
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
01/07/2003 02:36:43
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00805583
Message ID:
00805620
Views:
39
>Hi,
>
>Im accessing a COM Lib that has a funtion that returns a status code if the
>user aborts or is sucessfull in completing the function. This status code is contained in "return code" (the last 16 bits of the return code). The parameter to call funtions is the active window. How do I check the return code?
>
>Thanks
>
>Gary
DECLARE RtlMoveMemory IN WIN32API ;
	Integer @DestNumeric, ;
	STRING @pVoidSource, ;
	INTEGER nLength
lnCode = 0
RtlMoveMemory(@lnCode, right(lcReturnCode,4), 4)
? lnCode
You could do this w/o winAPI too :
lcRetCode = right(lcReturnCode,4)
lnRetCode = 0
for ix=1 to 4
  lnRetCode = lnRetCode + asc(substr(lcRetCode,ix))*256^(ix-1)
endfor
? lnRetCode
Cetin

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform