Wilson Thomas
2004-08-04 07:26:35 UTC
Thanks for the info. I have created multiple project like main project with
code, all forms in another project and all reports in a third project. But
it does not work as expected.
E.g., to print a report "emp_list" report, I pass the parameter from the
main program to the report exe, which contain a start up program and all
reports included.
DO allreports.exe WITH "emp_list"
Strat up program in report exe is
------
LPARAMETERS cReportName
IF TYPE('cReportName') = "L"
RETURN
ENDIF
cReportName = ".\reports\" + ALLTRIM(cReportName)
REPORT FORM &cReportName PREVIEW
--------
Any help would be appreciated.
If this way is not possible, any other alternative
Regards
Wilson
giver
that
code, all forms in another project and all reports in a third project. But
it does not work as expected.
E.g., to print a report "emp_list" report, I pass the parameter from the
main program to the report exe, which contain a start up program and all
reports included.
DO allreports.exe WITH "emp_list"
Strat up program in report exe is
------
LPARAMETERS cReportName
IF TYPE('cReportName') = "L"
RETURN
ENDIF
cReportName = ".\reports\" + ALLTRIM(cReportName)
REPORT FORM &cReportName PREVIEW
--------
Any help would be appreciated.
If this way is not possible, any other alternative
Regards
Wilson
Hi,
DLLs created with VFP are not function libraries as you can create them
withDLLs created with VFP are not function libraries as you can create them
f.i. C++. The dll files in VFP are COM-components (single-or
multi-threaded). This means that when you create a DLL with VFP you'll
havemulti-threaded). This means that when you create a DLL with VFP you'll
to instanciate an OLEPUBLIC class within that dll to access code within
thelibrary.
FI
DEFINE CLASS SayHello AS Custom OLEPUBLIC
PROCEDURE SayHello(cString)
STRTOFILE(cString, "log.txt")
ENDPROC
ENDDEFINE
Save the following code to SayHello.prg and compile the dll using
BUILD PROJECT SayHello FROM SayHello.prg
BUILD DLL SayHello.dll FROM SayHello
in the command window (BTW. I'm using a single threaded dll here, to
createFI
DEFINE CLASS SayHello AS Custom OLEPUBLIC
PROCEDURE SayHello(cString)
STRTOFILE(cString, "log.txt")
ENDPROC
ENDDEFINE
Save the following code to SayHello.prg and compile the dll using
BUILD PROJECT SayHello FROM SayHello.prg
BUILD DLL SayHello.dll FROM SayHello
in the command window (BTW. I'm using a single threaded dll here, to
a multithreaded dll use BUILD MTDLL)
There's a good piece of info in the VFP help on 'Creating Automation
Servers'
Problem you'll find is that COM-components in DLL CAN'T visually interact
with the user. If you want your library to visually interact with the
user,There's a good piece of info in the VFP help on 'Creating Automation
Servers'
Problem you'll find is that COM-components in DLL CAN'T visually interact
with the user. If you want your library to visually interact with the
you'll have to compile the secondary project to an EXE or an APP. This
givesyou the possibility to have a completely other design because now you can
have a main startup program or form which starts when you activate the app
or exe (do 2ndappfile.exe)
You can also use SET CLASSLIB to refer to a classlib in the other app-file
HTH,
Sietse Wijnker
ushave a main startup program or form which starts when you activate the app
or exe (do 2ndappfile.exe)
You can also use SET CLASSLIB to refer to a classlib in the other app-file
HTH,
Sietse Wijnker
I am using VFP 6. My EXE file is getting bigger and bigger, which makes
hard to send file via email for support. So we have decided to use DLL
projects for easy support.
To test functioning of DLL's I have created a small project with a
functionprojects for easy support.
To test functioning of DLL's I have created a small project with a
to display "Hello World" and used the following command to call, but
error "Cannot fing the entry point SayHello in the dll".
This is the program
-----------
SayHello() && Calling the function
FUNCTION SayHello
=MESSAGEBOX("Hello World 123")
ENDFUNC
-----------
Command issued is
--------------
declare SayHello in test1.dll
?sayHello() **** gives error *****
---------------
Any help would be appreciated.
If anyone can forward a small project like this to demo dll function,
This is the program
-----------
SayHello() && Calling the function
FUNCTION SayHello
=MESSAGEBOX("Hello World 123")
ENDFUNC
-----------
Command issued is
--------------
declare SayHello in test1.dll
?sayHello() **** gives error *****
---------------
Any help would be appreciated.
If anyone can forward a small project like this to demo dll function,
would be a great help
rgds
Wilson
rgds
Wilson