LIBRARY DLL2TEST.DLL
EXPORTS
DllEntryPoint @1 ; DllEntryPoint
HBDLLENTRY @2 ; HBDLLENTRY
HBDLLENTRY1 @3 ; HBDLLENTRY1
HBDLLENTRY2 @4 ; HBDLLENTRY2
__DbgWndProc @6 ; __DbgWndProc
__WndProc @5 ; __WndProc
___CPPdebugHook @7 ; ___CPPdebugHook
HB_EXPORT char * PASCAL _export HBDLLSTRING2( char * cProcName, LONG pItem1, LONG pItem2 )
{
MessageBox( 0, "Inside ", "1", 0 );
hb_itemDoC( cProcName, 2, ( PHB_ITEM ) pItem1, ( PHB_ITEM ) pItem2, 0 );
MessageBox( 0, hb_parc( -1 ), "2", 0 );
return hb_parc( -1 );
}
function Test2( cMsg1, cMsg2 )
local cr:=chr(13)
cMsg1:=cMsg1+cr+"This is being added on in the DLL."
cMsg1:=cMsg1+cr+" So Far so good."
cMsg1:=cMsg1+cr+"Time to send this message"
cMsg1:=cMsg1+cr+"back the TESTDLL.EXE."
MsgInfo( cMsg1, cMsg2 )
return (cMsg1)
HB_EXPORT char * PASCAL _export HBDLLSTRING2( char * cProcName, LONG pItem1, LONG pItem2 )
{
PHB_ITEM pResult;
MessageBox( 0, "Inside ", "1", 0 );
pResult = hb_itemDoC( cProcName, 2, ( PHB_ITEM ) pItem1, ( PHB_ITEM ) pItem2, 0 );
MessageBox( 0, hb_itemGetC( pResult ), "2", 0 );
return hb_itemGetC( pResult );
}
************************** Test 3 DoSum
function test3(x,y)
local cr:=chr(13)
local hItem1 := ItemNew( x )
local hItem2 := ItemNew( y )
local rtnval :=0
rtnval:=HbDLLDoSum2( "DoSum", hItem1, hItem2 )
ItemRelease( hItem1 )
ItemRelease( hItem2 )
MsgInfo( str(rtnval)+"=Total"+cr+"OK! We are back to the EXE." )
return nil
DLL FUNCTION HBDLLDoSUM2( cProc AS LPSTR, pItem1 AS LONG, pItem2 AS LONG ) AS LPSTR PASCAL LIB "dll2test.dll"
HB_EXPORT char * PASCAL _export HBDLLDOSUM2( char * cProcName, LONG pItem1, LONG pItem2 )
{
PHB_ITEM pResult;
pResult = hb_itemDoC( cProcName, 2, ( PHB_ITEM ) pItem1, ( PHB_ITEM ) pItem2, 0 );
return hb_itemGetC( pResult );
}
function Test3( x, y )
local z:=X+y
return (z)
DLL FUNCTION HBDLLDoSUM2( cProc AS LPSTR, pItem1 AS LONG, pItem2 AS LONG ) AS LONG PASCAL LIB "dll2test.dll"
HB_EXPORT LONG PASCAL _export HBDLLDOSUM2( char * cProcName, LONG pItem1, LONG pItem2 )
{
PHB_ITEM pResult;
pResult = hb_itemDoC( cProcName, 2, ( PHB_ITEM ) pItem1, ( PHB_ITEM ) pItem2, 0 );
return hb_itemGetNL( pResult );
}
HB_EXPORT LONG PASCAL _export HBDLLDOSUM2( char * cProcName, LONG pItem1, LONG pItem2 )
{
PHB_ITEM pResult;
MessageBox( 0, "Point 1", "1", 0 );
pResult = hb_itemDoC( cProcName, 2, ( PHB_ITEM ) pItem1, ( PHB_ITEM ) pItem2, 0 );
MessageBox( 0, "Point 2", "2", 0 );
return hb_itemGetNL( pResult );
}
?HbDLLDoSum2( "TEST3",3, 2 )
DLL FUNCTION HBDLLDOSUM2( cProc AS LPSTR, pItem1 AS LONG, pItem2 AS LONG ) AS LONG PASCAL LIB "dll2test.dll"
function Test3( x, y )
local z:=X+y
return (z)
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 88 guests