Hd can module programmer’s guide (windows) – Hatteland Display HT B22 (Fanless) User Manual

Page 8

Advertising
background image

DOC101357-1_ - rev 2 – 2013-09-23 - Created by:6644

Page 8 of 25

Hatteland Display AS, Åmsosen, N-5578 Nedre Vats, Norway

Tel: (+47) 4814 2200 - [email protected] - www.hatteland-display.com

HD CAN Module Programmer’s Guide (Windows)

All intellectual properties belongs to Hatteland Display AS

PassThruGetStatus_t PassThruGetStatus

;

PassThruReset_t PassThruReset

;

_J2534_ERROR_CODE err

;


bool

freeLib

()

{

if

(

NULL

!=

dllLib

)

{

if

(

FreeLibrary

(

dllLib

)

==

NULL

)

{

return

false

;

}

dllLib

=

NULL

;

}

return

true

;

}

bool

loadLib

()

{

#ifdef _WIN64

dllLib

=

LoadLibrary

(

TEXT

(

"HDJ2534x64.dll"

));

#else

dllLib

=

LoadLibrary

(

TEXT

(

"HDJ2534x86.dll"

));

#endif

if

(

dllLib

==

NULL

)

{

cout

<<

"Unable to load DLL!"

<<

endl

;

return

false

;

}


PassThruOpen

=

(

PassThruOpen_t

)

GetProcAddress

(

dllLib

,

"PassThruOpen"

);

PassThruClose

=

(

PassThruClose_t

)

GetProcAddress

(

dllLib

,

"PassThruClose"

);

PassThruConnect

=

(

PassThruConnect_t

)

GetProcAddress

(

dllLib

,

"PassThruConnect"

);

PassThruDisconnect

=

(

PassThruDisconnect_t

)

GetProcAddress

(

dllLib

,

"PassThruDisconnect"

);

PassThruReadMsgs

=

(

PassThruReadMsgs_t

)

GetProcAddress

(

dllLib

,

"PassThruReadMsgs"

);

PassThruWriteMsgs

=

(

PassThruWriteMsgs_t

)

GetProcAddress

(

dllLib

,

"PassThruWriteMsgs"

);

PassThruGetLastError

=

(

PassThruGetLastError_t

)

GetProcAddress

(

dllLib

,

"PassThruGetLastError"

);

PassThruStartPeriodicMsg

=

(

PassThruStartPeriodicMsg_t

)

GetProcAddress

(

dllLib

,

"PassThruStartPeriodicMsg"

);

PassThruStopPeriodicMsg

=

(

PassThruStopPeriodicMsg_t

)

GetProcAddress

(

dllLib

,

"PassThruStopPeriodicMsg"

);

PassThruStartMsgFilter

=

(

PassThruStartMsgFilter_t

)

GetProcAddress

(

dllLib

,

"PassThruStartMsgFilter"

);

PassThruStopMsgFilter

=

(

PassThruStopMsgFilter_t

)

GetProcAddress

(

dllLib

,

"PassThruStopMsgFilter"

);

PassThruIoctl

=

(

PassThruIoctl_t

)

GetProcAddress

(

dllLib

,

"PassThruIoctl"

);

Advertising