Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Clipper Visual-Objects > Re: DLLs
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 11 of 13 Topic 11341 of 11703
Post > Topic >>

Re: DLLs

by "Phil Mermod" <pmermod@[EMAIL PROTECTED] > Apr 23, 2008 at 02:35 PM

Hi Tony,

We have exactly what you asked. Here is how we deal with :

1. Create 1 DLL per customer with the same name (mydll.dll)

2. In the DLL, create a dummy function like this :
FUNCTION fInitDLL() AS VOID
RETURN

3. For any class in the DLL, add this following code for Init
and Axit methods  :
METHOD Axit() CLASS MyClass

	IF !InCollect()
		UnRegisterAxit(SELF)
	ENDIF

RETURN NIL

METHOD Init() CLASS MyClass
	RegisterAxit(SELF)
RETURN SELF

4. Add the following code in your EXE where you want initialize
the DLL :

pJam := _VOLoadLibrary("mydll.dll")

IF pJam == NULL_PTR
	TextBox{,"MyApp","DLL could not be loaded
!!!",BOXICONHAND}:Show()
	//QUIT APP or do something else
ELSE
IF !( pAddress := GetProcAddress( pJam , PSZ("fInitDLL") )) ==
NULL_PTR
	PCALL(pAddress)
ELSE
	TextBox{,"MyApp","DLL Entry point 'fInitDLL' is missing
!!!",BOXICONHAND}:Show()
	//QUIT APP or do something else	ENDIF
ENDIF

As somebody wrote before in the thread, it's recommended to have
the same functions, cl*****, methods, ... in each DLL

With this, you don't need to include the DLL or DLL prototypes
in the EXE.

If you need more info., send me an email.

HTH,

-- 
Phil Mermod
Crystal Re****ts Library for Visual Objects
http://www.pkl.ch/dev/


Tony Holland wrote:

> Hey, here's a question I know some-one can answer -
> 
> I wish to provide the same functions (im****t and ex****t) for
> different customers where each customer has a different
> transfer protocol.
> 
> I have all the different protocols in the App and the setup
> selects the appropriate protocol for the installation.
> 
> Question: Can I put the different protocols into different DLLs
> (thereby reducing the EXE size) and distribute just the one
> dll to each. I suspect all the DLLs will have the same name so
> the App can call it as needed, but each one will perform it's
> role differently as required by the customer.
> 
> Question 2: did the first question make sense?
> 
> Thanks
> Tony
 




 13 Posts in Topic:
DLLs
Tony Holland <tony.hol  2008-04-23 05:40:45 
Re: DLLs
=?iso-8859-1?Q?E=AE!k_\\/  2008-04-23 14:50:15 
Re: DLLs
Tony Holland <tony.hol  2008-04-23 06:04:50 
Re: DLLs
=?iso-8859-1?Q?E=AE!k_\\/  2008-04-23 15:41:11 
Re: DLLs
"Alessandro Antonang  2008-04-23 15:09:39 
Re: DLLs
Tony Holland <tony.hol  2008-04-23 06:35:27 
Re: DLLs
=?iso-8859-1?Q?E=AE!k_\\/  2008-04-23 15:44:00 
Re: DLLs
"Alessandro Antonang  2008-04-23 16:21:00 
Re: DLLs
Johan Nel <johan555.ne  2008-04-23 15:47:11 
Re: DLLs
"Stephen Quinn"  2008-04-23 14:09:56 
Re: DLLs
"Phil Mermod" &  2008-04-23 14:35:16 
Re: DLLs
"Geoff Schaller"  2008-04-23 21:51:33 
Re: DLLs
Tony Holland <tony.hol  2008-04-24 05:08:46 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 21:26:07 CDT 2008.