![]() |
Hilfe bei Steam API Wrappers
Hallo,
ich wollte die Steam API Wrappers mit Delphi XE6 austesten ( ![]()
Delphi-Quellcode:
unit test;
interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls; type TForm1 = class(TForm) Label1: TLabel; Button1: TButton; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; Type MyFunction = Function(CustomUrl : PChar) : DWORD; Stdcall; Const APIload = 'steam_api.dll'; PassString : String = 'http://forum.lazarus.freepascal.org'; var Form1: TForm1; Function SteamAPI_Init : Boolean; cdecl; External APIload; // Tried even with stdcall implementation {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); begin If SteamAPI_Init = True Then ShowMessage('ok'); end; end. Das Programmverzeichnis sieht so aus: CSteamworks.dll libCSteamworks.so SteamAPI.pas test.dfm test.dpr test.dproj test.pas Das Programm wird fehlerlos kompiliert, beim Start erscheint jedoch die Form nicht und das Programm kehrt zum Editor zurück. |
AW: Hilfe bei Steam API Wrappers
Projekt / Optionen / Formulare / bei Automatisch erzeugen sollte dein Formular Form1 drinstehen.
|
AW: Hilfe bei Steam API Wrappers
Leider nicht.
Delphi-Quellcode:
Sicherheitshalber habe ich es nochmal neu erstellt. Es startet (Form erscheint) bis ich diese Line einfüge:
program test;
uses Vcl.Forms, test in 'test.pas' {Form1}, SteamAPI in 'SteamAPI.pas'; {$R *.res} begin Application.Initialize; Application.MainFormOnTaskbar := True; Application.CreateForm(TForm1, Form1); Application.Run; end. Function SteamAPI_Init : Boolean; cdecl; External APIload; |
AW: Hilfe bei Steam API Wrappers
[QUOTE=Bubble;1309893]Hallo,
Delphi-Quellcode:
Muss bei der Definition nicht noch der Name der Funktion angegeben werden?
unit test;
Function SteamAPI_Init : Boolean; cdecl; External APIload; // Tried even with stdcall end. Function SteamAPI_Init : Boolean; cdecl; External APIload name 'SteamAPI_?????'; steam_api.dll wird auch gefunden? cu |
AW: Hilfe bei Steam API Wrappers
[QUOTE=zagota;1309898]
Zitat:
Function SteamAPI_Init : Boolean; cdecl; External 'Steam_api.dll'; Also APIload mit 'Steam_api.dll' ersetzt. Jetzt bekomme ich die Fehlermeldung, dass er die DLL nicht findet. Sie ist aber sowohl im System32 Verzeichnis von Windows, als auch in dem Programmverzeichnis. |
AW: Hilfe bei Steam API Wrappers
Zitat:
|
AW: Hilfe bei Steam API Wrappers
Zitat:
Zitat:
|
AW: Hilfe bei Steam API Wrappers
[QUOTE=Bubble;1309905]
Zitat:
Function SteamAPI_Init : Boolean; cdecl; External 'Steam_api.dll' name 'Name der Funktion die aufgerufen werden soll'; In deinem ersten Post war die Steam_api.dll aber nicht aufgeführt. cu |
AW: Hilfe bei Steam API Wrappers
Zitat:
|
AW: Hilfe bei Steam API Wrappers
Zitat:
Würde eh über LoadLibrary() und GetProcAddress() gehen. cu |
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:37 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz