Discussions related to Visual Prolog
Faddey
Posts: 15
Joined: 11 Mar 2018 16:09

The Delphi application uses a GUI dll created in Visual Prolog 11

Unread post by Faddey »

The Delphi application uses a GUI dll created in Visual Prolog 11.
When calling the show() method in the implementation of the pfc\gui\dialog class, an error occurs:
ExtraInfo = win_SetIcon: Cannot find icon. rId: : '9012'
error code = 6052

vpi_iconNotFound (vpi)
vpi_error::vpiExceptionRaiser
pfc\vpi\vpi_native\vpi_error.pro(9,9)
----------------------------------------
d:\vip11x\pfc\exception\exception.pro(197)
D:\Terminal\My work folder\T-800\vipKernel.dll (0x1400982B)
d:\vip11x\pfc\exception\exception.pro(197)
d:\vip11x\pfc\vpi\vpi_native\vpi_error.pro(9)
D:\Terminal\My work folder\T-800\vipVpi.dll (0x72C6FE46)
D:\Terminal\My work folder\T-800\vipVpi.dll (0x72C6FEDB)
D:\Terminal\My work folder\T-800\vipVpi.dll (0x72C66440)
d:\vip11x\pfc\gui\window.pro(350)
d:\vip11x\pfc\gui\window.pro(105)
d:\vip11x\pfc\gui\window.pro(1942)
d:\vip11x\pfc\gui\guisupport\toplevelcontainerwindowsupport.pro(125)
D:\Terminal\My work folder\T-800\vipKernel.dll (0x14009C65)
D:\Terminal\My work folder\T-800\vipVpi.dll (0x72C7369D)
D:\Terminal\My work folder\T-800\vipVpi.dll (0x72C7449E)
D:\Terminal\My work folder\T-800\vipVpi.dll (0x72C747B2)
D:\Terminal\My work folder\T-800\vipVpi.dll (0x72C727FA)
D:\Terminal\My work folder\T-800\vipVpi.dll (0x72C7BEF4)
C:\Windows\System32\USER32.dll (0x7577199B)
C:\Windows\System32\USER32.dll (0x75764D1E)
C:\Windows\System32\USER32.dll (0x75764410)
C:\Windows\System32\USER32.dll (0x75764235)
C:\Windows\System32\USER32.dll (0x7577199B)
C:\Windows\System32\USER32.dll (0x75767DBA)
C:\Windows\System32\USER32.dll (0x757679BA)
C:\Windows\System32\USER32.dll (0x7576BEBF)
C:\Windows\SYSTEM32\ntdll.dll (0x771650DD)
C:\Windows\System32\USER32.dll (0x7575F4D6)
C:\Windows\System32\USER32.dll (0x7575D4E5)
C:\Windows\System32\USER32.dll (0x7575C86B)
D:\Terminal\My work folder\T-800\vipVpi.dll (0x72C6318F)
d:\vip11x\pfc\gui\guisupport\toplevelcontainerwindowsupport.pro(83)
d:\vip11x\la\tablet\sitmap\sitmap.pro(870)
export.pro(131)
export.pro(36).

The show() method in pfc is implemented as:
clauses
show() :-
if wd_modeLess = modal_fact and isIconUnset_internal() then
setIcon(application_icon)
end if,
show_wintype(modal_fact).

I believe the problem is with the application_icon=9012 constant, which is unknown in the Delphi application.
If the show() method is implemented as in Visual Prolog 10:
clauses
show() :-
show_wintype(modal_fact).
then the application works correctly.
I would not like to make changes to pfc.
Please tell me the best solution.
User avatar
Thomas Linder Puls
VIP Member
Posts: 1418
Joined: 28 Feb 2000 0:01

Re: The Delphi application uses a GUI dll created in Visual Prolog 11

Unread post by Thomas Linder Puls »

If you know the resource identifier of the Delphi application's main icon (which would normally be the one you want to use). Then you can use that resource identifier (here I have used 32767):

Code: Select all

clauses     new(Parent) :-         dialog::new(Parent),         generatedInitialize(),         setIcon(32767).
Regards Thomas Linder Puls
PDC
Post Reply