Seite 1 von 1

Beckhoff tcAdsDll.dll Probleme mit Lib Funktionsnamen

Verfasst: 15.07.2012 14:20
von Dristar
Hallo PureBasic Gemeinde,

Mein System: PureBasic 4.60 X86 ; WindowsXP und Windows7

Ich möchte die Beckhoff Dll für eine eigene HMI hernehmen. Mein Problem geht schon bei den Funktionsnamen los.

PureBasic Code:

Code: Alles auswählen


OpenLibrary(0,"tcAdsDll.dll")

If ExamineLibraryFunctions(0)
  While NextLibraryFunction()
    Debug LibraryFunctionName()
    Debug LibraryFunctionAddress()
  Wend
Else
  Debug "Funktionen können nicht ermittelt werden"
EndIf
Rausgekommen ist :
  • ?AdsAmsRegisterRouterNotificationEx@@YGJJP6GXJK@ZK@Z
    268446541
    ?AdsAmsUnRegisterRouterNotificationEx@@YGJJ@Z
    268446612
    ?AdsLogFmtString@@YAJPBDK0ZZ
    268445272
    ?AdsSetServerSocketPort@@YGJG@Z
    268445295
    ?AdsSetThreadPriority@@YGXJ@Z
    268446664
    _AdsAmsPortEnabled@4
    268445453
    _AdsAmsPortEnabledEx@8
    268446520
    _AdsAmsRegisterRouterNotification@4
    268445322
    _AdsAmsUnRegisterRouterNotification@0
    268445388
    _AdsGetDllVersion@0
    268443946
    _AdsGetLastError@0
    268445312
    _AdsGetLocalAddress@4
    268444126
    _AdsGetLocalAddressEx@8
    268445497
    _AdsPortClose@0
    268444116
    _AdsPortCloseEx@4
    268445480
    _AdsPortOpen@0
    268444106
    _AdsPortOpenEx@0
    268445470
    _AdsSyncAddDeviceNotificationReq@28
    268445057
    _AdsSyncAddDeviceNotificationReqEx@32
Mit GetFunction und dem Funktionsnamen "AdsSyncAddDeviceNotificationReqEx" bekomme ich keinen Pointer. Was mache ich Falsch ? Bei anderen Lib's geht
es und ich habe nicht die komischen Zeichen "_ NAME @32".

Danke

Gruß Dristar

Re: Beckhoff tcAdsDll.dll Probleme mit Lib Funktionsnamen

Verfasst: 15.07.2012 14:40
von ts-soft
Teste mal:

Code: Alles auswählen

Prototype AdsSyncAddDeviceNotificationReqEx(a.l, b.l, c.l, d.l)

If OpenLibrary(0, "tcAdsDll.dll")
  Define AdsSyncAddDeviceNotificationReqEx.AdsSyncAddDeviceNotificationReqEx = GetFunction(0, "_AdsSyncAddDeviceNotificationReqEx@32")
  Debug AdsSyncAddDeviceNotificationReqEx
EndIf

Re: Beckhoff tcAdsDll.dll Probleme mit Lib Funktionsnamen

Verfasst: 15.07.2012 17:09
von Dristar
@TS-Soft

:) Danke so geht es . Nur warum wird die Dll in PureBasic nicht richtig angezeigt ? Das gleiche ist auch bei PB4.61

Gruß Dristar

Re: Beckhoff tcAdsDll.dll Probleme mit Lib Funktionsnamen

Verfasst: 15.07.2012 17:19
von ts-soft
Dristar hat geschrieben:Nur warum wird die Dll in PureBasic nicht richtig angezeigt ?
Sie wird doch richtig angezeigt. Die Dekorationen sind doch vorhanden, also müssen
Sie auch angegeben werden. Ausnahme wäre bei einer ImportLib, da kann man dann
unter Umständen darauf verzichten.
Die Funktionen mit ? und doppeltem @ sind keine Funktionen, die der C-API entsprechen
und lassen sich nicht ohne weiteres nutzen, sollte aber auch nicht nötig sein.