Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

acess MSVCRT.DLL

Status
Not open for further replies.

MickTheBelgian

Programmer
Jan 11, 2001
160
DK
I try to get a pointer to a localtime. VB says I use the wrong kind of arguments. (err 49, bad calling convention)What do I do wrong? Original C++ function included as comment:

Private Const ExampleTime_t As Long = 1035655310
Private Declare Function LocalTime Lib "MSVCRT.DLL" Alias "localtime" (ByRef GMT As Long) As Long
'struct tm *cdecl localtime (const time_t *ptime)

Private Sub Command1_Click()
Dim pt As Long 'pointer
pt = LocalTime(ExampleTime_t)
MsgBox pt
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top