Beckhoff tcAdsDll.dll Probleme mit Lib Funktionsnamen

Für allgemeine Fragen zur Programmierung mit PureBasic.
Dristar
Beiträge: 72
Registriert: 13.09.2004 12:46

Beckhoff tcAdsDll.dll Probleme mit Lib Funktionsnamen

Beitrag 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
PB 4.61 Beta 1 , Linux Ubuntu 11.10 ...
Benutzeravatar
ts-soft
Beiträge: 22292
Registriert: 08.09.2004 00:57
Computerausstattung: Mainboard: MSI 970A-G43
CPU: AMD FX-6300 Six-Core Processor
GraKa: GeForce GTX 750 Ti, 2 GB
Memory: 16 GB DDR3-1600 - Dual Channel
Wohnort: Berlin

Re: Beckhoff tcAdsDll.dll Probleme mit Lib Funktionsnamen

Beitrag 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
PureBasic 5.73 LTS | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Nutella hat nur sehr wenig Vitamine. Deswegen muss man davon relativ viel essen.
Bild
Dristar
Beiträge: 72
Registriert: 13.09.2004 12:46

Re: Beckhoff tcAdsDll.dll Probleme mit Lib Funktionsnamen

Beitrag 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
PB 4.61 Beta 1 , Linux Ubuntu 11.10 ...
Benutzeravatar
ts-soft
Beiträge: 22292
Registriert: 08.09.2004 00:57
Computerausstattung: Mainboard: MSI 970A-G43
CPU: AMD FX-6300 Six-Core Processor
GraKa: GeForce GTX 750 Ti, 2 GB
Memory: 16 GB DDR3-1600 - Dual Channel
Wohnort: Berlin

Re: Beckhoff tcAdsDll.dll Probleme mit Lib Funktionsnamen

Beitrag 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.
PureBasic 5.73 LTS | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Nutella hat nur sehr wenig Vitamine. Deswegen muss man davon relativ viel essen.
Bild
Antworten