|
-
February 18th, 2000, 05:43 PM
#1
What is the best way to see what is being returned by API call.......
Is it string? number? value? boolean? what's the best way?
-
February 18th, 2000, 05:50 PM
#2
Re: What is the best way to see what is being returned by API call.......
usually the API declaration will tell you what's coming back, but if you're not sure, then use the TypeName operator...
'API Declaration
Dim vReturnValue 'dont' type the variable - it may impact the typename function later
vReturnValue = API Function
MsgBox TypeName(vReturnValue)
That should tell you the type. I have never had to wonder, so I haven't used this code. But that would be my guess as to how to figure it out. Or you could use things like IsNumeric to see if it's all numbers or not.
Hope this helps,
John
John Pirkey
MCSD
www.ShallowWaterSystems.com
John Pirkey
MCSD (VB6)
http://www.stlvbug.org
-
February 19th, 2000, 05:55 AM
#3
Re: What is the best way to see what is being returned by API call.......
Most API's return a long, which works either as boolean (non-zero or zero, succes or failed). Sometimes it returns when non-zero the number of characters, sometimes it's a handle. But almost always a long...
Since you need to declare your api calls, you should be able to see what it returns.. and if everything else fails, msdn.m$.com is kinda slow, but says it all....
Crazy D :-)
"One ring rules them all"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|