AW: Thread wurde zum 2.Mal eröffnet
24.03.2010 16:11:43
Nepumuk
Hallo,
ich habe ehrlich gesagt kein Interesse daran die DLL bei mir zum Laufen zu bekommen. Ich kenn den Code nicht und sie hat nicht mal eine digitale Signatur. Ist also eher suspekt.
So kann ich sie zumindest ohne Fehler aufrufen, allerdings schmiert mir Excel dabei ab. Und ohne den Code der DLL kann dir, außer dem Programmierer der sie erstellt hat, niemand sagen, was da schief läuft.
Option Explicit
Const WM_APP As Long = 32768
Const WM_EAPI_START_COMPLETED As Long = WM_APP + 1
Private Type TEapiNotifyParams
Msg As Long ' message used to return result
Handle As Long ' main application handle, used to send return result; Handle As Integer
End Type
Private Declare Function GetFocus Lib "user32" _
() As Long
'---------------- Funktionsdeklarationen -------------------------------------------------
'Description:
'Use Connect function to establish connection with server.
'Arguments:
'[in] NotifyParams - used to notify application about method result.
'[in] SSystemUrl - server connection string.
'[in] SLogin - user login name.
'[in] SPassword - user password.
'Return Value:
'If request passed to server successfully then result of this function is S_IAPI_OK.
'Upon method completion on server-side, the message (with parameters taken from NotifyParams)
'will be send to application with pointer to the return value in LParam. Return value is nil (IAPI_TYPE_NILL).
'Summary:
'Used to connect to server.
Private Declare Function Start Lib "C:\Users\Max Kaffl\Desktop\Test\Eapi.dll" ( _
ByRef SystemNotifyParams As TEapiNotifyParams, _
ByVal BaseCurrencyId As Integer, _
ByVal SLogin As String, _
ByVal SPassword As String, _
ByVal SSystemUrl As String) As Long
Sub Dealbook_Start()
Dim params As TEapiNotifyParams
Dim url As String
Dim login As String
Dim password As String
Dim BaseCurrency As Integer
Dim result As Long
params.Msg = WM_EAPI_START_COMPLETED
params.Handle = Application.hwnd
'params.Handle = GetFocus() 'Alternative
url = "http://demo.gftforex.com:8080/naming.ior"
login = "demonachbaur"
password = "siopt321"
BaseCurrency = 0 'Euro
result = Start(params, BaseCurrency, login, password, url)
End Sub
Gruß
Nepumuk