Register | Login
Forum Index > Source Help > import undecorated c++ function
Author Message
Pages: 1 2 3
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[1238] import undecorated c++ function - posted: 2012-05-29 21:42:18

Hi Mr Colin.

how to import undecorated c++ function that in DLL library and use it with Ziron?

http://www.freewebs.com/ogremagic/index.htm
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[1239] - posted: 2012-05-29 21:53:54

for example , this give error
Code:
imports('DBProSetupDebug.dll') 
{
  function constructor = ?Constructor@@YA_NXZ(): boolean; cdecl; 
}


btw , can not use extern "C" because there are overloaded functions in dll library.

http://www.freewebs.com/ogremagic/index.htm
Admin
Site Admin

avatar

(send private message)

Posts: 932
Topics: 54

Location:
OverHertz Studio
[1244] - posted: 2012-09-20 17:37:47
Hi Emil, sorry i've not been around to fix some of the issues, however in the latest update i've added hopefully a solution.

Code:
imports('DBProSetupDebug.dll') 
{
  function constructor = '?Constructor@@YA_NXZ'(): boolean; cdecl; 
}


Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[1266] - posted: 2012-12-21 22:50:07
thanks,

what about a function with arguments (function parameters)

http://www.freewebs.com/ogremagic/index.htm
Admin
Site Admin

avatar

(send private message)

Posts: 932
Topics: 54

Location:
OverHertz Studio
[1268] - posted: 2012-12-22 15:28:26
Code:
imports('DBProSetupDebug.dll') 
{
  function constructor = '?Constructor@@YA_NXZ'(DWord param1): boolean; cdecl; 
}


?

ps. Welcome back smile

Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[1270] - posted: 2012-12-22 16:56:58
thanks,

have problem with this declaration
Code:
function  SetWindowTitle = '?SetWindowTitle@@YAXK@Z'(DWord param1):int32; cdecl; 


Expected ) but found param1 in [testprg.zir]
Code:
function SetWindowTitle = '?SetWindowTitle@@YAXK@Z'(DWord param1):int32; cdecl;


i think ziron refuse any parameters.

http://www.freewebs.com/ogremagic/index.htm
Admin
Site Admin

avatar

(send private message)

Posts: 932
Topics: 54

Location:
OverHertz Studio
[1272] - posted: 2012-12-22 21:13:49
OK, try download the beta package and change your mangled name to be parenthesised

Code:
imports('DBProSetupDebug.dll') 
{
  function constructor = ('?Constructor@@YA_NXZ')(DWord param1): int32; cdecl; 
}


Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[1273] - posted: 2012-12-22 21:30:34

still have the same error


Expected identifier or constant string but found ( in [testprg.zir]
Code:
function SetWindowTitle = ('?SetWindowTitle@@YAXK@Z')(char* Titel):int32; cdecl;


http://www.freewebs.com/ogremagic/index.htm
Pages: 1 2 3
create new reply


Quick reply:

Message:



Currently Active Users:
There are currently 1 user(s) online. 0 member(s) and 1 guest(s)
Most users ever online was 1046, January 28, 2022, 2:08 pm.


Statistics:
Threads: 224 | Posts: 1847 | Members: 50 | Active Members: 50
Welcome to our newest member, NobodyAtWork
const Copyright = '2011-2022 © OverHertz Ltd. All rights reserved.';
Web development by OverHertz Ltd