[pascal]library display;
uses
Windows,
SysUtils;
procedure SetResolution(HorizR:Integer;VertR:Integer;AddR:In teger) cdecl;
external 'Resolution.dll' name 'SetResolution';
function _set320x240Char; cdecl;
begin
SetResolution(320,240,4);
end;
function _set640x480Char; cdecl;
begin
SetResolution(640,480,4);
end;
function _set800x600Char; cdecl;
begin
SetResolution(800,600,4);
end;
function _set1024x768Char; cdecl;
begin
SetResolution(1024,768,4);
end;
function _set1280x1024Char; cdecl;
begin
SetResolution(1280,1024,4);
end;
function _set1600x1200Char; cdecl;
begin
SetResolution(1600,1200,4);
end;
function _set1280x800Char; cdecl;
begin
SetResolution(1280,800,4);
end;
function _set1024x600Char; cdecl;
begin
SetResolution(1024,600,4);
end;
function _set1366x768Char; cdecl;
begin
SetResolution(1366,768,4);
end;
exports _set320x240;
exports _set640x480;
exports _set800x600;
exports _set1024x768;
exports _set1280x1024;
exports _set1600x1200;
exports _set1280x800;
exports _set1024x600;
exports _set1366x768;
begin end.[/pascal]
Here you go. This is a wrapper dll I made for a resolution change dll.
The problem is that I want the 'resolution.dll' path and filename to be able to change dynamically by passing my own filepath as a string.
e.g.
[pascal]
procedure SetResolution(HorizR:Integer;VertR:Integer;AddR:In teger) cdecl;
external 'Resolution.dll' name 'SetResolution';[/pascal]
to something like:
[pascal]
var dllNametring;
procedure SetResolution(HorizR:Integer;VertR:Integer;AddR:In teger) cdecl;
external dllName name 'SetResolution';[/pascal]
The above does not work.
Bookmarks