OLE DLL

OLE DLL

Postby asimireu » Thu Jan 12, 2006 4:02 am

OLE LINK EXE (ok)
OLE LINK DLL (stop, pause)

//-----------------------------------------------------------------------
FUNCTION test()
LOCAL oIE
oIE:=TOleAuto():NEW( "InternetExplorer.Application" )
oIE:Visible := .T.

oIE:Navigate( "http://www.yahoo.com" )

RETURN
//-----------------------------------------------------------------------
test.dll

set hdir=c:\xharbour
set bcdir=c:\bc55\bin

%bcdir%\bcc32 -c -D__EXPORT__ -I%hdir%\include -L%bcdir%\..\lib maindll.c

%bcdir%\bcc32 -c -D__EXPORT__ -I%hdir%\include -L%bcdir%\..\lib macrcall.c
%hdir%\bin\harbour -n -w /i%hdir%\include errorsys
%bcdir%\bcc32 -c -D__EXPORT__ -I%hdir%\include errorsys.c

%hdir%\bin\harbour %1 /n /i%hdir%\include /w /p %2 %3 > clip.log
@type clip.log
IF ERRORLEVEL 1 PAUSE
IF ERRORLEVEL 1 GOTO EXIT

echo -O2 -I%hdir%\include %1.c > b32.bc
%bcdir%\bcc32 -M -c @b32.bc
:ENDCOMPILE

IF EXIST %1.rc %bcdir%\brc32 -r %1

echo c0d32.obj + > b32.bc
echo %1.obj+errorsys.obj+maindll.obj+macrcall.obj, + >> b32.bc
echo %1.dll, + >> b32.bc
echo %1.map, + >> b32.bc
echo %hdir%\lib\rtl.lib + >> b32.bc
echo %hdir%\lib\vm.lib + >> b32.bc
echo %hdir%\lib\gtwin.lib + >> b32.bc
echo %hdir%\lib\lang.lib + >> b32.bc
echo %hdir%\lib\macro.lib + >> b32.bc
echo %hdir%\lib\rdd.lib + >> b32.bc
echo %hdir%\lib\dbfdbt.lib + >> b32.bc
echo %hdir%\lib\dbfntx.lib + >> b32.bc
echo %hdir%\lib\dbfcdx.lib + >> b32.bc
echo %hdir%\lib\debug.lib + >> b32.bc
echo %hdir%\lib\common.lib + >> b32.bc
echo %hdir%\lib\pp.lib + >> b32.bc

rem Uncomment these two lines to use Advantage RDD
rem echo %hdir%\lib\rddads.lib + >> b32.bc
rem echo ..\lib\Ace32.lib + >> b32.bc

echo %bcdir%\lib\import32.lib + >> b32.bc
echo %bcdir%\lib\cw32.lib + >> b32.bc
echo %bcdir%\lib\psdk\odbc32.lib, >> b32.bc
IF EXIST %1.res echo %1.res >> b32.bc
%bcdir%\ilink32 -Tpd -aa -L%bcdir%\..\lib -L%bcdir%\..\lib\PSDK @b32.bc
asimireu
 
Posts: 2
Joined: Thu Jan 12, 2006 3:47 am

Postby Antonio Linares » Thu Jan 12, 2006 7:10 am

Asimireu,

How are you running the DLL ? How do you test it ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

OLE TEST

Postby asimireu » Thu Jan 12, 2006 9:55 am

#include <Windows.h>
HINSTANCE hCurInstance;
FARPROC lpfnPopup;

int APIENTRY WinMain()
{
HANDLE hDLL;
hDLL = LoadLibrary("test.dll");
if (hDLL)
{
lpfnPopup=GetProcAddress(hDLL,"Main");
FreeLibrary(hDLL);
}
}
//----------------------------------------------------------------
OLE LINK DLL (stop, pause)
OLE LINK EXE (ok)

I don't know English that much ^^;;
//--------------------------------------------------------------
asimireu
 
Posts: 2
Joined: Thu Jan 12, 2006 3:47 am

Postby Antonio Linares » Thu Jan 12, 2006 12:03 pm

Please try this:

Code: Select all  Expand view  RUN
#include <Windows.h>

int APIENTRY WinMain()
{
   HANDLE hDLL = LoadLibrary("test.dll");

   if( hDLL )
   {
      MessageBox( 0, "DLL loaded", "ok", 0 );
      FreeLibrary( hDLL );
   }
   else
      MessageBox( 0, "can't load it", "No", 0 );
}


Let me know what you get on screen.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 40 guests