|
-
June 1st, 1999, 11:00 PM
#1
required winapi32 description
Where or how to i get a description of the winapi32 for VB.
Thanks!
-
June 2nd, 1999, 12:04 AM
#2
Re: required winapi32 description
You could use the API loaded that comes with VB.
It can also be accessed from start->prog.. menu.
or locate Apiload.exe under VB's inst. folder
There is also a type library for all WinAPIs. I dont know where to get it from. Also, i am told, there are more troubles with this Typelib than API loader's declarations.
Ravi
-
June 2nd, 1999, 12:43 AM
#3
Re: required winapi32 description
the api viewer does not tell you what does the function do
-
June 2nd, 1999, 01:11 AM
#4
Re: required winapi32 description
To know what the Win32 API does, you have to look at MSDN. They are the OS fns, and not VBs, right?
Onsite source : Got to MSDN msdn.microsoft.com then Library->Library Home. Click on Platform SDK and you will find Win32API sectn
Take a look at the opinion expressed by Klaus H. Probst, " Let VB Hook into the OS", at
http://www.vb-zone.com/free/opinion.asp.
-
June 2nd, 1999, 01:33 AM
#5
Re: required winapi32 description
-
June 2nd, 1999, 02:48 AM
#6
Re: required winapi32 description
hi Ravi,
do you know how to use the API function GetSystemTime?
how to i use it? i have tried it but there is an error and i do not know how to solve it
Compile Error:
Variable required - can't assign to this expression
Thanks.
-
June 2nd, 1999, 03:16 AM
#7
Re: required winapi32 description
Hi,
You should have incl. your code...
Anyway, this is how i defined and used: (This is as-is from API Viewer)
Type SYSTEMTIME
wYear as Integer
wMonth as Integer
wDayOfWeek as Integer
wDay as Integer
wHour as Integer
wMinute as Integer
wSecond as Integer
wMilliseconds as Integer
End Type
Declare Sub GetSystemTime Lib "kernel32" (lpSystemTime as SYSTEMTIME)
public Sub MySysTime()
Dim tmpSystime as SYSTEMTIME
GetSystemTime tmpSystime
With tmpSystime
Debug.print "System time dd/mm/yyyy), day, hh:mm:ss";
Debug.print Str(.wDay) & "/" & Str(.wMonth) & "/" & Str(.wYear);
Debug.print " " & Str(.wDayOfWeek) & ",";
Debug.print Str(.wHour) & ":" & Str(.wMinute) & ":" & Str(.wSecond);
End With
End Sub
and the trace generated is like this:
System Time dd/mm/yyyy), day, hh:mm:ss 2/ 6/ 1999 3, 16: 55: 33
which indeed is correct.
Ravi
ps: A WORD (2bytes) in C is an Integer in VB, which is also 2 bytes
-
June 2nd, 1999, 03:34 AM
#8
Re: required winapi32 description
thanks Ravi butwhen i tried it the hour seem to be difference from what is expected
that is my computer time is 04:27 and the result i obtained is 08:27
how to i solve this problem?
-
June 2nd, 1999, 04:06 AM
#9
Re: required winapi32 description
interesting!!..
But, on my system there is no diff. I just tested again!!
There is another function called GetLocalTime
It also has just the same syntax of GetSystemtime.
and MSDN doesn't say anything about what is the difference between them?
Run both, one after other and check the results!!
On my system, both gave same values.
Ravi
-
June 2nd, 1999, 04:18 AM
#10
Re: required winapi32 description
thanks alot Ravi
getlocaltime give me the correct result
-
June 2nd, 1999, 09:49 AM
#11
Re: required winapi32 description
Hi
It sounds like that GetLocaleTime gives you the local time setting (for me, that's Central European Time + 1), and the other one gives you the CET (or maybe it gives you the bios time)
Crazy D :-)
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
|